ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
TrigAnalysisTest::BasicTriggerFired Class Reference

#include <BasicTriggerFired.h>

Inheritance diagram for TrigAnalysisTest::BasicTriggerFired:
Collaboration diagram for TrigAnalysisTest::BasicTriggerFired:

Public Member Functions

 BasicTriggerFired ()
 
void processEvent (Trig::TrigDecisionTool &trigDecTool)
 
int finalize ()
 
void setEventStore (EventPtr_t store)
 
EventPtr_t eventStore ()
 

Private Attributes

unsigned int m_passed_l1
 
unsigned int m_passed_hlt
 
bool m_first_call
 
std::map< std::string, int > m_trigger_counts
 
EventPtr_t m_eventStore = nullptr
 

Detailed Description

Definition at line 16 of file BasicTriggerFired.h.

Constructor & Destructor Documentation

◆ BasicTriggerFired()

TrigAnalysisTest::BasicTriggerFired::BasicTriggerFired ( )

Definition at line 34 of file BasicTriggerFired.cxx.

35  : m_passed_l1(0),
36  m_passed_hlt(0),
37  m_first_call(true)
38  {
39  }

Member Function Documentation

◆ eventStore()

EventPtr_t TrigAnalysisTest::ITest::eventStore ( )
inlineinherited

Definition at line 29 of file ITest.h.

29 { return m_eventStore; }

◆ finalize()

int TrigAnalysisTest::BasicTriggerFired::finalize ( )
virtual

Implements TrigAnalysisTest::ITest.

Definition at line 65 of file BasicTriggerFired.cxx.

66  {
67  // Dump for debugging.
68  cout << "L1 triggers passed: " << m_passed_l1 << endl;
69  cout << "HLT triggers passed; " << m_passed_hlt << endl;
70  cout << "START SUMMARY: BasicTriggerFired" << endl;
71  for (auto it = m_trigger_counts.begin(); it!=m_trigger_counts.end(); it++)
72  cout << (*it).first << "\t" << (*it).second <<endl;
73  cout << "END SUMMARY : BasicTriggerFired" << endl;
74 
75  // Good run if we found a trigger!
76  return (m_passed_l1 > 0 && m_passed_hlt > 0) ? 0 : 1;
77  }

◆ processEvent()

void TrigAnalysisTest::BasicTriggerFired::processEvent ( Trig::TrigDecisionTool trigDecTool)
virtual

Implements TrigAnalysisTest::ITest.

Definition at line 42 of file BasicTriggerFired.cxx.

42  {
43 
44  // Did we pass a trigger level?
45  if (trigDecTool.isPassed("L1_.*"))
46  m_passed_l1++;
47  if (trigDecTool.isPassed("HLT_.*"))
48  m_passed_hlt++;
49 
50  // Dump for debugging the test
51  if (m_first_call) {
52  dumpTriggerInfo(trigDecTool);
53  m_first_call = false;
54  }
55  auto chainGroups = trigDecTool.getChainGroup(".*");
56  for(auto &trig : chainGroups->getListOfTriggers()) {
57  if(!m_trigger_counts.count(trig))
58  m_trigger_counts[trig] = 0;
59  if(trigDecTool.isPassed(trig))
60  m_trigger_counts[trig] += 1;
61  }
62  }

◆ setEventStore()

void TrigAnalysisTest::ITest::setEventStore ( EventPtr_t  store)
inlineinherited

Definition at line 28 of file ITest.h.

28 { m_eventStore = store; }

Member Data Documentation

◆ m_eventStore

EventPtr_t TrigAnalysisTest::ITest::m_eventStore = nullptr
privateinherited

Definition at line 31 of file ITest.h.

◆ m_first_call

bool TrigAnalysisTest::BasicTriggerFired::m_first_call
private

Definition at line 26 of file BasicTriggerFired.h.

◆ m_passed_hlt

unsigned int TrigAnalysisTest::BasicTriggerFired::m_passed_hlt
private

Definition at line 25 of file BasicTriggerFired.h.

◆ m_passed_l1

unsigned int TrigAnalysisTest::BasicTriggerFired::m_passed_l1
private

Definition at line 24 of file BasicTriggerFired.h.

◆ m_trigger_counts

std::map<std::string,int> TrigAnalysisTest::BasicTriggerFired::m_trigger_counts
private

Definition at line 27 of file BasicTriggerFired.h.


The documentation for this class was generated from the following files:
store
StoreGateSvc * store
Definition: fbtTestBasics.cxx:71
TrigAnalysisTest::BasicTriggerFired::m_passed_l1
unsigned int m_passed_l1
Definition: BasicTriggerFired.h:24
skel.it
it
Definition: skel.GENtoEVGEN.py:396
TrigAnalysisTest::ITest::m_eventStore
EventPtr_t m_eventStore
Definition: ITest.h:31
TrigAnalysisTest::BasicTriggerFired::m_first_call
bool m_first_call
Definition: BasicTriggerFired.h:26
Trig::TrigDecisionTool::isPassed
virtual bool isPassed(const std::string &chain, unsigned int condition) const
true if given chain passed
Definition: TrigDecisionTool.cxx:270
TrigAnalysisTest::BasicTriggerFired::m_trigger_counts
std::map< std::string, int > m_trigger_counts
Definition: BasicTriggerFired.h:27
Trig::TrigDecisionToolCore::getChainGroup
const Trig::ChainGroup * getChainGroup(const std::vector< std::string > &patterns, TrigDefs::Group props=TrigDefs::Group::Default) const
Create/get chain group (.
Definition: ChainGroupFunctions.cxx:38
TrigAnalysisTest::BasicTriggerFired::m_passed_hlt
unsigned int m_passed_hlt
Definition: BasicTriggerFired.h:25
dumpTriggerInfo
Definition: dumpTriggerInfo.py:1