CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DTLocalTrigger.cc
Go to the documentation of this file.
1 
8 
9 using namespace std;
10 
11 DTLocalTrigger::DTLocalTrigger(int eventBx, int bx, int data) : theEventBX(eventBx), theBX(bx), theData(data) {}
12 
13 DTLocalTrigger::DTLocalTrigger() : theEventBX(0), theBX(0), theData(0) {}
14 
15 // Comparison
16 bool DTLocalTrigger::operator==(const DTLocalTrigger& trig) const {
17  if (theBX != trig.bx() || this->quality() != trig.quality())
18  return false;
19  return true;
20 }
21 
22 // Getters
23 
24 uint16_t DTLocalTrigger::bx() const { return theBX; }
25 
26 uint16_t DTLocalTrigger::quality() const { return ((theData & 0xE) >> 1); }
27 uint16_t DTLocalTrigger::trTheta() const { return ((theData & 0x30) >> 4); }
28 
29 bool DTLocalTrigger::secondTrack() const { return (theData & 0x1); }
30 bool DTLocalTrigger::trOut() const { return ((theData & 0x40) >> 6); }
31 
32 // Setters ??
33 
34 // Debug
35 
36 void DTLocalTrigger::print() const {
37  cout << " trigger at BX " << bx() << ": " << theData;
38  if (secondTrack())
39  cout << " IT IS A SECOND TRACK !! ";
40  cout << " Quality " << quality();
41  if (trTheta() == 1)
42  cout << " with a low Theta trigger ";
43  if (trTheta() == 3)
44  cout << " with a high Theta trigger ";
45  if (trOut())
46  cout << " Trigger Out set ";
47  cout << endl;
48 }
49 
50 uint16_t DTLocalTrigger::eventBx() const { return theEventBX; }
uint16_t quality() const
uint16_t theData
bool trOut() const
uint16_t trTheta() const
bool operator==(const DTLocalTrigger &trig) const
triggers are equal if they are in the same chamber and have same BX count (??)
uint16_t theEventBX
DTLocalTrigger()
Default construction.
void print() const
Print content of trigger.
bool secondTrack() const
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
tuple cout
Definition: gather_cfg.py:144
uint16_t bx() const
uint16_t eventBx() const