CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DTLocalTrigger.cc
Go to the documentation of this file.
1 
9 
10 
11 using namespace std;
12 
13 
14 DTLocalTrigger::DTLocalTrigger (int eventBx, int bx, int data) :
15  theEventBX(eventBx),
16  theBX (bx),
17  theData(data)
18 {}
19 
20 
22  theEventBX(0),
23  theBX (0),
24  theData(0)
25 {}
26 
27 
28 // Comparison
30  if ( theBX != trig.bx() ||
31  this->quality() != trig.quality() ) return false;
32  return true;
33 }
34 
35 // Getters
36 
37 
38 uint16_t DTLocalTrigger::bx() const { return theBX; }
39 
40 uint16_t DTLocalTrigger::quality() const {
41  return ( (theData & 0xE) >> 1 );
42 }
43 uint16_t DTLocalTrigger::trTheta() const {
44  return ( (theData & 0x30) >> 4 );
45 }
46 
48  return ( theData & 0x1 );
49 }
50 bool DTLocalTrigger::trOut() const {
51  return ( (theData & 0x40) >> 6 );
52 }
53 
54 // Setters ??
55 
56 // Debug
57 
58 void
60  cout << " trigger at BX "<<bx()<<": "<<theData;
61  if (secondTrack())
62  cout << " IT IS A SECOND TRACK !! ";
63  cout << " Quality "<<quality();
64  if (trTheta() == 1)
65  cout << " with a low Theta trigger ";
66  if (trTheta() == 3)
67  cout << " with a high Theta trigger ";
68  if (trOut())
69  cout << " Trigger Out set ";
70  cout << endl;
71 }
72 
73 uint16_t DTLocalTrigger::eventBx() const {
74  return theEventBX;
75 }
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:82
tuple cout
Definition: gather_cfg.py:121
uint16_t bx() const
uint16_t eventBx() const