ATLAS Offline Software
Loading...
Searching...
No Matches
DecisionSummaryMakerAlg Class Reference

#include <DecisionSummaryMakerAlg.h>

Inheritance diagram for DecisionSummaryMakerAlg:
Collaboration diagram for DecisionSummaryMakerAlg:

Public Member Functions

 DecisionSummaryMakerAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~DecisionSummaryMakerAlg () override=default
virtual StatusCode initialize () override
virtual StatusCode start () override
virtual StatusCode execute (const EventContext &context) const override
virtual StatusCode finalize () override
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
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 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

void monitorRoIs (const TrigCompositeUtils::Decision *terminusNode) const
 Monitor RoI updates between initial and final RoI.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::WriteHandleKey< TrigCompositeUtils::DecisionContainerm_summaryKey
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainerm_finalDecisionKeys
SG::WriteHandleKey< std::vector< std::string > > m_streamsSummaryKey
SG::ReadHandleKey< xAOD::TrigCompositeContainerm_hltSeedingSummaryKey
SG::ReadHandleKey< TrigConf::HLTMenum_hltMenuKey
ToolHandle< IPrescalingToolm_prescaler
ToolHandle< GenericMonitoringToolm_monTool
Gaudi::Property< std::map< std::string, std::vector< std::string > > > m_lastStepForChain
Gaudi::Property< bool > m_warnOnLargeRoIUpdates
Gaudi::Property< bool > m_setFilterStatus
std::map< std::string, TrigCompositeUtils::DecisionIDContainerm_collectionFilter
std::unordered_map< TrigCompositeUtils::DecisionID, std::vector< std::string > > m_chainToStreamsMap
 Chain to streams map filled from the HLT Menu JSON.
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
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

Definition at line 23 of file DecisionSummaryMakerAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DecisionSummaryMakerAlg()

DecisionSummaryMakerAlg::DecisionSummaryMakerAlg ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 17 of file DecisionSummaryMakerAlg.cxx.

18 : AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~DecisionSummaryMakerAlg()

virtual DecisionSummaryMakerAlg::~DecisionSummaryMakerAlg ( )
overridevirtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode DecisionSummaryMakerAlg::execute ( const EventContext & context) const
overridevirtual

Definition at line 61 of file DecisionSummaryMakerAlg.cxx.

61 {
62
63 using namespace TrigCompositeUtils;
64
65 SG::WriteHandle<DecisionContainer> outputHandle = createAndStore( m_summaryKey, context );
66 auto container = outputHandle.ptr();
67
68 Decision* passRawOutput = newDecisionIn( container, summaryPassNodeName() );
69 Decision* passExpressOutput = newDecisionIn( container, summaryPassExpressNodeName() );
70 Decision* prescaledOutput = newDecisionIn( container, summaryPrescaledNodeName() );
71
72 DecisionIDContainer allPassingFinalIDs;
73
74 // Collate final decisions into the passRawOutput object
75 for ( auto& key: m_finalDecisionKeys ) {
76 auto handle{ SG::makeHandle(key, context) };
77 if ( not handle.isValid() ) {
78 ATH_MSG_DEBUG("Input " << key.key() << " not present, did not run in this event.");
79 continue;
80 }
81 const auto thisCollFilter = m_collectionFilter.find( key.key() );
82 if ( thisCollFilter == m_collectionFilter.end() ) {
83 ATH_MSG_WARNING( "The collection " << key.key() << " is not configured to contain any final decision,"
84 << "remove it from the configuration of " << name() << " to save time" );
85 continue;
86 }
87
88 for ( const Decision* decisionObject: *handle ) {
89 // Filter out chains for which this is NOT the final step of their processing
90 const DecisionIDContainer& passingFinalIDs = passedDecisionIDs(decisionObject, thisCollFilter->second);
91
92 if (passingFinalIDs.empty()) {
93 continue;
94 }
95
96 // Create a node to act as a filter between the final summary node and this HypoAlg.
97 // This ensures that we follow this edge (now two edges) in the graph only for the chains in
98 // passingFinalIDs rather than for other chains which are active in decisionObject which
99 // may accept the event via other objects
100
101 // filter -> HypoAlg
102 Decision* filter = newDecisionIn( container, decisionObject, summaryFilterNodeName(), context );
103 decisionIDs(filter).insert( decisionIDs(filter).end(), passingFinalIDs.begin(), passingFinalIDs.end() );
104
105 // HLTPassRaw -> filter
106 linkToPrevious(passRawOutput, filter, context);
107
108 // Accumulate and de-duplicate passed IDs for which this hypo was the Chain's final step
109 allPassingFinalIDs.insert( passingFinalIDs.begin(), passingFinalIDs.end() );
110 }
111 }
112
113 // Copy decisions set into passRawOutput's persistent vector
114 decisionIDs(passRawOutput).insert( decisionIDs(passRawOutput).end(),
115 allPassingFinalIDs.begin(), allPassingFinalIDs.end() );
116
117 if (msgLvl(MSG::DEBUG)) {
118 ATH_MSG_DEBUG( "Number of positive decisions " << allPassingFinalIDs.size() << " passing chains");
119 for ( auto d: allPassingFinalIDs ) {
120 ATH_MSG_DEBUG( HLT::Identifier( d ) );
121 }
122 }
123
124 // Monitor RoI updates between initial and final RoI
125 monitorRoIs(passRawOutput);
126
127 // Get the data from the HLTSeeding, this is where prescales were applied
128 SG::ReadHandle<DecisionContainer> hltSeedingSummary( m_hltSeedingSummaryKey, context );
129 const Decision* l1SeededChains = nullptr; // Activated by L1
130 const Decision* activeChains = nullptr; // Activated and passed prescale check
131 const Decision* prescaledChains = nullptr; // Activated but failed prescale check
132 for (const Decision* d : *hltSeedingSummary) {
133 if (d->name() == "l1seeded") {
134 l1SeededChains = d;
135 } else if (d->name() == "unprescaled") {
136 activeChains = d;
137 } else if (d->name() == "prescaled") {
138 prescaledChains = d;
139 } else {
140 ATH_MSG_ERROR("DecisionSummaryMakerAlg encountered an unknown set of decisions from the HLTSeeding, name '" << d->name() << "'");
141 return StatusCode::FAILURE;
142 }
143 }
144
145 if (l1SeededChains == nullptr || activeChains == nullptr || prescaledChains == nullptr) {
146 ATH_MSG_ERROR("Unable to read in the summary from the HLTSeeding. Cannot write to the HLT output summary the prescale status of HLT chains.");
147 return StatusCode::FAILURE;
148 }
149
150 // l1SeededChains is not currently used here
151
152 // activeChains is not currently used here
153
154 // Get chains which were prescaled out. This is the set of chains which were seeded but which were NOT active (in the first pass)
155 DecisionIDContainer prescaledIDs;
156 decisionIDs( prescaledChains, prescaledIDs ); // Extract from prescaledChains (a Decision*) into prescaledIDs (a set<int>)
157 decisionIDs( prescaledOutput ).insert( decisionIDs( prescaledOutput ).end(),
158 prescaledIDs.begin(), prescaledIDs.end() ); // Save this to the output
159
160 // Calculate and save express stream prescale decisions
161 // TODO: this involves pointless conversions set<uint> -> vector<HLT::Identifier> -> set<uint>, adapt IPrescalingTool to operate on set<uint>
162 HLT::IDVec allPassingFinalIDsVec{allPassingFinalIDs.begin(),allPassingFinalIDs.end()}; // Convert set to vector
163 HLT::IDVec expressIDsVec;
164 ATH_CHECK( m_prescaler->prescaleChains(context, allPassingFinalIDsVec, expressIDsVec, /*forExpressStream=*/ true) );
165 DecisionIDContainer expressIDs; // Convert vector to set
166 for (const HLT::Identifier& id : expressIDsVec) {
167 expressIDs.insert(id.numeric());
168 }
169 decisionIDs( passExpressOutput ).insert( decisionIDs( passExpressOutput ).end(),
170 expressIDs.begin(),
171 expressIDs.end() ); // Save this to the output
172
173 // Fill and write out a set of passed streams
174 std::unordered_set<std::string> passStreamsSet;
175 for (const DecisionID chainID : allPassingFinalIDs) {
176 if (const auto it = m_chainToStreamsMap.find(chainID); it!=m_chainToStreamsMap.cend()) {
177 for (const std::string& streamName : it->second) {
178 passStreamsSet.insert(streamName);
179 }
180 } else {
181 ATH_MSG_ERROR("Passed chain " << HLT::Identifier(chainID).name() << " not in m_chainToStreamsMap");
182 }
183 }
184 // Add express
185 if (!expressIDs.empty()) {
186 passStreamsSet.insert(s_expressStreamName);
187 }
188 SG::WriteHandle<std::vector<std::string>> passStreams{m_streamsSummaryKey, context};
189 ATH_CHECK(passStreams.record(std::make_unique<std::vector<std::string>>(passStreamsSet.begin(),passStreamsSet.end())));
190
191 if (msgLvl(MSG::DEBUG)) {
192 std::ostringstream streamNames;
193 bool first{true};
194 for (const std::string& s : passStreamsSet) {
195 if (first) {first=false;}
196 else {streamNames << ", ";}
197 streamNames << s;
198 }
199 ATH_MSG_DEBUG("This event is accepted to " << passStreamsSet.size() << " streams: " << streamNames.str());
200 }
201
202 // Set the algorithm's filter status. This controlls the running of finalisation algs which we only want to execute
203 // in events which are accepted by one ore more chains.
204 bool filterStatus = true;
205 if (m_setFilterStatus) {
206 filterStatus = (not allPassingFinalIDs.empty());
207 }
208 setFilterPassed(filterStatus, context );
209
210 return StatusCode::SUCCESS;
211}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
unsigned int DecisionID
Decision * newDecisionIn(DecisionContainer *dc, const std::string &name="")
Helper method to create a Decision object, place it in the container and return a pointer to it.
std::set< DecisionID > DecisionIDContainer
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
void decisionIDs(const Decision *d, DecisionIDContainer &id)
Extracts DecisionIDs stored in the Decision object.
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
DecisionIDContainer passedDecisionIDs(const Decision *d, const T &required)
return DecisionIDs in Decision object that match the required ones
bool msgLvl(const MSG::Level lvl) const
virtual void setFilterPassed(bool state, const EventContext &ctx) const
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_summaryKey
Gaudi::Property< bool > m_setFilterStatus
SG::WriteHandleKey< std::vector< std::string > > m_streamsSummaryKey
void monitorRoIs(const TrigCompositeUtils::Decision *terminusNode) const
Monitor RoI updates between initial and final RoI.
ToolHandle< IPrescalingTool > m_prescaler
std::unordered_map< TrigCompositeUtils::DecisionID, std::vector< std::string > > m_chainToStreamsMap
Chain to streams map filled from the HLT Menu JSON.
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_hltSeedingSummaryKey
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_collectionFilter
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_finalDecisionKeys
StatusCode record(std::unique_ptr< T > data)
Record a const object to the store.
pointer_type ptr()
Dereference the pointer.
bool first
Definition DeMoScan.py:534
std::vector< HLT::Identifier > IDVec
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
const std::string & summaryPrescaledNodeName()
const std::string & summaryFilterNodeName()
const std::string & summaryPassNodeName()
const std::string & summaryPassExpressNodeName()

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ finalize()

StatusCode DecisionSummaryMakerAlg::finalize ( )
overridevirtual

Definition at line 57 of file DecisionSummaryMakerAlg.cxx.

57 {
58 return StatusCode::SUCCESS;
59}

◆ initialize()

StatusCode DecisionSummaryMakerAlg::initialize ( )
overridevirtual

Definition at line 20 of file DecisionSummaryMakerAlg.cxx.

20 {
22 ATH_CHECK( m_finalDecisionKeys.initialize() );
23 ATH_CHECK( m_summaryKey.initialize() );
24 ATH_CHECK( m_streamsSummaryKey.initialize() );
25 ATH_CHECK( m_hltSeedingSummaryKey.initialize() );
26 ATH_CHECK( m_hltMenuKey.initialize() );
27
28 for ( auto& [chain, collections]: m_lastStepForChain ) {
29 for ( auto& collection: collections ) {
30 m_collectionFilter[ collection ].insert( HLT::Identifier( chain ).numeric() );
31 ATH_MSG_DEBUG( "Final decision of the chain " << chain << " will be read from " << collection );
32 }
33 }
34
35 ATH_CHECK( m_prescaler.retrieve() );
36 if (!m_monTool.empty()) {
37 ATH_CHECK(m_monTool.retrieve());
38 }
39
40 return StatusCode::SUCCESS;
41}
void renounceArray(SG::VarHandleKeyArray &handlesArray)
Gaudi::Property< std::map< std::string, std::vector< std::string > > > m_lastStepForChain
ToolHandle< GenericMonitoringTool > m_monTool
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuKey

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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.

◆ isClonable()

◆ monitorRoIs()

void DecisionSummaryMakerAlg::monitorRoIs ( const TrigCompositeUtils::Decision * terminusNode) const
private

Monitor RoI updates between initial and final RoI.

Definition at line 213 of file DecisionSummaryMakerAlg.cxx.

213 {
214 using namespace TrigCompositeUtils;
215 using RoILinkVec = std::vector<LinkInfo<TrigRoiDescriptorCollection>>;
216
217 auto printDecision = [this](const Decision* d){
218 ATH_MSG_INFO("The decision corresponds to chain(s):");
219 for (const DecisionID id : decisionIDs(d)) {
220 ATH_MSG_INFO("-- " << HLT::Identifier(id).name());
221 }
222 };
223 auto printDecisionAndRoI = [this,&printDecision](const Decision* d, const TrigRoiDescriptor& roi){
224 printDecision(d);
225 ATH_MSG_INFO("and final RoI: " << roi);
226 };
227
228 // Loop over all final RoIs
229 const RoILinkVec allFinalRoIs = findLinks<TrigRoiDescriptorCollection>(terminusNode, roiString(), TrigDefs::lastFeatureOfType);
230 for (const auto& finalRoILink : allFinalRoIs) {
231 // Get the final TrigRoiDescriptor reference
232 if (!finalRoILink.isValid() || *(finalRoILink.link)==nullptr) {
233 ATH_MSG_WARNING("Encountered invalid final RoI link");
234 printDecision(finalRoILink.source);
235 continue;
236 }
237 const TrigRoiDescriptor& finalRoI = **(finalRoILink.link);
238
239 // Skip full-scan and SuperRoI
240 if (finalRoI.isFullscan() || finalRoI.composite()) {continue;}
241
242 // Get all initial RoIs associated with this final RoI (should be exactly one)
243 const RoILinkVec initialRoIs = findLinks<TrigRoiDescriptorCollection>(finalRoILink.source, initialRoIString(), TrigDefs::lastFeatureOfType);
244
245 // Warn if the number of initial RoIs differs from one
246 if (initialRoIs.empty()) {
247 ATH_MSG_WARNING("Encountered decision node with no " << initialRoIString() << " link");
248 printDecisionAndRoI(finalRoILink.source, finalRoI);
249 continue;
250 }
251 if (initialRoIs.size()>1) {
252 ATH_MSG_WARNING("Encountered decision node with multiple (" << initialRoIs.size() << ") "
253 << initialRoIString() << " links");
254 printDecisionAndRoI(finalRoILink.source, finalRoI);
255 }
256
257 // Get the initial TrigRoiDescriptor reference
258 const auto& initialRoILink = initialRoIs.front();
259 if (!initialRoILink.isValid() || *(initialRoILink.link)==nullptr) {
260 ATH_MSG_WARNING("Encountered invalid initial RoI link");
261 printDecisionAndRoI(finalRoILink.source, finalRoI);
262 continue;
263 }
264 const TrigRoiDescriptor& initialRoI = **(initialRoILink.link);
265
266 // Skip full-scan
267 if (initialRoI.isFullscan()) {continue;}
268
269 // Fill the monitoring histograms
270 Monitored::Scalar dEta{"RoIsDEta", finalRoI.eta() - initialRoI.eta()};
271 Monitored::Scalar dPhi{"RoIsDPhi", CxxUtils::deltaPhi(finalRoI.phi(), initialRoI.phi())};
272 Monitored::Scalar dZed{"RoIsDZed", finalRoI.zed() - initialRoI.zed()};
273 Monitored::Group(m_monTool, dEta, dPhi, dZed);
274
275 // Print warnings on large updates
276 if (m_warnOnLargeRoIUpdates.value()) {
277 if (std::abs(dEta) > 1.0 || std::abs(dPhi) > 1.0 || std::abs(dZed) > 200) {
278 ATH_MSG_WARNING("Large RoI difference between initial and final RoI: "
279 << "dEta=" << dEta << ", dPhi=" << dPhi << ", dZed=" << dZed
280 << "initialRoI: " << initialRoI << ", finalRoI: " << finalRoI);
281 printDecision(finalRoILink.source);
282 }
283 }
284 }
285}
#define ATH_MSG_INFO(x)
const std::string & roiString()
Athena::TPCnvVers::Current TrigRoiDescriptor
Gaudi::Property< bool > m_warnOnLargeRoIUpdates
virtual double zed() const override final
virtual bool isFullscan() const override final
is this a full scan RoI?
virtual double phi() const override final
Methods to retrieve data members.
virtual double eta() const override final
virtual bool composite() const override final
SuperRoI compatability methods.
T deltaPhi(T phiA, T phiB)
Return difference phiA - phiB in range [-pi, pi].
Definition phihelper.h:42
bool dPhi(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
bool dEta(const xAOD::TauJet &tau, const xAOD::CaloVertexedTopoCluster &cluster, float &out)
const std::string & initialRoIString()
static const unsigned int lastFeatureOfType
Run 3 "enum". Only return the final feature along each route through the navigation.

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::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< Gaudi::Algorithm > >::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.

◆ 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< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }

◆ start()

StatusCode DecisionSummaryMakerAlg::start ( )
overridevirtual

Definition at line 43 of file DecisionSummaryMakerAlg.cxx.

43 {
44 SG::ReadHandle<TrigConf::HLTMenu> hltMenu{m_hltMenuKey};
45 ATH_CHECK(hltMenu.isValid());
46 m_chainToStreamsMap.clear();
47 // Fill the map of Chain ID -> stream names, omitting express which is treated separately due to express prescaling
48 for (const TrigConf::Chain& chain : *hltMenu) {
49 std::vector<std::string> streams = chain.streams();
50 streams.erase(std::remove(streams.begin(),streams.end(),s_expressStreamName), streams.end());
51 m_chainToStreamsMap.insert({HLT::Identifier(chain.name()).numeric(),std::move(streams)});
52 }
53
54 return StatusCode::SUCCESS;
55}
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DataModel_detail::iterator< DVL > remove(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end, const T &value)
Specialization of remove for DataVector/List.

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::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< Gaudi::Algorithm > >::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 }

Member Data Documentation

◆ m_chainToStreamsMap

std::unordered_map<TrigCompositeUtils::DecisionID, std::vector<std::string> > DecisionSummaryMakerAlg::m_chainToStreamsMap
private

Chain to streams map filled from the HLT Menu JSON.

Definition at line 71 of file DecisionSummaryMakerAlg.h.

◆ m_collectionFilter

std::map<std::string, TrigCompositeUtils::DecisionIDContainer> DecisionSummaryMakerAlg::m_collectionFilter
private

Definition at line 68 of file DecisionSummaryMakerAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_finalDecisionKeys

SG::ReadHandleKeyArray<TrigCompositeUtils::DecisionContainer> DecisionSummaryMakerAlg::m_finalDecisionKeys
private
Initial value:
{ this, "FinalDecisionKeys", {},
"Final stage of all decisions" }

Definition at line 40 of file DecisionSummaryMakerAlg.h.

40 { this, "FinalDecisionKeys", {},
41 "Final stage of all decisions" };

◆ m_hltMenuKey

SG::ReadHandleKey<TrigConf::HLTMenu> DecisionSummaryMakerAlg::m_hltMenuKey
private
Initial value:
{this, "HLTMenuKey", "DetectorStore+HLTTriggerMenu",
"HLT Menu"}

Definition at line 49 of file DecisionSummaryMakerAlg.h.

49 {this, "HLTMenuKey", "DetectorStore+HLTTriggerMenu",
50 "HLT Menu"};

◆ m_hltSeedingSummaryKey

SG::ReadHandleKey<xAOD::TrigCompositeContainer> DecisionSummaryMakerAlg::m_hltSeedingSummaryKey
private
Initial value:
{ this, "HLTSeedingSummaryKey", "HLTSeedingSummary",
"Chains status after L1 and prescaling" }

Definition at line 46 of file DecisionSummaryMakerAlg.h.

46 { this, "HLTSeedingSummaryKey", "HLTSeedingSummary",
47 "Chains status after L1 and prescaling" };

◆ m_lastStepForChain

Gaudi::Property< std::map< std::string, std::vector<std::string> > > DecisionSummaryMakerAlg::m_lastStepForChain
private
Initial value:
{ this, "FinalStepDecisions", {},
"The map of chain name to names of the collections in which the final decision is found" }

Definition at line 58 of file DecisionSummaryMakerAlg.h.

58 { this, "FinalStepDecisions", {},
59 "The map of chain name to names of the collections in which the final decision is found" };

◆ m_monTool

ToolHandle<GenericMonitoringTool> DecisionSummaryMakerAlg::m_monTool
private
Initial value:
{ this, "MonTool", "",
"Monitoring tool" }

Definition at line 55 of file DecisionSummaryMakerAlg.h.

55 { this, "MonTool", "",
56 "Monitoring tool" };

◆ m_prescaler

ToolHandle<IPrescalingTool> DecisionSummaryMakerAlg::m_prescaler
private
Initial value:
{this, "Prescaler", "PrescalingTool/PrescalingTool",
"Prescaling tool used to determine express stream prescale decisions"}

Definition at line 52 of file DecisionSummaryMakerAlg.h.

52 {this, "Prescaler", "PrescalingTool/PrescalingTool",
53 "Prescaling tool used to determine express stream prescale decisions"};

◆ m_setFilterStatus

Gaudi::Property<bool> DecisionSummaryMakerAlg::m_setFilterStatus
private
Initial value:
{this, "SetFilterStatus", false,
"Enables chain-passed filter. This will cause the downstream EDMCreator to not run if no chains pass, saving CPU in rejected events. "
"Cannot be used in jobs producing RDO output."}

Definition at line 64 of file DecisionSummaryMakerAlg.h.

64 {this, "SetFilterStatus", false,
65 "Enables chain-passed filter. This will cause the downstream EDMCreator to not run if no chains pass, saving CPU in rejected events. "
66 "Cannot be used in jobs producing RDO output."};

◆ m_streamsSummaryKey

SG::WriteHandleKey<std::vector<std::string> > DecisionSummaryMakerAlg::m_streamsSummaryKey
private
Initial value:
{ this, "StreamsSummaryKey", "HLTStreamsSummary",
"Set of streams accepted in the event"}

Definition at line 43 of file DecisionSummaryMakerAlg.h.

43 { this, "StreamsSummaryKey", "HLTStreamsSummary",
44 "Set of streams accepted in the event"};

◆ m_summaryKey

SG::WriteHandleKey<TrigCompositeUtils::DecisionContainer> DecisionSummaryMakerAlg::m_summaryKey
private
Initial value:
{ this, "DecisionsSummaryKey", "HLTNav_Summary",
"Location of final decision" }

Definition at line 37 of file DecisionSummaryMakerAlg.h.

37 { this, "DecisionsSummaryKey", "HLTNav_Summary",
38 "Location of final decision" };

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.

◆ m_warnOnLargeRoIUpdates

Gaudi::Property<bool> DecisionSummaryMakerAlg::m_warnOnLargeRoIUpdates
private
Initial value:
{this, "WarnOnLargeRoIUpdates", true,
"Print warnings from RoI update monitoring if the difference between initial and final RoI is large"}

Definition at line 61 of file DecisionSummaryMakerAlg.h.

61 {this, "WarnOnLargeRoIUpdates", true,
62 "Print warnings from RoI update monitoring if the difference between initial and final RoI is large"};

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