CMS 3D CMS Logo

CocoaDaqRootEvent.h
Go to the documentation of this file.
1 #ifndef ALIGN_EVENT
2 #define ALIGN_EVENT
3 
5 // //
6 // //
7 // Description of the Alignment event classes for COCOA //
8 // //
10 
11 #include "TObject.h"
12 #include "TClonesArray.h"
13 #include "TString.h"
14 
15 //-----------------------------------------------------------------------------
16 
18 private:
19  Int_t fRunNum; // Run number
20  Int_t fEvtNum; // Event number
21  Int_t fTimeStamp; // Event time stamp
22 
23 public:
25  virtual ~AliDaqEventHeader() {}
26  Int_t GetRunNum() const { return fRunNum; }
27  Int_t GetEvtNum() const { return fEvtNum; }
28  Int_t GetTimeStamp() const { return fTimeStamp; }
29  void SetRunEvt(int run, int event) {
30  fRunNum = run;
31  fEvtNum = event;
32  }
33  void DumpIt();
34 
35  ClassDef(AliDaqEventHeader, 1)
36 };
37 
38 //-----------------------------------------------------------------------------
39 
40 class AliDaqPosition2D : public TObject {
41 private:
42  Float_t fX; // X position
43  Float_t fY; // Y position
44  Float_t fX_error; // uncertainty in X position
45  Float_t fY_error; // uncertainty in Y position
46  TString fID; // ID of sensor
47  Int_t fTimeStamp; // position time stamp
48 
49 public:
50  AliDaqPosition2D() : fX(0), fY(0), fX_error(0), fY_error(0), fID(""), fTimeStamp(0) {}
51  ~AliDaqPosition2D() override {}
52  Float_t GetX() const { return fX; }
53  Float_t GetY() const { return fY; }
54  Float_t GetXerror() const { return fX_error; }
55  Float_t GetYerror() const { return fY_error; }
56  TString GetID() { return fID; }
57  Int_t GetTimeStamp() const { return fTimeStamp; }
58  void DumpIt(const TString &Name);
59 
60  ClassDefOverride(AliDaqPosition2D, 1)
61 };
62 
63 //-----------------------------------------------------------------------------
64 
65 class AliDaqPositionCOPS : public TObject {
66 private:
67  Float_t fDCOPS_up; // up position
68  Float_t fDCOPS_down; // down position
69  Float_t fDCOPS_left; // left position
70  Float_t fDCOPS_right; // right position
71  Float_t fDCOPS_up_error; // up position uncertainty
72  Float_t fDCOPS_down_error; // down position uncertainty
73  Float_t fDCOPS_left_error; // left position uncertainty
74  Float_t fDCOPS_right_error; // right position uncertainty
75  TString fID; // ID of sensor
76  Int_t fTimeStamp; // position time stamp
77 
78 public:
80  : fDCOPS_up(0),
81  fDCOPS_down(0),
82  fDCOPS_left(0),
83  fDCOPS_right(0),
84  fDCOPS_up_error(0),
88  fID(""),
89  fTimeStamp(0) {}
90  ~AliDaqPositionCOPS() override {}
91  Float_t GetUp() const { return fDCOPS_up; }
92  Float_t GetDown() const { return fDCOPS_down; }
93  Float_t GetLeft() const { return fDCOPS_left; }
94  Float_t GetRight() const { return fDCOPS_right; }
95  Float_t GetUpError() const { return fDCOPS_up_error; }
96  Float_t GetDownError() const { return fDCOPS_down_error; }
97  Float_t GetLeftError() const { return fDCOPS_left_error; }
98  Float_t GetRightError() const { return fDCOPS_right_error; }
99  TString GetID() { return fID; }
100  Int_t GetTimeStamp() const { return fTimeStamp; }
101  void DumpIt(const TString &Name);
102 
103  ClassDefOverride(AliDaqPositionCOPS, 1)
104 };
105 
106 //-----------------------------------------------------------------------------
107 
108 class AliDaqTilt : public TObject {
109 private:
110  Float_t fTilt; // Tilt, or inclination
111  Float_t fTilt_error; // uncertainty in tilt
112  TString fID; // ID of sensor
113  Int_t fTimeStamp;
114 
115 public:
116  AliDaqTilt() : fTilt(0), fTilt_error(0), fID(""), fTimeStamp(0) {}
117  ~AliDaqTilt() override {}
118  Float_t GetTilt() const { return fTilt; }
119  Float_t GetTiltError() const { return fTilt_error; }
120  TString GetID() { return fID; }
121  Int_t GetTimeStamp() const { return fTimeStamp; }
122  void DumpIt(const TString &Name);
123 
124  ClassDefOverride(AliDaqTilt, 1)
125 };
126 
127 //-----------------------------------------------------------------------------
128 class AliDaqDistance : public TObject {
129 private:
130  Float_t fDistance;
132  TString fID; // ID of sensor
133  Int_t fTimeStamp;
134 
135 public:
137  ~AliDaqDistance() override {}
138  Float_t GetDistance() const { return fDistance; }
139  Float_t GetDistanceError() const { return fDistance_error; }
140  TString GetID() { return fID; }
141  Int_t GetTimeStamp() const { return fTimeStamp; }
142  void DumpIt(const TString &Name);
143 
144  ClassDefOverride(AliDaqDistance, 1)
145 };
146 
147 //-----------------------------------------------------------------------------
148 
149 class AliDaqTemperature : public TObject {
150 private:
151  Float_t fTemperature;
153  TString fID; // ID of sensor
154  Int_t fTimeStamp;
155 
156 public:
158  ~AliDaqTemperature() override {}
159  Float_t GetTemperature() const { return fTemperature; }
160  Float_t GetTemperatureError() const { return fTemperature_error; }
161  TString GetID() { return fID; }
162  Int_t GetTimeStamp() const { return fTimeStamp; }
163  void DumpIt(const TString &Name);
164 
165  ClassDefOverride(AliDaqTemperature, 1)
166 };
167 
168 //-----------------------------------------------------------------------------
169 class CocoaDaqRootEvent : public TObject {
170 private:
172  TClonesArray *Array_PositionCOPS;
173  TClonesArray *Array_Position2D;
174  TClonesArray *Array_Tilt;
175  TClonesArray *Array_Dist;
176  TClonesArray *Array_Temp;
178  int numPos2D;
179  int numTilt;
180  int numDist;
181  int numTemp;
182 
183 public:
184  AliDaqEventHeader *GetHeader() const { return Header; }
185  TClonesArray *GetArray_Position2D() const { return Array_Position2D; }
186  TClonesArray *GetArray_PositionCOPS() const { return Array_PositionCOPS; }
187  TClonesArray *GetArray_Tilt() const { return Array_Tilt; }
188  TClonesArray *GetArray_Dist() const { return Array_Dist; }
189  TClonesArray *GetArray_Temp() const { return Array_Temp; }
190  int GetNumPos2D() const { return numPos2D; }
191  int GetNumPosCOPS() const { return numPosCOPS; }
192  int GetNumTilt() const { return numTilt; }
193  int GetNumDist() const { return numDist; }
194  int GetNumTemp() const { return numTemp; }
195 
196 public:
198  ~CocoaDaqRootEvent() override{};
199  void SetHeader(int run, int evt) { Header->SetRunEvt(run, evt); }
200  void DumpIt();
201 
202  ClassDefOverride(CocoaDaqRootEvent, 1)
203 };
204 
205 #endif
void DumpIt(const TString &Name)
Float_t GetDistance() const
Float_t GetTiltError() const
~CocoaDaqRootEvent() override
AliDaqEventHeader * Header
Int_t GetEvtNum() const
Float_t GetXerror() const
Float_t GetYerror() const
TClonesArray * Array_Dist
AliDaqEventHeader * GetHeader() const
Float_t GetDownError() const
Float_t GetUpError() const
Float_t GetLeftError() const
Float_t GetRight() const
TClonesArray * GetArray_Position2D() const
Float_t GetLeft() const
TClonesArray * GetArray_Tilt() const
Float_t GetDistanceError() const
Int_t GetTimeStamp() const
void DumpIt(const TString &Name)
TString GetID()
~AliDaqTilt() override
Float_t GetUp() const
~AliDaqDistance() override
~AliDaqTemperature() override
TClonesArray * Array_Temp
TClonesArray * GetArray_Dist() const
Float_t GetTilt() const
TClonesArray * Array_Position2D
TClonesArray * GetArray_Temp() const
~AliDaqPosition2D() override
Float_t GetX() const
void DumpIt(const TString &Name)
Int_t GetTimeStamp() const
Float_t GetRightError() const
void SetRunEvt(int run, int event)
Int_t GetTimeStamp() const
Int_t GetTimeStamp() const
TClonesArray * Array_Tilt
Int_t GetRunNum() const
Float_t GetDown() const
~AliDaqPositionCOPS() override
TClonesArray * GetArray_PositionCOPS() const
Int_t GetTimeStamp() const
Float_t GetTemperature() const
Float_t GetY() const
void DumpIt(const TString &Name)
Float_t GetTemperatureError() const
Int_t GetTimeStamp() const
virtual ~AliDaqEventHeader()
void SetHeader(int run, int evt)
int GetNumPosCOPS() const
Float_t fTilt_error
TClonesArray * Array_PositionCOPS
Definition: event.py:1
void DumpIt(const TString &Name)