ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigAnalysis
TrigDecisionTool
Root
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>
19
#include "
TrigDecisionTool/ExpertMethods.h
"
20
21
#ifndef XAOD_ANALYSIS
// Full athena
22
#include "
TrigSteeringEvent/HLTResult.h
"
23
#include "
TrigNavigation/AccessProxy.h
"
24
#endif
25
26
#include "
AsgDataHandles/ReadHandle.h
"
27
28
#include "
TrigSteeringEvent/Chain.h
"
29
#include "
TrigConfHLTData/HLTSignature.h
"
30
#include "
TrigConfHLTData/HLTTriggerElement.h
"
31
32
#include "
TrigDecisionTool/TDTUtilities.h
"
33
#include "
TrigDecisionTool/CacheGlobalMemory.h
"
34
#include "
TrigDecisionTool/Logger.h
"
35
36
#include "
xAODTrigger/TrigDecision.h
"
37
38
39
Trig::ExpertMethods::ExpertMethods
(
SG::SlotSpecificObj<Trig::CacheGlobalMemory>
*
cgm
)
40
:
m_cacheGlobalMemory
(
cgm
)
41
{
42
}
43
44
Trig::ExpertMethods::~ExpertMethods
() {}
45
46
const
TrigConf::TriggerItem
*
47
Trig::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
52
const
TrigConf::HLTChain
*
53
Trig::ExpertMethods::getChainConfigurationDetails
(
const
std::string& chain)
const
{
54
ATH_MSG_VERBOSE
(
"getting chain configuration details for: "
<< chain);
55
return
cgm
(
true
)->config_chain(chain);
56
}
57
58
59
const
HLT::Chain
*
Trig::ExpertMethods::getChainDetails
(
const
std::string& chain)
const
{
60
return
cgm
()->chain(chain);
61
}
62
63
const
LVL1CTP::Lvl1Item
*
Trig::ExpertMethods::getItemDetails
(
const
std::string& chain)
const
{
64
return
cgm
()->item(chain);
65
}
66
67
const
Trig::CacheGlobalMemory
*
Trig::ExpertMethods::cgm
(
bool
onlyConfig)
const
{
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
81
const
HLT::NavigationCore
*
Trig::ExpertMethods::getNavigation
()
const
82
{
83
return
dynamic_cast<
const
HLT::NavigationCore
*
>
(
cgm
()->navigation());
84
}
85
86
#else
// AthAnalysis only sub-part
87
88
const
HLT::TrigNavStructure
*
Trig::ExpertMethods::getNavigation
()
const
89
{
90
return
dynamic_cast<
const
HLT::TrigNavStructure
*
>
(cgm()->navigation());
91
}
92
93
#endif
// NOTE: End of nested ifndef
94
95
#else
// AnalysisBase
96
97
const
HLT::TrigNavStructure
*
Trig::ExpertMethods::getNavigation
()
const
98
{
99
return
cgm()->navigation();
100
}
101
102
#endif
103
104
105
bool
Trig::ExpertMethods::isHLTTruncated
()
const
{
106
107
const
SG::ReadHandleKey<xAOD::TrigDecision>
* trigDecRH =
cgm
()->xAODTrigDecisionKey();
108
if
(trigDecRH && !trigDecRH->
empty
()) {
109
SG::ReadHandle<xAOD::TrigDecision>
trigDec =
SG::makeHandle
(*trigDecRH);
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
}
AccessProxy.h
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition
AthMsgStreamMacros.h:33
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition
AthMsgStreamMacros.h:28
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition
AthMsgStreamMacros.h:32
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition
AthMsgStreamMacros.h:29
ReadHandle.h
Handle class for reading from StoreGate.
CacheGlobalMemory.h
Chain.h
TrigDecision.h
ExpertMethods.h
HLTResult.h
HLTSignature.h
HLTTriggerElement.h
TDTUtilities.h
Logger.h
HLT::Chain
This class represents one chain of signatures, i.e.
Definition
Chain.h:61
HLT::NavigationCore
The NavigationCore class, adds on top of the TrigNavStructure the EDM read-only handling.
Definition
NavigationCore.h:95
HLT::TrigNavStructure
Definition
TrigNavStructure.h:40
LVL1CTP::Lvl1Item
Definition
Lvl1Item.h:32
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
SG::ReadHandle
Definition
StoreGate/StoreGate/ReadHandle.h:67
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
SG::SlotSpecificObj
Maintain a set of objects, one per slot.
Definition
AthenaKernel/AthenaKernel/SlotSpecificObj.h:84
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition
AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
TrigConf::HLTChain
HLT chain configuration information.
Definition
TrigConfHLTData/TrigConfHLTData/HLTChain.h:35
TrigConf::TriggerItem
Definition
TriggerItem.h:26
Trig::CacheGlobalMemory
Definition
CacheGlobalMemory.h:67
Trig::ExpertMethods::ExpertMethods
ExpertMethods(SG::SlotSpecificObj< Trig::CacheGlobalMemory > *m_cacheGlobalMemory)
Definition
ExpertMethods.cxx:39
Trig::ExpertMethods::m_cacheGlobalMemory
SG::SlotSpecificObj< Trig::CacheGlobalMemory > * m_cacheGlobalMemory
Definition
ExpertMethods.h:97
Trig::ExpertMethods::cgm
const Trig::CacheGlobalMemory * cgm(bool onlyConfig=false) const
Definition
ExpertMethods.cxx:67
Trig::ExpertMethods::getItemDetails
const LVL1CTP::Lvl1Item * getItemDetails(const std::string &chain) const
return LVL1CTP::Lvl1Item
Definition
ExpertMethods.cxx:63
Trig::ExpertMethods::getItemConfigurationDetails
const TrigConf::TriggerItem * getItemConfigurationDetails(const std::string &chain) const
return TrigConf::TriggerItem
Definition
ExpertMethods.cxx:47
Trig::ExpertMethods::~ExpertMethods
virtual ~ExpertMethods()
Definition
ExpertMethods.cxx:44
Trig::ExpertMethods::getNavigation
const HLT::NavigationCore * getNavigation() const
return HLT::NavigationCore
Definition
ExpertMethods.cxx:81
Trig::ExpertMethods::isHLTTruncated
bool isHLTTruncated() const
Returns true if HLT result is truncated.
Definition
ExpertMethods.cxx:105
Trig::ExpertMethods::getChainDetails
const HLT::Chain * getChainDetails(const std::string &chain) const
return HLT::Chain
Definition
ExpertMethods.cxx:59
Trig::ExpertMethods::getChainConfigurationDetails
const TrigConf::HLTChain * getChainConfigurationDetails(const std::string &chain) const
return TrigConf::HLTChain
Definition
ExpertMethods.cxx:53
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition
hcg.cxx:132
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition
ReadCondHandle.h:269
Generated on
for ATLAS Offline Software by
1.17.0