ATLAS Offline Software
Loading...
Searching...
No Matches
ExpertMethods.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3*/
4
5/**********************************************************************************
6 * @Project: TrigDecisionTool
7 * @Package: TrigDecisionTool
8 * @Class : DecisionAnalysis
9 *
10 * @brief access to information about the trigger decision
11 *
12 * @author Michael Begel <michael.begel@cern.ch> - Brookhaven National Laboratory
13 * @author Nicolas Berger <Nicolas.Berger@cern.ch> - LAPP Annecy
14 *
15 ***********************************************************************************/
16
17#include <vector>
18#include <exception>
20
21#ifndef XAOD_ANALYSIS // Full athena
24#endif
25
27
31
35
37
38
43
45
47Trig::ExpertMethods::getItemConfigurationDetails(const std::string& chain) const {
48 ATH_MSG_VERBOSE("getting L1 item configuration details for: " << chain);
49 return cgm(true)->config_item(chain);
50}
51
54 ATH_MSG_VERBOSE("getting chain configuration details for: " << chain);
55 return cgm(true)->config_chain(chain);
56}
57
58
59const HLT::Chain* Trig::ExpertMethods::getChainDetails(const std::string& chain) const {
60 return cgm()->chain(chain);
61}
62
63const LVL1CTP::Lvl1Item* Trig::ExpertMethods::getItemDetails(const std::string& chain) const {
64 return cgm()->item(chain);
65}
66
68 if ( ! onlyConfig ) {
69 if ( !std::as_const(m_cacheGlobalMemory)->get()->assert_decision() ) {
70 ATH_MSG_WARNING("TDT has not ben able to unpack trigger decision");
71 }
72 }
73 return std::as_const(m_cacheGlobalMemory)->get();
74}
75
76#ifndef XAOD_STANDALONE // AthAnalysis or full Athena
77
78// NOTE: Nested ifndef
79#ifndef XAOD_ANALYSIS // Full Athena only sub-part
80
82{
83 return dynamic_cast<const HLT::NavigationCore*>(cgm()->navigation());
84}
85
86#else // AthAnalysis only sub-part
87
89{
90 return dynamic_cast<const HLT::TrigNavStructure*>(cgm()->navigation());
91}
92
93#endif // NOTE: End of nested ifndef
94
95#else // AnalysisBase
96
98{
99 return cgm()->navigation();
100}
101
102#endif
103
104
106
107 const SG::ReadHandleKey<xAOD::TrigDecision>* trigDecRH = cgm()->xAODTrigDecisionKey();
108 if (trigDecRH && !trigDecRH->empty()) {
110 if(!trigDec.isValid()) {
111 ATH_MSG_DEBUG("TDT has not been able to retrieve xTrigDecision");
112 } else {
113 return trigDec->efTruncated();
114 }
115 }
116
117#ifndef XAOD_ANALYSIS // Full Athena only
118 SG::ReadHandle<HLT::HLTResult> hltResult("HLTResult_HLT");
119 if(!hltResult.isValid()) {
120 ATH_MSG_WARNING("TDT has not ben able to get HLTResult_HLT");
121 return false;
122 }
123 return hltResult->isHLTResultTruncated();
124#else // AnalysisBase or AthAnalysis
125 ATH_MSG_ERROR("isHLTTruncated only supported with a xAOD::TrigDecision ReadHandle (Runs 2,3) or in full Athena (Run 2)");
126 return false;
127#endif
128
129}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Handle class for reading from StoreGate.
This class represents one chain of signatures, i.e.
Definition Chain.h:64
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
Property holding a SG store/key/clid from which a ReadHandle is made.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
Maintain a set of objects, one per slot.
bool empty() const
Test if the key is blank.
HLT chain configuration information.
ExpertMethods(SG::SlotSpecificObj< Trig::CacheGlobalMemory > *m_cacheGlobalMemory)
SG::SlotSpecificObj< Trig::CacheGlobalMemory > * m_cacheGlobalMemory
const Trig::CacheGlobalMemory * cgm(bool onlyConfig=false) const
const LVL1CTP::Lvl1Item * getItemDetails(const std::string &chain) const
return LVL1CTP::Lvl1Item
const TrigConf::TriggerItem * getItemConfigurationDetails(const std::string &chain) const
return TrigConf::TriggerItem
const HLT::NavigationCore * getNavigation() const
return HLT::NavigationCore
bool isHLTTruncated() const
Returns true if HLT result is truncated.
const HLT::Chain * getChainDetails(const std::string &chain) const
return HLT::Chain
const TrigConf::HLTChain * getChainConfigurationDetails(const std::string &chain) const
return TrigConf::HLTChain
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())