8 #ifndef XAOD_STANDALONE
11 const std::string&
name,
23 return StatusCode::SUCCESS;
30 m_sequencerToChainMap.clear();
31 m_algToSequencersMap.clear();
35 for (
const std::string& sequencer :
chain.sequencers() ) {
37 if (sequencer.empty())
continue;
38 m_sequencerToChainMap[sequencer].push_back(
chain);
42 for (
const auto& sequencer : hltMenuHandle->sequencers() ) {
43 for (
const std::string&
algorithm : sequencer.second ) {
49 .push_back(sequencer.first);
55 return StatusCode::SUCCESS;
63 chainNames.push_back(
chain);
65 return StatusCode::SUCCESS;
70 std::vector<std::string>
result;
73 for (
const std::string& sequencer : m_algToSequencersMap.at(algorithmName) ) {
79 catch (
const std::out_of_range & ex ) {
80 ATH_MSG_DEBUG (
"Sequence " << sequencer <<
" is not part of the menu!" );
83 }
catch (
const std::out_of_range & ex ) {
84 ATH_MSG_DEBUG (
"Algorithm " << algorithmName <<
" is not part of the menu!" );
93 std::set<std::string> allActiveChains;
95 for (
const std::string&
sequenceName : m_algToSequencersMap.at(algorithmName) ) {
97 std::string filterName = createCollectionName(
sequenceName);
98 std::set<TrigCompositeUtils::DecisionID> activeChainsInSequence = retrieveActiveChains(context, filterName);
105 }
catch (
const std::out_of_range & ex ) {
106 ATH_MSG_DEBUG (
"Algorithm " << algorithmName <<
" is not part of the menu!" );
109 return allActiveChains;
117 SmartIF<SGImplSvc> eventStore (storeProxy);
118 if (m_cachedEventID != context.eventID().event_number()){
119 ATH_MSG_INFO(
"Caching the event store keys for event " << context.eventID().event_number());
121 m_cachedEventID = context.eventID().event_number();
126 for (
const auto& sequence : hltMenuHandle->
sequencers()) {
127 std::string filterName = createCollectionName(sequence.first);
130 auto foundKey = std::find_if(m_cachedEventStoreKeys.begin(), m_cachedEventStoreKeys.end(), [&](
const std::string&
key) {
131 return CxxUtils::starts_with(key, filterName);
134 if (foundKey != m_cachedEventStoreKeys.end() ){
137 if (!
d->decisions().empty()){
139 for (
const std::string&
alg : sequence.second) {
140 algToSeq[
alg.substr(
alg.find(
'/') + 1,
alg.size())] = sequence.first;
148 return StatusCode::SUCCESS;
152 if (m_cachedEventID != context.eventID().event_number()){
153 ATH_MSG_INFO(
"Caching the event store keys for event " << context.eventID().event_number());
154 m_cachedEventStoreKeys = readSGKeys(context);
155 m_cachedEventID = context.eventID().event_number();
160 std::vector<std::string>
keys;
162 SmartIF<SGImplSvc> eventStore (storeProxy);
169 if (m_cachedEventID == context.eventID().event_number()) {
170 return retrieveActiveChainsForKeys(context, collectionName, m_cachedEventStoreKeys);
172 const std::vector<std::string>
keys = readSGKeys(context);
173 return retrieveActiveChainsForKeys(context, collectionName,
keys);
179 std::set<TrigCompositeUtils::DecisionID> activeChainsID;
183 SmartIF<SGImplSvc> eventStore (storeProxy);
186 for (
const std::string&
key :
keys ) {
209 return activeChainsID;
216 std::map<std::string, std::set<TrigCompositeUtils::DecisionID>> seqToActiveChains;
217 for (
const auto& sequence : m_sequencerToChainMap) {
219 std::string filterName = createCollectionName(sequence.first);
220 seqToActiveChains[sequence.first] = retrieveActiveChains(context, filterName);
223 for (
const auto& algSeqPair : m_algToSequencersMap){
224 std::set<std::string> activeChains;
225 for (
const std::string&
sequenceName : algSeqPair.second){
232 algToChain[algSeqPair.first] = activeChains;
235 return StatusCode::SUCCESS;
258 info.name =
id.name();
259 return StatusCode::SUCCESS;
262 info.name = (*chain).name();
263 info.groups = (*chain).groups();
267 SmartIF<SGImplSvc> eventStore (storeProxy);
273 info.isPassRaw =
std::find(chainsID.begin(), chainsID.end(),
id) != chainsID.end();
275 return StatusCode::SUCCESS;
294 std::string filterName =
"HLTNav_F" +
sequenceName +
"__";
296 if (filterName.find(
"Trig") != std::string::npos){
297 filterName.replace(filterName.find(
"Trig"), 4,
"");
303 #endif // XAOD_STANDALONE