HERA-B higher-level triggers: architecture and software