CMS 3D CMS Logo

DTBtiTrigData.h
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
14 //
15 //--------------------------------------------------
16 #ifndef DT_BTI_TRIG_DATA_H
17 #define DT_BTI_TRIG_DATA_H
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
23 
24 //----------------------
25 // Base Class Headers --
26 //----------------------
28 
29 //---------------
30 // C++ Headers --
31 //---------------
32 
33 // ---------------------
34 // -- Class Interface --
35 // ---------------------
36 
37 typedef unsigned char myint8;
38 
39 class DTBtiTrigData : public DTTrigData {
40 public:
43 
45  ~DTBtiTrigData() override {}
46 
48  inline void setParent(DTBtiId btiid) { _btiid = btiid; }
49 
51  inline void setStep(int step) { _step = step; }
52 
54  inline void setCode(int code) { _code = code; }
55 
57  inline void setK(int k) { _Kval = k; }
58 
60  inline void setX(int x) { _Xval = x; }
61 
63  inline void setEq(int eq) { _eq = eq; }
64 
66  inline void setStrobe(int str) { _str = str; }
67 
69  inline void setKeq(int num, float Keq) { _Keq[num] = Keq; }
70 
72  void clear() {
73  _step = 0;
74  _eq = 0;
75  _code = 0;
76  _Kval = 9999;
77  _Xval = 0;
78  _str = -1;
79  for (int j = 0; j < 6; j++)
80  _Keq[j] = -1;
81  }
82 
84  DTChamberId ChamberId() const override { return DTChamberId(_btiid.wheel(), _btiid.station(), _btiid.sector()); }
85 
87  void print() const override;
88 
90  inline DTBtiId parentId() const { return _btiid; }
91 
93  inline DTSuperLayerId SLId() const { return _btiid.SLId(); }
94 
96  inline int btiNumber() const { return _btiid.bti(); }
97 
99  inline int btiSL() const { return _btiid.superlayer(); }
100 
102  inline int step() const { return _step; }
103 
105  inline int code() const { return _code; }
106 
108  inline int K() const { return _Kval; }
109 
111  inline int X() const { return _Xval; }
112 
114  inline int eq() const { return _eq; }
115 
117  inline int Strobe() const { return _str; }
118 
120  inline float Keq(int i) const { return _Keq[i]; }
121 
122 private:
123  // Parent BTI identifier
124  DTBtiId _btiid; // this is 5 bytes
125 
126  // output values
128  int _Kval;
130 
133  int _str;
134  float _Keq[6];
135 };
136 
137 #endif
int btiNumber() const
Return parent BTI number.
Definition: DTBtiTrigData.h:96
int btiSL() const
Return parent BTI superlayer.
Definition: DTBtiTrigData.h:99
void setStep(int step)
Set trigger step.
Definition: DTBtiTrigData.h:51
float Keq(int i) const
Return triggering K equations.
void setK(int k)
Set trigger K parameter.
Definition: DTBtiTrigData.h:57
int sector() const
Returns sector number.
Definition: DTBtiId.h:59
int K() const
Return trigger K parameter.
int bti() const
Returns the bti.
Definition: DTBtiId.h:63
int Strobe() const
Return trigger strobe.
void setParent(DTBtiId btiid)
Set the parent BTI identifier.
Definition: DTBtiTrigData.h:48
DTBtiTrigData()
Constructor.
Definition: DTBtiTrigData.h:42
void setCode(int code)
Set trigger code.
Definition: DTBtiTrigData.h:54
int code() const
Return trigger code.
int wheel() const
Returns wheel number.
Definition: DTBtiId.h:55
void setKeq(int num, float Keq)
Set trigger _Keq.
Definition: DTBtiTrigData.h:69
int superlayer() const
Returns the superlayer.
Definition: DTBtiId.h:61
unsigned char myint8
DTSuperLayerId SLId() const
Return superlayer identifier.
Definition: DTBtiTrigData.h:93
void clear()
Clear.
Definition: DTBtiTrigData.h:72
int X() const
Return trigger X parameter.
void setStrobe(int str)
Set trigger strobe.
Definition: DTBtiTrigData.h:66
unsigned char myint8
Definition: DTBtiTrigData.h:37
~DTBtiTrigData() override
Destructor.
Definition: DTBtiTrigData.h:45
DTChamberId ChamberId() const override
Return chamber identifier.
Definition: DTBtiTrigData.h:84
void setEq(int eq)
Set triggering equation.
Definition: DTBtiTrigData.h:63
void print() const override
Print.
DTSuperLayerId SLId() const
Returns the superlayer id.
Definition: DTBtiId.h:65
step
Definition: StallMonitor.cc:98
DTBtiId parentId() const
Return parent BTI identifier.
Definition: DTBtiTrigData.h:90
void setX(int x)
Set trigger X parameter.
Definition: DTBtiTrigData.h:60
int station() const
Returns station number.
Definition: DTBtiId.h:57
#define str(s)
int eq() const
Return triggering equation.
int step() const
Return trigger step.