CMS 3D CMS Logo

L1GtTechnicalTrigger.cc
Go to the documentation of this file.
1 
15 // this class header
17 
18 // system include files
19 #include <iomanip>
20 
21 // user include files
23 
24 // constructors
26  : m_gtTechnicalTriggerName(""),
27  m_gtTechnicalTriggerBitNumber(0),
28  m_bxInEvent(0),
29  m_gtTechnicalTriggerResult(false) {
30  // empty
31 }
32 
34  const unsigned int ttBitNumber,
35  const int ttBxInEvent,
36  const bool ttResult)
37  : m_gtTechnicalTriggerName(ttName),
38  m_gtTechnicalTriggerBitNumber(ttBitNumber),
39  m_bxInEvent(ttBxInEvent),
40  m_gtTechnicalTriggerResult(ttResult)
41 
42 {
43  // empty
44 }
45 
46 // copy constructor
48  m_gtTechnicalTriggerName = result.m_gtTechnicalTriggerName;
49  m_gtTechnicalTriggerBitNumber = result.m_gtTechnicalTriggerBitNumber;
50  m_bxInEvent = result.m_bxInEvent;
51  m_gtTechnicalTriggerResult = result.m_gtTechnicalTriggerResult;
52 }
53 
54 // destructor
56  // empty now
57 }
58 
59 // assignment operator
61  if (this != &result) {
62  m_gtTechnicalTriggerName = result.m_gtTechnicalTriggerName;
63  m_gtTechnicalTriggerBitNumber = result.m_gtTechnicalTriggerBitNumber;
64  m_bxInEvent = result.m_bxInEvent;
65  m_gtTechnicalTriggerResult = result.m_gtTechnicalTriggerResult;
66  }
67 
68  return *this;
69 }
70 
71 // equal operator
73  if (m_gtTechnicalTriggerName != result.m_gtTechnicalTriggerName) {
74  return false;
75  }
76 
77  if (m_gtTechnicalTriggerBitNumber != result.m_gtTechnicalTriggerBitNumber) {
78  return false;
79  }
80 
81  if (m_bxInEvent != result.m_bxInEvent) {
82  return false;
83  }
84 
85  if (m_gtTechnicalTriggerResult != result.m_gtTechnicalTriggerResult) {
86  return false;
87  }
88 
89  // all members identical
90  return true;
91 }
92 
93 // unequal operator
94 bool L1GtTechnicalTrigger::operator!=(const L1GtTechnicalTrigger& result) const { return !(result == *this); }
95 // methods
96 
97 // set technical trigger name, bit number and result
98 
100 
101 // set decision word
102 void L1GtTechnicalTrigger::setGtTechnicalTriggerBitNumber(const unsigned int ttBitNumber) {
103  m_gtTechnicalTriggerBitNumber = ttBitNumber;
104 }
105 
106 void L1GtTechnicalTrigger::setBxInEvent(const int bxInEventValue) { m_bxInEvent = bxInEventValue; }
107 
109 
110 // pretty print the content of a L1GtTechnicalTrigger
111 void L1GtTechnicalTrigger::print(std::ostream& myCout) const {
112  myCout << std::endl;
113  myCout << std::endl;
114  myCout << "\nTechnical trigger name: " << m_gtTechnicalTriggerName << std::endl;
115  myCout << " bit number" << m_gtTechnicalTriggerBitNumber << std::endl;
116  myCout << " bxInEvent" << m_bxInEvent << std::endl;
117  myCout << " result" << m_gtTechnicalTriggerResult << std::endl;
118 
120 }
121 
122 // output stream operator
123 std::ostream& operator<<(std::ostream& streamRec, const L1GtTechnicalTrigger& result) {
124  result.print(streamRec);
125  return streamRec;
126 }
void setGtTechnicalTriggerResult(const bool ttResult)
unsigned int m_gtTechnicalTriggerBitNumber
void setGtTechnicalTriggerName(const std::string &ttName)
void print(std::ostream &myCout) const
pretty print the content of a L1GtTechnicalTrigger
bool operator==(const L1GtTechnicalTrigger &) const
equal operator
virtual ~L1GtTechnicalTrigger()
destructor
bool operator!=(const L1GtTechnicalTrigger &) const
unequal operator
L1GtTechnicalTrigger()
constructors
void setBxInEvent(const int bxInEventValue)
std::ostream & operator<<(std::ostream &streamRec, const L1GtTechnicalTrigger &result)
void setGtTechnicalTriggerBitNumber(const unsigned int ttBitNumber)
std::string m_gtTechnicalTriggerName
technical trigger name, bit number, bunch cross in the GT event record and result ...
L1GtTechnicalTrigger & operator=(const L1GtTechnicalTrigger &)
assignment operator