ATLAS Offline Software
TrigDecisionToolLite.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TrigDecision_TrigDecisionToolLite_h
6 #define TrigDecision_TrigDecisionToolLite_h
7 /**********************************************************************************
8  * @class : TrigDecisionToolLite
9  *
10  * @brief Lightweight alternate to the TrigDecisionTool, without configuration access.
11  *
12  * The TrigDecisionToolLite provides a minimal interface with the per-event trigger payload.
13  * Unlike the full version, this tool does NOT interface with the trigger configuration data.
14  * This tool will only allow access to information from the HLT navigation container which can be
15  * interpreted independently of the configuration. This includes per-chain feature access.
16  * And HLT chain isPassed information, as returned from the HLT navigation terminus node.
17  *
18  ***********************************************************************************/
19 
20 #include "AsgTools/AsgTool.h"
24 
27 
29 
31 
32 namespace Trig {
33  class TrigDecisionToolLite : public asg::AsgTool, virtual public ITrigDecisionToolLite
34  {
35  ASG_TOOL_CLASS1(TrigDecisionToolLite, ITrigDecisionToolLite)
36 
37  public:
38 
39  TrigDecisionToolLite(const std::string& name);
40  ~TrigDecisionToolLite() = default;
41 
43 
49  virtual bool isPassed(const HLT::Identifier& chain, const EventContext& ctx = Gaudi::Hive::currentContext()) const final;
50 
57  virtual bool isPassed(const std::string& chain, const EventContext& ctx = Gaudi::Hive::currentContext()) const final;
58 
64  virtual bool isPassed(const std::vector<HLT::Identifier>& chains, const EventContext& ctx = Gaudi::Hive::currentContext()) const final;
65 
72  virtual bool isPassed(const std::vector<std::string>& chains, const EventContext& ctx = Gaudi::Hive::currentContext()) const final;
73 
74  private:
75 
88  virtual std::vector<TrigCompositeUtils::TypelessLinkInfo>
89  typelessFeatures( const Trig::FeatureRequestDescriptor& frd, const CLID clid, const EventContext& ctx) const final;
90 
91  virtual const asg::EventStoreType* getEventStore() const final;
92 
97  StatusCode fillPassingChainsSet(TrigCompositeUtils::DecisionIDContainer& setOfAllPassingChains, const EventContext& ctx) const;
98 
99  SG::ReadHandleKey<TrigCompositeUtils::DecisionContainer> m_HLTSummaryKeyIn {this, "HLTSummary",
100  "HLTNav_Summary_DAODSlimmed", "HLT navigation summary container key"};
101 
102  public:
103 
104  static std::atomic<bool> s_printWarningMessages ATLAS_THREAD_SAFE;
105 
106  };
107 
108 } // End of namespace
109 
110 #endif
Trig::TrigDecisionToolLite::ATLAS_THREAD_SAFE
static std::atomic< bool > s_printWarningMessages ATLAS_THREAD_SAFE
Definition: TrigDecisionToolLite.h:126
TypelessLinkInfo.h
asg::AsgTool
Base class for the dual-use tool implementation classes.
Definition: AsgTool.h:47
PropertyWrapper.h
Trig::TrigDecisionToolLite::TrigDecisionToolLite
TrigDecisionToolLite(const std::string &name)
Definition: TrigDecisionToolLite.cxx:13
runLayerRecalibration.chain
chain
Definition: runLayerRecalibration.py:175
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
TrigCompositeUtils::DecisionContainer
xAOD::TrigCompositeContainer DecisionContainer
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigCompositeContainer.h:21
Trig
The common trigger namespace for trigger analysis tools.
Definition: LArCellMonAlg.h:33
Trig::TrigDecisionToolLite::fillPassingChainsSet
StatusCode fillPassingChainsSet(TrigCompositeUtils::DecisionIDContainer &setOfAllPassingChains, const EventContext &ctx) const
Internal.
Definition: TrigDecisionToolLite.cxx:20
asg::EventStoreType
StoreGateSvc EventStoreType
the type returned by AsgTool::evtStore
Definition: EventStoreType.h:27
Trig::TrigDecisionToolLite::isPassed
virtual bool isPassed(const HLT::Identifier &chain, const EventContext &ctx=Gaudi::Hive::currentContext()) const final
true if the given HLT chain passed for physics
Definition: TrigDecisionToolLite.cxx:48
asg
Definition: DataHandleTestTool.h:28
Trig::TrigDecisionToolLite::m_HLTSummaryKeyIn
SG::ReadHandleKey< TrigCompositeUtils::DecisionContainer > m_HLTSummaryKeyIn
Definition: TrigDecisionToolLite.h:121
Trig::TrigDecisionToolLite::initialize
StatusCode initialize()
Dummy implementation of the initialisation function.
Definition: TrigDecisionToolLite.cxx:15
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
TrigCompositeUtils.h
HLT
It used to be useful piece of code for replacing actual SG with other store of similar functionality ...
Definition: HLTResultReader.h:26
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
vector
Definition: MultiHisto.h:13
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
FeatureRequestDescriptor.h
CurrentContext.h
CLID
uint32_t CLID
The Class ID type.
Definition: Event/xAOD/xAODCore/xAODCore/ClassID_traits.h:47
HLT::Identifier
Definition: TrigCompositeUtils/TrigCompositeUtils/HLTIdentifier.h:19
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
python.copyTCTOutput.chains
chains
Definition: copyTCTOutput.py:78
TrigCompositeUtils::DecisionIDContainer
std::set< DecisionID > DecisionIDContainer
Definition: TrigComposite_v1.h:28
Trig::TrigDecisionToolLite::~TrigDecisionToolLite
~TrigDecisionToolLite()=default
Trig::TrigDecisionToolLite::typelessFeatures
virtual std::vector< TrigCompositeUtils::TypelessLinkInfo > typelessFeatures(const Trig::FeatureRequestDescriptor &frd, const CLID clid, const EventContext &ctx) const final
Internal type erased features retrieval implementation call.
Definition: TrigDecisionToolLite.cxx:69
Trig::TrigDecisionToolLite::getEventStore
virtual const asg::EventStoreType * getEventStore() const final
Internal call to obtain event store pointer from concrete tool implementation. Note that evtStore() i...
Definition: TrigDecisionToolLite.cxx:73
ASG_TOOL_CLASS1
#define ASG_TOOL_CLASS1
Definition: AsgToolMacros.h:75
Gaudi
=============================================================================
Definition: CaloGPUClusterAndCellDataMonitorOptions.h:273
TrigCompositeUtils
Definition: Event/xAOD/xAODTrigger/xAODTrigger/TrigComposite.h:19
private
#define private
Definition: xAODTruthCnvAlg.h:20
AsgTool.h
ITrigDecisionToolLite.h
Identifier
Definition: IdentifierFieldParser.cxx:14