|
ATLAS Offline Software
|
#include <DecisionSummaryMakerAlg.h>
|
| 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. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Definition at line 23 of file DecisionSummaryMakerAlg.h.
◆ StoreGateSvc_t
◆ DecisionSummaryMakerAlg()
DecisionSummaryMakerAlg::DecisionSummaryMakerAlg |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~DecisionSummaryMakerAlg()
virtual DecisionSummaryMakerAlg::~DecisionSummaryMakerAlg |
( |
| ) |
|
|
overridevirtualdefault |
◆ cardinality()
unsigned int AthReentrantAlgorithm::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.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode DecisionSummaryMakerAlg::execute |
( |
const EventContext & |
context | ) |
const |
|
overridevirtual |
Definition at line 61 of file DecisionSummaryMakerAlg.cxx.
66 auto container = outputHandle.
ptr();
77 if ( not handle.isValid() ) {
78 ATH_MSG_DEBUG(
"Input " <<
key.key() <<
" not present, did not run in this event.");
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" );
88 for (
const Decision* decisionObject: *handle ) {
92 if (passingFinalIDs.empty()) {
109 allPassingFinalIDs.insert( passingFinalIDs.begin(), passingFinalIDs.end() );
115 allPassingFinalIDs.begin(), allPassingFinalIDs.end() );
118 ATH_MSG_DEBUG(
"Number of positive decisions " << allPassingFinalIDs.size() <<
" passing chains");
119 for (
auto d: allPassingFinalIDs ) {
129 const Decision* l1SeededChains =
nullptr;
130 const Decision* activeChains =
nullptr;
131 const Decision* prescaledChains =
nullptr;
132 for (
const Decision*
d : *hltSeedingSummary) {
133 if (
d->name() ==
"l1seeded") {
135 }
else if (
d->name() ==
"unprescaled") {
137 }
else if (
d->name() ==
"prescaled") {
140 ATH_MSG_ERROR(
"DecisionSummaryMakerAlg encountered an unknown set of decisions from the HLTSeeding, name '" <<
d->name() <<
"'");
141 return StatusCode::FAILURE;
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;
158 prescaledIDs.begin(), prescaledIDs.end() );
162 HLT::IDVec allPassingFinalIDsVec{allPassingFinalIDs.begin(),allPassingFinalIDs.end()};
167 expressIDs.insert(
id.numeric());
174 std::unordered_set<std::string> passStreamsSet;
175 for (
const DecisionID chainID : allPassingFinalIDs) {
185 if (!expressIDs.empty()) {
186 passStreamsSet.insert(s_expressStreamName);
194 for (
const std::string&
s : passStreamsSet) {
204 bool filterStatus =
true;
206 filterStatus = (not allPassingFinalIDs.empty());
210 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
StatusCode DecisionSummaryMakerAlg::finalize |
( |
| ) |
|
|
overridevirtual |
◆ initialize()
StatusCode DecisionSummaryMakerAlg::initialize |
( |
| ) |
|
|
overridevirtual |
◆ inputHandles()
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()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ monitorRoIs()
Monitor RoI updates between initial and final RoI.
Definition at line 213 of file DecisionSummaryMakerAlg.cxx.
215 using RoILinkVec = std::vector<LinkInfo<TrigRoiDescriptorCollection>>;
217 auto printDecision = [
this](
const Decision*
d){
229 const RoILinkVec allFinalRoIs = findLinks<TrigRoiDescriptorCollection>(terminusNode,
roiString(), TrigDefs::lastFeatureOfType);
230 for (
const auto& finalRoILink : allFinalRoIs) {
232 if (!finalRoILink.isValid() || *(finalRoILink.link)==
nullptr) {
234 printDecision(finalRoILink.source);
243 const RoILinkVec initialRoIs = findLinks<TrigRoiDescriptorCollection>(finalRoILink.source,
initialRoIString(), TrigDefs::lastFeatureOfType);
246 if (initialRoIs.empty()) {
248 printDecisionAndRoI(finalRoILink.source, finalRoI);
251 if (initialRoIs.size()>1) {
252 ATH_MSG_WARNING(
"Encountered decision node with multiple (" << initialRoIs.size() <<
") "
254 printDecisionAndRoI(finalRoILink.source, finalRoI);
258 const auto& initialRoILink = initialRoIs.front();
259 if (!initialRoILink.isValid() || *(initialRoILink.link)==
nullptr) {
261 printDecisionAndRoI(finalRoILink.source, finalRoI);
277 if (std::abs(
dEta) > 1.0 || std::abs(
dPhi) > 1.0 || std::abs(dZed) > 200) {
279 <<
"dEta=" <<
dEta <<
", dPhi=" <<
dPhi <<
", dZed=" << dZed
280 <<
"initialRoI: " << initialRoI <<
", finalRoI: " << finalRoI);
281 printDecision(finalRoILink.source);
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ start()
StatusCode DecisionSummaryMakerAlg::start |
( |
| ) |
|
|
overridevirtual |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::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 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::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 InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_chainToStreamsMap
◆ m_collectionFilter
◆ m_detStore
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_finalDecisionKeys
Initial value:{ this, "FinalDecisionKeys", {},
"Final stage of all decisions" }
Definition at line 40 of file DecisionSummaryMakerAlg.h.
◆ m_hltMenuKey
Initial value:{this, "HLTMenuKey", "DetectorStore+HLTTriggerMenu",
"HLT Menu"}
Definition at line 49 of file DecisionSummaryMakerAlg.h.
◆ m_hltSeedingSummaryKey
Initial value:{ this, "HLTSeedingSummaryKey", "HLTSeedingSummary",
"Chains status after L1 and prescaling" }
Definition at line 46 of file DecisionSummaryMakerAlg.h.
◆ 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.
◆ m_monTool
◆ m_prescaler
Initial value:{this, "Prescaler", "PrescalingTool/PrescalingTool",
"Prescaling tool used to determine express stream prescale decisions"}
Definition at line 52 of file DecisionSummaryMakerAlg.h.
◆ 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.
◆ 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.
◆ m_summaryKey
Initial value:{ this, "DecisionsSummaryKey", "HLTNav_Summary",
"Location of final decision" }
Definition at line 37 of file DecisionSummaryMakerAlg.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ 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.
The documentation for this class was generated from the following files:
const std::string & summaryPrescaledNodeName()
const std::string & summaryFilterNodeName()
Group
Properties of a chain group.
ToolHandle< GenericMonitoringTool > m_monTool
const std::string & summaryPassExpressNodeName()
TrigCompositeUtils::DecisionID numeric() const
numeric ID
SG::WriteHandleKey< std::vector< std::string > > m_streamsSummaryKey
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.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Gaudi::Property< bool > m_warnOnLargeRoIUpdates
SG::WriteHandleKey< TrigCompositeUtils::DecisionContainer > m_summaryKey
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
virtual bool composite() const override final
SuperRoI compatability methods.
std::vector< SG::VarHandleKeyArray * > m_vhka
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
SG::WriteHandle< DecisionContainer > createAndStore(const SG::WriteHandleKey< DecisionContainer > &key, const EventContext &ctx)
Creates and right away records the DecisionContainer with the key.
nope - should be used for standalone also, perhaps need to protect the class def bits #ifndef XAOD_AN...
void renounceArray(SG::VarHandleKeyArray &handlesArray)
remove all handles from I/O resolution
Gaudi::Property< bool > m_setFilterStatus
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
std::map< std::string, TrigCompositeUtils::DecisionIDContainer > m_collectionFilter
std::vector< HLT::Identifier > IDVec
ToolHandle< IPrescalingTool > m_prescaler
AthReentrantAlgorithm()
Default constructor:
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
const std::string & initialRoIString()
::StatusCode StatusCode
StatusCode definition for legacy code.
pointer_type ptr()
Dereference the pointer.
bool dPhi(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Class used to describe composite objects in the HLT.
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.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual double zed() const override final
virtual StatusCode sysInitialize() override
Override sysInitialize.
T deltaPhi(T phiA, T phiB)
Return difference phiA - phiB in range [-pi, pi].
Gaudi::Property< std::map< std::string, std::vector< std::string > > > m_lastStepForChain
const std::string & summaryPassNodeName()
SG::ReadHandleKeyArray< TrigCompositeUtils::DecisionContainer > m_finalDecisionKeys
void linkToPrevious(Decision *d, const std::string &previousCollectionKey, size_t previousIndex)
Links to the previous object, location of previous 'seed' decision supplied by hand.
std::set< DecisionID > DecisionIDContainer
SG::ReadHandleKey< xAOD::TrigCompositeContainer > m_hltSeedingSummaryKey
#define ATH_MSG_WARNING(x)
virtual double phi() const override final
Methods to retrieve data members.
void decisionIDs(const Decision *d, DecisionIDContainer &destination)
Extracts DecisionIDs stored in the Decision object.
virtual bool isFullscan() const override final
is this a full scan RoI?
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double eta() const override final
const std::string & roiString()
Declare a monitored scalar variable.
bool dEta(const xAOD::TauJet &tau, const xAOD::TauTrack &track, double &out)
void monitorRoIs(const TrigCompositeUtils::Decision *terminusNode) const
Monitor RoI updates between initial and final RoI.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
SG::ReadHandleKey< TrigConf::HLTMenu > m_hltMenuKey
virtual void setFilterPassed(bool state, const EventContext &ctx) const