ATLAS Offline Software
Loading...
Searching...
No Matches
Trig::ExpertMethods Class Reference

#include <ExpertMethods.h>

Inheritance diagram for Trig::ExpertMethods:
Collaboration diagram for Trig::ExpertMethods:

Public Member Functions

 ExpertMethods (SG::SlotSpecificObj< Trig::CacheGlobalMemory > *m_cacheGlobalMemory)
virtual ~ExpertMethods ()
const TrigConf::TriggerItemgetItemConfigurationDetails (const std::string &chain) const
 return TrigConf::TriggerItem
const TrigConf::HLTChaingetChainConfigurationDetails (const std::string &chain) const
 return TrigConf::HLTChain
const LVL1CTP::Lvl1ItemgetItemDetails (const std::string &chain) const
 return LVL1CTP::Lvl1Item
const HLT::ChaingetChainDetails (const std::string &chain) const
 return HLT::Chain
const HLT::NavigationCoregetNavigation () const
 return HLT::NavigationCore
bool isHLTTruncated () const
 Returns true if HLT result is truncated.
MsgStream & msg () const
MsgStream & msg (const MSG::Level lvl) const
bool msgLvl (const MSG::Level lvl) const

Private Member Functions

const Trig::CacheGlobalMemorycgm (bool onlyConfig=false) const

Private Attributes

SG::SlotSpecificObj< Trig::CacheGlobalMemory > * m_cacheGlobalMemory

Static Private Attributes

static asg::AsgTool *s_logger ATLAS_THREAD_SAFE {nullptr}

Detailed Description

Definition at line 49 of file ExpertMethods.h.

Constructor & Destructor Documentation

◆ ExpertMethods()

Trig::ExpertMethods::ExpertMethods ( SG::SlotSpecificObj< Trig::CacheGlobalMemory > * m_cacheGlobalMemory)

Definition at line 39 of file ExpertMethods.cxx.

41{
42}
SG::SlotSpecificObj< Trig::CacheGlobalMemory > * m_cacheGlobalMemory
const Trig::CacheGlobalMemory * cgm(bool onlyConfig=false) const

◆ ~ExpertMethods()

Trig::ExpertMethods::~ExpertMethods ( )
virtual

Definition at line 44 of file ExpertMethods.cxx.

44{}

Member Function Documentation

◆ cgm()

const Trig::CacheGlobalMemory * Trig::ExpertMethods::cgm ( bool onlyConfig = false) const
private

Definition at line 67 of file ExpertMethods.cxx.

67 {
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}
#define ATH_MSG_WARNING(x)
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130

◆ getChainConfigurationDetails()

const TrigConf::HLTChain * Trig::ExpertMethods::getChainConfigurationDetails ( const std::string & chain) const

return TrigConf::HLTChain

Parameters
chainname of the chain

Definition at line 53 of file ExpertMethods.cxx.

53 {
54 ATH_MSG_VERBOSE("getting chain configuration details for: " << chain);
55 return cgm(true)->config_chain(chain);
56}
#define ATH_MSG_VERBOSE(x)
const TrigConf::HLTChain * config_chain(const std::string &name) const
HLT config chain from given name.

◆ getChainDetails()

const HLT::Chain * Trig::ExpertMethods::getChainDetails ( const std::string & chain) const

return HLT::Chain

Parameters
chainname of the chain

Definition at line 59 of file ExpertMethods.cxx.

59 {
60 return cgm()->chain(chain);
61}
const HLT::Chain * chain(const std::string &name) const
HLT chain object from given name (0 pointer returned if no match)

◆ getItemConfigurationDetails()

const TrigConf::TriggerItem * Trig::ExpertMethods::getItemConfigurationDetails ( const std::string & chain) const

return TrigConf::TriggerItem

Parameters
chainname of the item

Definition at line 47 of file ExpertMethods.cxx.

47 {
48 ATH_MSG_VERBOSE("getting L1 item configuration details for: " << chain);
49 return cgm(true)->config_item(chain);
50}
const TrigConf::TriggerItem * config_item(const std::string &name) const
CTP config item from given name.

◆ getItemDetails()

const LVL1CTP::Lvl1Item * Trig::ExpertMethods::getItemDetails ( const std::string & chain) const

return LVL1CTP::Lvl1Item

Parameters
chainname of the item

Definition at line 63 of file ExpertMethods.cxx.

63 {
64 return cgm()->item(chain);
65}
const LVL1CTP::Lvl1Item * item(const std::string &name) const
CTP item from given name.

◆ getNavigation()

const HLT::NavigationCore * Trig::ExpertMethods::getNavigation ( ) const

return HLT::NavigationCore

Definition at line 81 of file ExpertMethods.cxx.

82{
83 return dynamic_cast<const HLT::NavigationCore*>(cgm()->navigation());
84}
const HLT::TrigNavStructure * navigation() const

◆ isHLTTruncated()

bool Trig::ExpertMethods::isHLTTruncated ( ) const

Returns true if HLT result is truncated.

This refers only to L2 for the time beeing. Pure convenience method.

Definition at line 105 of file ExpertMethods.cxx.

105 {
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}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool empty() const
Test if the key is blank.
const SG::ReadHandleKey< xAOD::TrigDecision > * xAODTrigDecisionKey() const
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())

◆ msg() [1/2]

MsgStream & Trig::Logger::msg ( ) const
inlineinherited

Definition at line 29 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h.

29 {
30 if (s_logger) return s_logger->msg();
31 else throw std::runtime_error("TrigDecisionTool Logger not initialized.");
32 }

◆ msg() [2/2]

MsgStream & Trig::Logger::msg ( const MSG::Level lvl) const
inlineinherited

◆ msgLvl()

bool Trig::Logger::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 34 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h.

34{ return s_logger && s_logger->msgLvl(lvl); }

Member Data Documentation

◆ ATLAS_THREAD_SAFE

asg::AsgTool* s_logger Trig::Logger::ATLAS_THREAD_SAFE {nullptr}
inlinestaticprivateinherited

Definition at line 38 of file Trigger/TrigAnalysis/TrigDecisionTool/TrigDecisionTool/Logger.h.

38{nullptr};

◆ m_cacheGlobalMemory

SG::SlotSpecificObj<Trig::CacheGlobalMemory>* Trig::ExpertMethods::m_cacheGlobalMemory
private

Definition at line 97 of file ExpertMethods.h.


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