ATLAS Offline Software
Loading...
Searching...
No Matches
DerivationFramework::TriggerSkimmingTool Class Reference

#include <TriggerSkimmingTool.h>

Inheritance diagram for DerivationFramework::TriggerSkimmingTool:
Collaboration diagram for DerivationFramework::TriggerSkimmingTool:

Public Member Functions

 TriggerSkimmingTool (const std::string &t, const std::string &n, const IInterface *p)
bool eventPassesFilter () const override
StatusCode initialize () override

Private Attributes

Gaudi::Property< std::vector< std::string > > m_triggerListAND {this,"TriggerListAND", {}}
Gaudi::Property< std::vector< std::string > > m_triggerListOR {this,"TriggerListOR", {}}
Gaudi::Property< std::vector< std::string > > m_triggerListORHLTOnly {this,"TriggerListORHLTOnly", {}, "Decision is based on HLT only (unseeded triggers)"}
PublicToolHandle< Trig::TrigDecisionToolm_trigDec {this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"}

Detailed Description

Definition at line 20 of file TriggerSkimmingTool.h.

Constructor & Destructor Documentation

◆ TriggerSkimmingTool()

DerivationFramework::TriggerSkimmingTool::TriggerSkimmingTool ( const std::string & t,
const std::string & n,
const IInterface * p )

Definition at line 23 of file TriggerSkimmingTool.cxx.

25 :
26 base_class(t,n,p) {
27
28 }

Member Function Documentation

◆ eventPassesFilter()

bool DerivationFramework::TriggerSkimmingTool::eventPassesFilter ( ) const
override

Definition at line 38 of file TriggerSkimmingTool.cxx.

39 {
40
41 if (msgLvl(MSG::VERBOSE)){
42 const Trig::ChainGroup* Chain = m_trigDec->getChainGroup(".*");
43 const std::vector<std::string> fired_triggers = Chain->getListOfTriggers();
44 for (const std::string& fired : fired_triggers) {
45 if (m_trigDec->isPassed(fired)) ATH_MSG_VERBOSE("Fired trigger "<<fired);
46 }
47 }
48
49 unsigned int cntrAND{0}, cntrOR{0}, cntrORHLTOnly{0};
50 for (const std::string& trig_and : m_triggerListAND) {
51 ATH_MSG_DEBUG("AND - Trigger "<<trig_and<<" passed "<<m_trigDec->isPassed(trig_and));
52 cntrAND+=(m_trigDec->isPassed(trig_and));
53 }
54 for (const std::string& trig_or : m_triggerListOR) {
55 ATH_MSG_DEBUG("OR - Trigger "<<trig_or<<" passed "<<m_trigDec->isPassed(trig_or));
56 cntrOR +=(m_trigDec->isPassed(trig_or));
57 }
58 for (const std::string& trig_orhltonly : m_triggerListORHLTOnly) {
59 ATH_MSG_DEBUG("ORHLTOnly - Trigger "<<trig_orhltonly<<" passed "<<m_trigDec->isPassed(trig_orhltonly, TrigDefs::requireDecision));
60 cntrORHLTOnly +=(m_trigDec->isPassed(trig_orhltonly, TrigDefs::requireDecision));
61 }
62
63 bool passAND = (cntrAND==m_triggerListAND.size() && !m_triggerListAND.empty());
64 bool passOR = (cntrOR > 0);
65 bool passORHLTOnly = (cntrORHLTOnly > 0);
66
67 bool pass = passAND || passOR || passORHLTOnly;
68 return pass;
69 }
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
Gaudi::Property< std::vector< std::string > > m_triggerListAND
Gaudi::Property< std::vector< std::string > > m_triggerListOR
PublicToolHandle< Trig::TrigDecisionTool > m_trigDec
Gaudi::Property< std::vector< std::string > > m_triggerListORHLTOnly
std::vector< std::string > getListOfTriggers() const

◆ initialize()

StatusCode DerivationFramework::TriggerSkimmingTool::initialize ( )
override

Definition at line 30 of file TriggerSkimmingTool.cxx.

31 {
32 ATH_CHECK(m_trigDec.retrieve());
33 return StatusCode::SUCCESS;
34 }
#define ATH_CHECK
Evaluate an expression and check for errors.

Member Data Documentation

◆ m_trigDec

PublicToolHandle<Trig::TrigDecisionTool> DerivationFramework::TriggerSkimmingTool::m_trigDec {this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"}
private

Definition at line 31 of file TriggerSkimmingTool.h.

31{this, "TrigDecisionTool", "Trig::TrigDecisionTool/TrigDecisionTool"};

◆ m_triggerListAND

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListAND {this,"TriggerListAND", {}}
private

Definition at line 28 of file TriggerSkimmingTool.h.

28{this,"TriggerListAND", {}};

◆ m_triggerListOR

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListOR {this,"TriggerListOR", {}}
private

Definition at line 29 of file TriggerSkimmingTool.h.

29{this,"TriggerListOR", {}};

◆ m_triggerListORHLTOnly

Gaudi::Property<std::vector<std::string> > DerivationFramework::TriggerSkimmingTool::m_triggerListORHLTOnly {this,"TriggerListORHLTOnly", {}, "Decision is based on HLT only (unseeded triggers)"}
private

Definition at line 30 of file TriggerSkimmingTool.h.

30{this,"TriggerListORHLTOnly", {}, "Decision is based on HLT only (unseeded triggers)"};

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