Public Member Functions | Private Attributes | Friends | List of all members
triggersim::BasicTrigger Class Reference

#include <BasicTrigger.h>

Public Member Functions

 BasicTrigger (bool trigdecision=false, unsigned int trigtype=kNullTrigger, unsigned int trigsubtype=kNullTrigger, Hardware::HardwareID hardwareid=Hardware::UnknownID)
 
 ~BasicTrigger ()
 
void setTrigType (unsigned int trigtype)
 
unsigned int TrigType () const
 
void setTrigSubType (unsigned int trigsubtype)
 
unsigned int TrigSubType () const
 
void setTrigDecision (bool trigdecision)
 
bool TrigDecision () const
 
void setMetrics (std::vector< double > metrics)
 
void setMetric (double metric)
 
std::vector< double > Metrics () const
 
double Metric (unsigned int i) const
 
void setTrigHardwareID (Hardware::HardwareID hardwareid)
 
Hardware::HardwareID const & TrigHardwareID () const
 

Private Attributes

bool fTrigDecision
 did the trigger algorithm decide to keep this event? More...
 
unsigned int fTrigType
 trigger type (types and subtypes are defined in TriggerTypes.h) More...
 
unsigned int fTrigSubType
 trigger subtype (types and subtypes are defined in TriggerTypes.h) More...
 
Hardware::HardwareID fTrigHardwareID
 
std::vector< double > fMetrics
 a vector to store trigger algorithm performance metrics More...
 

Friends

std::ostream & operator<< (std::ostream &o, BasicTrigger const &bt)
 
bool operator< (BasicTrigger const &a, BasicTrigger const &b)
 

Detailed Description

Definition at line 29 of file BasicTrigger.h.

Constructor & Destructor Documentation

triggersim::BasicTrigger::BasicTrigger ( bool  trigdecision = false,
unsigned int  trigtype = kNullTrigger,
unsigned int  trigsubtype = kNullTrigger,
Hardware::HardwareID  hardwareid = Hardware::UnknownID 
)

Definition at line 20 of file BasicTrigger.cxx.

23  :
24  fTrigDecision(trigdecision),
25  fTrigType(trigtype),
26  fTrigSubType(trigsubtype),
27  fTrigHardwareID(hardwareid)
28  {}
unsigned int fTrigType
trigger type (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:74
unsigned int fTrigSubType
trigger subtype (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:75
Hardware::HardwareID fTrigHardwareID
Definition: BasicTrigger.h:76
bool fTrigDecision
did the trigger algorithm decide to keep this event?
Definition: BasicTrigger.h:73
triggersim::BasicTrigger::~BasicTrigger ( )

Definition at line 33 of file BasicTrigger.cxx.

34  {}

Member Function Documentation

double triggersim::BasicTrigger::Metric ( unsigned int  i) const

Definition at line 111 of file BasicTrigger.cxx.

112  {
113  if(fMetrics.size() > i) return fMetrics[i];
114  else {
115  std::cout << "\n\n\nWARNING!!! Requested metric index is larger than the size of fMetrics!!!\n\n\n";
116  return 0;
117  }
118  }
std::vector< double > fMetrics
a vector to store trigger algorithm performance metrics
Definition: BasicTrigger.h:78
std::vector< double > triggersim::BasicTrigger::Metrics ( ) const

Definition at line 103 of file BasicTrigger.cxx.

104  {
105  return fMetrics;
106  }
std::vector< double > fMetrics
a vector to store trigger algorithm performance metrics
Definition: BasicTrigger.h:78
void triggersim::BasicTrigger::setMetric ( double  metric)

Definition at line 95 of file BasicTrigger.cxx.

96  {
97  fMetrics.push_back(metric);
98  }
std::vector< double > fMetrics
a vector to store trigger algorithm performance metrics
Definition: BasicTrigger.h:78
void triggersim::BasicTrigger::setMetrics ( std::vector< double >  metrics)

Definition at line 87 of file BasicTrigger.cxx.

88  {
89  fMetrics = metrics;
90  }
std::vector< double > fMetrics
a vector to store trigger algorithm performance metrics
Definition: BasicTrigger.h:78
metrics
Definition: train.py:350
void triggersim::BasicTrigger::setTrigDecision ( bool  trigdecision)

Definition at line 71 of file BasicTrigger.cxx.

72  {
73  fTrigDecision = trigdecision;
74  }
bool fTrigDecision
did the trigger algorithm decide to keep this event?
Definition: BasicTrigger.h:73
void triggersim::BasicTrigger::setTrigHardwareID ( Hardware::HardwareID  hardwareid)
inline

Definition at line 60 of file BasicTrigger.h.

60 { fTrigHardwareID = hardwareid; }
Hardware::HardwareID fTrigHardwareID
Definition: BasicTrigger.h:76
void triggersim::BasicTrigger::setTrigSubType ( unsigned int  trigsubtype)

Definition at line 55 of file BasicTrigger.cxx.

56  {
57  fTrigSubType = trigsubtype;
58  }
unsigned int fTrigSubType
trigger subtype (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:75
void triggersim::BasicTrigger::setTrigType ( unsigned int  trigtype)

Definition at line 39 of file BasicTrigger.cxx.

40  {
41  fTrigType = trigtype;
42  }
unsigned int fTrigType
trigger type (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:74
bool triggersim::BasicTrigger::TrigDecision ( ) const

Definition at line 79 of file BasicTrigger.cxx.

80  {
81  return fTrigDecision;
82  }
bool fTrigDecision
did the trigger algorithm decide to keep this event?
Definition: BasicTrigger.h:73
Hardware::HardwareID const& triggersim::BasicTrigger::TrigHardwareID ( ) const
inline

Definition at line 61 of file BasicTrigger.h.

61 { return fTrigHardwareID; }
Hardware::HardwareID fTrigHardwareID
Definition: BasicTrigger.h:76
unsigned int triggersim::BasicTrigger::TrigSubType ( ) const

Definition at line 63 of file BasicTrigger.cxx.

64  {
65  return fTrigSubType;
66  }
unsigned int fTrigSubType
trigger subtype (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:75
unsigned int triggersim::BasicTrigger::TrigType ( ) const

Definition at line 47 of file BasicTrigger.cxx.

48  {
49  return fTrigType;
50  }
unsigned int fTrigType
trigger type (types and subtypes are defined in TriggerTypes.h)
Definition: BasicTrigger.h:74

Friends And Related Function Documentation

bool operator< ( BasicTrigger const &  a,
BasicTrigger const &  b 
)
friend

Definition at line 141 of file BasicTrigger.cxx.

141  {
142 
143  return a.TrigType() < b.TrigType();
144 
145  }
const double a
static bool * b
Definition: config.cpp:1043
std::ostream& operator<< ( std::ostream &  o,
BasicTrigger const &  bt 
)
friend

Definition at line 126 of file BasicTrigger.cxx.

126  {
127 
128  o << "Trigger Type = " << bt.TrigType() << std::endl;
129  o << "Trigger Sub-Type = " << bt.TrigSubType() << std::endl;
130  o << "Trigger Decision = " << bt.TrigDecision() << std::endl;
131  o << "Trigger HardwareID = " << bt.fTrigHardwareID << std::endl;
132  return o;
133 
134  }
bt
Definition: tracks.py:83
QTextStream & endl(QTextStream &s)

Member Data Documentation

std::vector<double> triggersim::BasicTrigger::fMetrics
private

a vector to store trigger algorithm performance metrics

Definition at line 78 of file BasicTrigger.h.

bool triggersim::BasicTrigger::fTrigDecision
private

did the trigger algorithm decide to keep this event?

Definition at line 73 of file BasicTrigger.h.

Hardware::HardwareID triggersim::BasicTrigger::fTrigHardwareID
private

Definition at line 76 of file BasicTrigger.h.

unsigned int triggersim::BasicTrigger::fTrigSubType
private

trigger subtype (types and subtypes are defined in TriggerTypes.h)

Definition at line 75 of file BasicTrigger.h.

unsigned int triggersim::BasicTrigger::fTrigType
private

trigger type (types and subtypes are defined in TriggerTypes.h)

Definition at line 74 of file BasicTrigger.h.


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