ATLAS Offline Software
Loading...
Searching...
No Matches
TrigCompositeUtils::AlgToChainTool Class Reference

Provide the reverse mapping: algorithm name to set of chain names. More...

#include <AlgToChainTool.h>

Inheritance diagram for TrigCompositeUtils::AlgToChainTool:
Collaboration diagram for TrigCompositeUtils::AlgToChainTool:

Classes

struct  ChainInfo

Public Member Functions

 AlgToChainTool (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~AlgToChainTool ()
virtual StatusCode initialize () override
virtual StatusCode start () override
std::vector< std::string > getChainsForAlg (const std::string &algorithmName) const
 Request set of chains for given algorithm - static lookup (menu)
std::set< std::string > getActiveChainsForAlg (const std::string &algorithmName, const EventContext &context) const
 Request set of active chains for given algorithm - dynamic lookup (navigation)
StatusCode getChainsForAllAlgs (const EventContext &context, std::map< std::string, std::set< std::string > > &algToChain) const
 Request set of chains for all algorithms in the menu.
std::set< TrigCompositeUtils::DecisionIDretrieveActiveChains (const EventContext &context, const std::string &collectionName="") const
 Read the cached or non cached SG kays and request set of chains for given navigation collection.
StatusCode getAllChains (std::vector< TrigConf::Chain > &) const
 Request all chains from the menu.
StatusCode getChainInfo (const EventContext &context, TrigCompositeUtils::DecisionID id, ChainInfo &info) const
 Retrieve chain information for gived chain id.
StatusCode getAllActiveSequences (const EventContext &context, std::map< std::string, std::string > &algToSeq)
 Retrieve algorithms and their active sequences.
void cacheSGKeys (const EventContext &context)
 Cache the StoreGate keys.
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

SG::ReadHandle< TrigCompositeUtils::DecisionContainergetDecisionFromStore (SmartIF< SGImplSvc > &eventStore, const std::string &key) const
std::string createCollectionName (const std::string &sequenceName) const
std::vector< std::string > readSGKeys (const EventContext &context) const
 Read the keys from StoreGate.
std::set< TrigCompositeUtils::DecisionIDretrieveActiveChainsForKeys (const EventContext &context, const std::string &collectionName, const std::vector< std::string > &keys) const
 Request set of chains for given navigation collection and list of StoreGate keys.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadHandleKey< TrigConf::HLTMenum_HLTMenuKey { this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu" }
std::map< std::string, std::vector< TrigConf::Chain > > m_sequencerToChainMap
std::map< std::string, std::vector< std::string > > m_algToSequencersMap
std::vector< std::string > m_cachedEventStoreKeys
uint64_t m_cachedEventID {}
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Provide the reverse mapping: algorithm name to set of chain names.

Definition at line 26 of file AlgToChainTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ AlgToChainTool()

TrigCompositeUtils::AlgToChainTool::AlgToChainTool ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 9 of file AlgToChainTool.cxx.

12 : AthAlgTool (type, name, parent)
13 {}
AthAlgTool()
Default constructor:

◆ ~AlgToChainTool()

TrigCompositeUtils::AlgToChainTool::~AlgToChainTool ( )
virtual

Definition at line 16 of file AlgToChainTool.cxx.

16{}

Member Function Documentation

◆ cacheSGKeys()

void TrigCompositeUtils::AlgToChainTool::cacheSGKeys ( const EventContext & context)

Cache the StoreGate keys.

Definition at line 150 of file AlgToChainTool.cxx.

150 {
151 if (m_cachedEventID != context.eventID().event_number()){
152 ATH_MSG_DEBUG("Caching the event store keys for event " << context.eventID().event_number());
154 m_cachedEventID = context.eventID().event_number();
155 }
156}
#define ATH_MSG_DEBUG(x)
std::vector< std::string > m_cachedEventStoreKeys
std::vector< std::string > readSGKeys(const EventContext &context) const
Read the keys from StoreGate.

◆ createCollectionName()

std::string TrigCompositeUtils::AlgToChainTool::createCollectionName ( const std::string & sequenceName) const
private

Definition at line 288 of file AlgToChainTool.cxx.

288 {
289 std::string filterName = "HLTNav_F" + sequenceName + "__";
290
291 if (filterName.find("Trig") != std::string::npos){
292 filterName.replace(filterName.find("Trig"), 4, "");
293 }
294
295 return filterName;
296}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ getActiveChainsForAlg()

std::set< std::string > TrigCompositeUtils::AlgToChainTool::getActiveChainsForAlg ( const std::string & algorithmName,
const EventContext & context ) const

Request set of active chains for given algorithm - dynamic lookup (navigation)

Definition at line 90 of file AlgToChainTool.cxx.

90 {
91
92 std::set<std::string> allActiveChains;
93 try {
94 for ( const std::string& sequenceName : m_algToSequencersMap.at(algorithmName) ) {
95
96 std::string filterName = createCollectionName(sequenceName);
97 std::set<TrigCompositeUtils::DecisionID> activeChainsInSequence = retrieveActiveChains(context, filterName);
98
99 for ( const TrigCompositeUtils::DecisionID& id : activeChainsInSequence ) {
100 allActiveChains.insert( HLT::Identifier(id).name() );
101 }
102 }
103
104 } catch ( const std::out_of_range & ex ) {
105 ATH_MSG_DEBUG ( "Algorithm " << algorithmName << " is not part of the menu!" );
106 }
107
108 return allActiveChains;
109}
std::string createCollectionName(const std::string &sequenceName) const
std::map< std::string, std::vector< std::string > > m_algToSequencersMap
std::set< TrigCompositeUtils::DecisionID > retrieveActiveChains(const EventContext &context, const std::string &collectionName="") const
Read the cached or non cached SG kays and request set of chains for given navigation collection.
unsigned int DecisionID

◆ getAllActiveSequences()

StatusCode TrigCompositeUtils::AlgToChainTool::getAllActiveSequences ( const EventContext & context,
std::map< std::string, std::string > & algToSeq )

Retrieve algorithms and their active sequences.

Definition at line 112 of file AlgToChainTool.cxx.

112 {
113
114 // Retrieve EventStore and keys if not cached
115 IProxyDict* storeProxy = Atlas::getExtendedEventContext(context).proxy();
116 SmartIF<SGImplSvc> eventStore (storeProxy);
117 if (m_cachedEventID != context.eventID().event_number()){
118 ATH_MSG_DEBUG("Caching the event store keys for event " << context.eventID().event_number());
120 m_cachedEventID = context.eventID().event_number();
121 }
122
123 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey, context );
124 ATH_CHECK( hltMenuHandle.isValid() );
125 for (const auto& sequence : hltMenuHandle->sequencers()) {
126 std::string filterName = createCollectionName(sequence.first);
127
128 // Optimize
129 auto foundKey = std::find_if(m_cachedEventStoreKeys.begin(), m_cachedEventStoreKeys.end(), [&](const std::string& key) {
130 return key.starts_with( filterName);
131 });
132
133 if (foundKey != m_cachedEventStoreKeys.end() ){
134 // Check if sequence passed - if at least one DecisionObject was produced
135 for ( const TrigCompositeUtils::Decision* d : *getDecisionFromStore(eventStore, *foundKey) ) {
136 if (!d->decisions().empty()){
137 // Save algorithm to active sequence mapping
138 for (const std::string& alg : sequence.second) {
139 algToSeq[alg.substr(alg.find('/') + 1, alg.size())] = sequence.first;
140 }
141 break;
142 }
143 }
144 }
145 }
146
147 return StatusCode::SUCCESS;
148}
#define ATH_CHECK
Evaluate an expression and check for errors.
uint32_t CLID
The Class ID type.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::ReadHandleKey< TrigConf::HLTMenu > m_HLTMenuKey
SG::ReadHandle< TrigCompositeUtils::DecisionContainer > getDecisionFromStore(SmartIF< SGImplSvc > &eventStore, const std::string &key) const
const ExtendedEventContext & getExtendedEventContext(const EventContext &ctx)
Retrieve an extended context from a context object.
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ getAllChains()

StatusCode TrigCompositeUtils::AlgToChainTool::getAllChains ( std::vector< TrigConf::Chain > & chainNames) const

Request all chains from the menu.

Definition at line 57 of file AlgToChainTool.cxx.

57 {
58 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
59 ATH_CHECK( hltMenuHandle.isValid() );
60
61 for ( const TrigConf::Chain& chain : *hltMenuHandle ) {
62 chainNames.push_back(chain);
63 }
64 return StatusCode::SUCCESS;
65}

◆ getChainInfo()

StatusCode TrigCompositeUtils::AlgToChainTool::getChainInfo ( const EventContext & context,
TrigCompositeUtils::DecisionID id,
ChainInfo & info ) const

Retrieve chain information for gived chain id.

Definition at line 239 of file AlgToChainTool.cxx.

239 {
240 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey, context );
241 ATH_CHECK( hltMenuHandle.isValid() );
242
243 HLT::Identifier id = getIDFromLeg(decId);
244 info.id = id;
245
246 // Find chain with given id
247 TrigConf::HLTMenu::const_iterator chain = std::find_if(hltMenuHandle->begin(), hltMenuHandle->end(),
248 [&id](const TrigConf::Chain& c) {return c.namehash() == id;}
249 );
250
251 if(chain == hltMenuHandle->end()){
252 ATH_MSG_WARNING("Chain " << id << " not found in the menu!");
253 info.name = id.name();
254 return StatusCode::SUCCESS;
255 }
256
257 info.name = (*chain).name();
258 info.groups = (*chain).groups();
259
260 // Check if chain passed - is in HLTPassRaw collection
261 IProxyDict* storeProxy = Atlas::getExtendedEventContext(context).proxy();
262 SmartIF<SGImplSvc> eventStore (storeProxy);
263 SG::ReadHandle<TrigCompositeUtils::DecisionContainer> dc = getDecisionFromStore(eventStore, "HLTNav_Summary");
264
267 TrigCompositeUtils::decisionIDs( passRaw, chainsID );
268 info.isPassRaw = std::find(chainsID.begin(), chainsID.end(), id) != chainsID.end();
269
270 return StatusCode::SUCCESS;
271}
#define ATH_MSG_WARNING(x)
ConstIter< ptree, Chain > const_iterator
Iterator over the HLT chains.
Definition HLTMenu.h:50
HLT::Identifier getIDFromLeg(const HLT::Identifier &legIdentifier)
Generate the HLT::Identifier which corresponds to the chain name from the leg name.
std::set< DecisionID > DecisionIDContainer
const Decision * getTerminusNode(SG::ReadHandle< DecisionContainer > &container)
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.

◆ getChainsForAlg()

std::vector< std::string > TrigCompositeUtils::AlgToChainTool::getChainsForAlg ( const std::string & algorithmName) const

Request set of chains for given algorithm - static lookup (menu)

Definition at line 68 of file AlgToChainTool.cxx.

68 {
69 std::vector<std::string> result;
70
71 try {
72 for ( const std::string& sequencer : m_algToSequencersMap.at(algorithmName) ) {
73 try {
74 for (const TrigConf::Chain& chain : m_sequencerToChainMap.at(sequencer)){
75 result.push_back(chain.name());
76 }
77 }
78 catch ( const std::out_of_range & ex ) {
79 ATH_MSG_DEBUG ( "Sequence " << sequencer << " is not part of the menu!" );
80 }
81 }
82 } catch ( const std::out_of_range & ex ) {
83 ATH_MSG_DEBUG ( "Algorithm " << algorithmName << " is not part of the menu!" );
84 }
85
86 return result;
87}
std::map< std::string, std::vector< TrigConf::Chain > > m_sequencerToChainMap

◆ getChainsForAllAlgs()

StatusCode TrigCompositeUtils::AlgToChainTool::getChainsForAllAlgs ( const EventContext & context,
std::map< std::string, std::set< std::string > > & algToChain ) const

Request set of chains for all algorithms in the menu.

Definition at line 212 of file AlgToChainTool.cxx.

212 {
213
214 // Look for chains which were active for any of the algorithms of the sequence
215 std::map<std::string, std::set<TrigCompositeUtils::DecisionID>> seqToActiveChains;
216 for (const auto& sequence : m_sequencerToChainMap) {
217 // Look for associated filters names with the sequence
218 std::string filterName = createCollectionName(sequence.first);
219 seqToActiveChains[sequence.first] = retrieveActiveChains(context, filterName);
220 }
221
222 for (const auto& algSeqPair : m_algToSequencersMap){
223 std::set<std::string> activeChains;
224 for (const std::string& sequenceName : algSeqPair.second){
225 // Save all active chains per sequences that algorithm was executed
226 for (TrigCompositeUtils::DecisionID chainId : seqToActiveChains.at(sequenceName)){
227 activeChains.insert(HLT::Identifier(chainId).name());
228 }
229 }
230
231 algToChain[algSeqPair.first] = std::move(activeChains);
232 }
233
234 return StatusCode::SUCCESS;
235}

◆ getDecisionFromStore()

SG::ReadHandle< TrigCompositeUtils::DecisionContainer > TrigCompositeUtils::AlgToChainTool::getDecisionFromStore ( SmartIF< SGImplSvc > & eventStore,
const std::string & key ) const
private

Definition at line 274 of file AlgToChainTool.cxx.

274 {
275 SG::DataProxy* dp = eventStore->proxy(
277
278 SG::ReadHandle<TrigCompositeUtils::DecisionContainer> dc (dp);
279 if ( !dc.isValid() ) {
280 ATH_MSG_WARNING("Failed to retrieve " << key << " from event store.");
281 return SG::ReadHandle<TrigCompositeUtils::DecisionContainer>();
282 }
283
284 return dc;
285}

◆ initialize()

StatusCode TrigCompositeUtils::AlgToChainTool::initialize ( )
overridevirtual

Definition at line 19 of file AlgToChainTool.cxx.

19 {
20 ATH_CHECK( m_HLTMenuKey.initialize() );
21
22 return StatusCode::SUCCESS;
23}

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ readSGKeys()

std::vector< std::string > TrigCompositeUtils::AlgToChainTool::readSGKeys ( const EventContext & context) const
private

Read the keys from StoreGate.

Definition at line 158 of file AlgToChainTool.cxx.

158 {
159 std::vector<std::string> keys;
160 IProxyDict* storeProxy = Atlas::getExtendedEventContext(context).proxy();
161 SmartIF<SGImplSvc> eventStore (storeProxy);
162 eventStore->keys(static_cast<CLID>( ClassID_traits<TrigCompositeUtils::DecisionContainer>::ID() ), keys);
163 return keys;
164}

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ retrieveActiveChains()

std::set< TrigCompositeUtils::DecisionID > TrigCompositeUtils::AlgToChainTool::retrieveActiveChains ( const EventContext & context,
const std::string & collectionName = "" ) const

Read the cached or non cached SG kays and request set of chains for given navigation collection.

Definition at line 166 of file AlgToChainTool.cxx.

166 {
167
168 if (m_cachedEventID == context.eventID().event_number()) {
169 return retrieveActiveChainsForKeys(context, collectionName, m_cachedEventStoreKeys);
170 } else {
171 const std::vector<std::string> keys = readSGKeys(context);
172 return retrieveActiveChainsForKeys(context, collectionName, keys);
173 }
174}
std::set< TrigCompositeUtils::DecisionID > retrieveActiveChainsForKeys(const EventContext &context, const std::string &collectionName, const std::vector< std::string > &keys) const
Request set of chains for given navigation collection and list of StoreGate keys.

◆ retrieveActiveChainsForKeys()

std::set< TrigCompositeUtils::DecisionID > TrigCompositeUtils::AlgToChainTool::retrieveActiveChainsForKeys ( const EventContext & context,
const std::string & collectionName,
const std::vector< std::string > & keys ) const
private

Request set of chains for given navigation collection and list of StoreGate keys.

Definition at line 177 of file AlgToChainTool.cxx.

177 {
178 std::set<TrigCompositeUtils::DecisionID> activeChainsID;
179
180 // Retrieve EventStore and keys if not cached
181 IProxyDict* storeProxy = Atlas::getExtendedEventContext(context).proxy();
182 SmartIF<SGImplSvc> eventStore (storeProxy);
183
184 // Retrieve active chains name hashes
185 for ( const std::string& key : keys ) {
186
187 // Look for given collection
188 if ( !collectionName.empty() && (!key.starts_with( collectionName)) ){
189 continue;
190 }
191
192 // Get data from any nav collection
193 if( collectionName.empty() && (!key.starts_with( "HLTNav") || key == "HLTNav_Summary") ) {
194 continue;
195 }
196
197 for ( const TrigCompositeUtils::Decision* d : *getDecisionFromStore(eventStore, key) ) {
199 TrigCompositeUtils::decisionIDs( d, chainsID );
200
201 // Save the active chains IDs
202 for (TrigCompositeUtils::DecisionID id : chainsID){
203 activeChainsID.insert(TrigCompositeUtils::getIDFromLeg(id));
204 }
205 }
206 }
207
208 return activeChainsID;
209}

◆ start()

StatusCode TrigCompositeUtils::AlgToChainTool::start ( )
overridevirtual

Definition at line 26 of file AlgToChainTool.cxx.

26 {
27 SG::ReadHandle<TrigConf::HLTMenu> hltMenuHandle = SG::makeHandle( m_HLTMenuKey );
28 ATH_CHECK( hltMenuHandle.isValid() );
31
32 // Fill the maps
33 for ( const TrigConf::Chain& chain : *hltMenuHandle ) {
34 for ( const std::string& sequencer : chain.sequencers() ) {
35 // Skip empty steps = empty sequencers in the list
36 if (sequencer.empty()) continue;
37 m_sequencerToChainMap[sequencer].push_back(chain);
38 }
39 }
40
41 for ( const auto& sequencer : hltMenuHandle->sequencers() ) {
42 for ( const std::string& algorithm : sequencer.second ) {
43 // PassFilter is for empty steps - will never be associated with a chain
44 if (algorithm.starts_with( "PassFilter")) continue;
45
46 // Save just second part of algorithm ex. RoRSeqFilter/FFastCaloElectron -> FFastCaloElectron
47 m_algToSequencersMap[algorithm.substr(algorithm.find('/') + 1)]
48 .push_back(sequencer.first);
49 }
50 }
51
52 m_cachedEventID = 0; // Revet the cache identifier
53
54 return StatusCode::SUCCESS;
55}
std::string algorithm
Definition hcg.cxx:85

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_algToSequencersMap

std::map<std::string, std::vector<std::string> > TrigCompositeUtils::AlgToChainTool::m_algToSequencersMap
private

Definition at line 74 of file AlgToChainTool.h.

◆ m_cachedEventID

uint64_t TrigCompositeUtils::AlgToChainTool::m_cachedEventID {}
private

Definition at line 77 of file AlgToChainTool.h.

77{};

◆ m_cachedEventStoreKeys

std::vector<std::string> TrigCompositeUtils::AlgToChainTool::m_cachedEventStoreKeys
private

Definition at line 76 of file AlgToChainTool.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_HLTMenuKey

SG::ReadHandleKey<TrigConf::HLTMenu> TrigCompositeUtils::AlgToChainTool::m_HLTMenuKey { this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu" }
private

Definition at line 71 of file AlgToChainTool.h.

71{ this, "HLTTriggerMenu", "DetectorStore+HLTTriggerMenu", "HLT Menu" };

◆ m_sequencerToChainMap

std::map<std::string, std::vector<TrigConf::Chain> > TrigCompositeUtils::AlgToChainTool::m_sequencerToChainMap
private

Definition at line 73 of file AlgToChainTool.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: