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 
10 
11 
12 using namespace std;
13 
14 
15 DTLocalTrigger::DTLocalTrigger (int eventBx, int bx, int data) :
16  theEventBX(eventBx),
17  theBX (bx),
18  theData(data)
19 {}
20 
21 
23  theEventBX(0),
24  theBX (0),
25  theData(0)
26 {}
27 
28 
29 // Comparison
31  if ( theBX != trig.bx() ||
32  this->quality() != trig.quality() ) return false;
33  return true;
34 }
35 
36 // Getters
37 
38 
39 uint16_t DTLocalTrigger::bx() const { return theBX; }
40 
41 uint16_t DTLocalTrigger::quality() const {
42  return ( (theData & 0xE) >> 1 );
43 }
44 uint16_t DTLocalTrigger::trTheta() const {
45  return ( (theData & 0x30) >> 4 );
46 }
47 
49  return ( theData & 0x1 );
50 }
51 bool DTLocalTrigger::trOut() const {
52  return ( (theData & 0x40) >> 6 );
53 }
54 
55 // Setters ??
56 
57 // Debug
58 
59 void
61  cout << " trigger at BX "<<bx()<<": "<<theData;
62  if (secondTrack())
63  cout << " IT IS A SECOND TRACK !! ";
64  cout << " Quality "<<quality();
65  if (trTheta() == 1)
66  cout << " with a low Theta trigger ";
67  if (trTheta() == 3)
68  cout << " with a high Theta trigger ";
69  if (trOut())
70  cout << " Trigger Out set ";
71  cout << endl;
72 }
73 
74 uint16_t DTLocalTrigger::eventBx() const {
75  return theEventBX;
76 }
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