Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:34:25

0001 #ifndef ALIGN_EVENT
0002 #define ALIGN_EVENT
0003 
0004 //////////////////////////////////////////////////////////////////////////
0005 //                                                                      //
0006 //                                                                      //
0007 // Description of the Alignment event classes for COCOA                 //
0008 //                                                                      //
0009 //////////////////////////////////////////////////////////////////////////
0010 
0011 #include "TObject.h"
0012 #include "TClonesArray.h"
0013 #include "TString.h"
0014 
0015 //-----------------------------------------------------------------------------
0016 
0017 class AliDaqEventHeader {
0018 private:
0019   Int_t fRunNum;     // Run number
0020   Int_t fEvtNum;     // Event number
0021   Int_t fTimeStamp;  // Event time stamp
0022 
0023 public:
0024   AliDaqEventHeader() : fRunNum(0), fEvtNum(0), fTimeStamp(0) {}
0025   virtual ~AliDaqEventHeader() {}
0026   Int_t GetRunNum() const { return fRunNum; }
0027   Int_t GetEvtNum() const { return fEvtNum; }
0028   Int_t GetTimeStamp() const { return fTimeStamp; }
0029   void SetRunEvt(int run, int event) {
0030     fRunNum = run;
0031     fEvtNum = event;
0032   }
0033   void DumpIt();
0034 
0035   ClassDef(AliDaqEventHeader, 1)
0036 };
0037 
0038 //-----------------------------------------------------------------------------
0039 
0040 class AliDaqPosition2D : public TObject {
0041 private:
0042   Float_t fX;        // X position
0043   Float_t fY;        // Y position
0044   Float_t fX_error;  // uncertainty in X position
0045   Float_t fY_error;  // uncertainty in Y position
0046   TString fID;       // ID of sensor
0047   Int_t fTimeStamp;  // position time stamp
0048 
0049 public:
0050   AliDaqPosition2D() : fX(0), fY(0), fX_error(0), fY_error(0), fID(""), fTimeStamp(0) {}
0051   ~AliDaqPosition2D() override {}
0052   Float_t GetX() const { return fX; }
0053   Float_t GetY() const { return fY; }
0054   Float_t GetXerror() const { return fX_error; }
0055   Float_t GetYerror() const { return fY_error; }
0056   TString GetID() { return fID; }
0057   Int_t GetTimeStamp() const { return fTimeStamp; }
0058   void DumpIt(const TString &Name);
0059 
0060   ClassDefOverride(AliDaqPosition2D, 1)
0061 };
0062 
0063 //-----------------------------------------------------------------------------
0064 
0065 class AliDaqPositionCOPS : public TObject {
0066 private:
0067   Float_t fDCOPS_up;           // up position
0068   Float_t fDCOPS_down;         // down position
0069   Float_t fDCOPS_left;         // left position
0070   Float_t fDCOPS_right;        // right position
0071   Float_t fDCOPS_up_error;     // up position uncertainty
0072   Float_t fDCOPS_down_error;   // down position uncertainty
0073   Float_t fDCOPS_left_error;   // left position uncertainty
0074   Float_t fDCOPS_right_error;  // right position uncertainty
0075   TString fID;                 // ID of sensor
0076   Int_t fTimeStamp;            // position time stamp
0077 
0078 public:
0079   AliDaqPositionCOPS()
0080       : fDCOPS_up(0),
0081         fDCOPS_down(0),
0082         fDCOPS_left(0),
0083         fDCOPS_right(0),
0084         fDCOPS_up_error(0),
0085         fDCOPS_down_error(0),
0086         fDCOPS_left_error(0),
0087         fDCOPS_right_error(0),
0088         fID(""),
0089         fTimeStamp(0) {}
0090   ~AliDaqPositionCOPS() override {}
0091   Float_t GetUp() const { return fDCOPS_up; }
0092   Float_t GetDown() const { return fDCOPS_down; }
0093   Float_t GetLeft() const { return fDCOPS_left; }
0094   Float_t GetRight() const { return fDCOPS_right; }
0095   Float_t GetUpError() const { return fDCOPS_up_error; }
0096   Float_t GetDownError() const { return fDCOPS_down_error; }
0097   Float_t GetLeftError() const { return fDCOPS_left_error; }
0098   Float_t GetRightError() const { return fDCOPS_right_error; }
0099   TString GetID() { return fID; }
0100   Int_t GetTimeStamp() const { return fTimeStamp; }
0101   void DumpIt(const TString &Name);
0102 
0103   ClassDefOverride(AliDaqPositionCOPS, 1)
0104 };
0105 
0106 //-----------------------------------------------------------------------------
0107 
0108 class AliDaqTilt : public TObject {
0109 private:
0110   Float_t fTilt;        // Tilt, or inclination
0111   Float_t fTilt_error;  // uncertainty in tilt
0112   TString fID;          // ID of sensor
0113   Int_t fTimeStamp;
0114 
0115 public:
0116   AliDaqTilt() : fTilt(0), fTilt_error(0), fID(""), fTimeStamp(0) {}
0117   ~AliDaqTilt() override {}
0118   Float_t GetTilt() const { return fTilt; }
0119   Float_t GetTiltError() const { return fTilt_error; }
0120   TString GetID() { return fID; }
0121   Int_t GetTimeStamp() const { return fTimeStamp; }
0122   void DumpIt(const TString &Name);
0123 
0124   ClassDefOverride(AliDaqTilt, 1)
0125 };
0126 
0127 //-----------------------------------------------------------------------------
0128 class AliDaqDistance : public TObject {
0129 private:
0130   Float_t fDistance;
0131   Float_t fDistance_error;
0132   TString fID;  // ID of sensor
0133   Int_t fTimeStamp;
0134 
0135 public:
0136   AliDaqDistance() : fDistance(0), fDistance_error(0), fID(""), fTimeStamp(0) {}
0137   ~AliDaqDistance() override {}
0138   Float_t GetDistance() const { return fDistance; }
0139   Float_t GetDistanceError() const { return fDistance_error; }
0140   TString GetID() { return fID; }
0141   Int_t GetTimeStamp() const { return fTimeStamp; }
0142   void DumpIt(const TString &Name);
0143 
0144   ClassDefOverride(AliDaqDistance, 1)
0145 };
0146 
0147 //-----------------------------------------------------------------------------
0148 
0149 class AliDaqTemperature : public TObject {
0150 private:
0151   Float_t fTemperature;
0152   Float_t fTemperature_error;
0153   TString fID;  // ID of sensor
0154   Int_t fTimeStamp;
0155 
0156 public:
0157   AliDaqTemperature() : fTemperature(0), fTemperature_error(0), fID(""), fTimeStamp(0) {}
0158   ~AliDaqTemperature() override {}
0159   Float_t GetTemperature() const { return fTemperature; }
0160   Float_t GetTemperatureError() const { return fTemperature_error; }
0161   TString GetID() { return fID; }
0162   Int_t GetTimeStamp() const { return fTimeStamp; }
0163   void DumpIt(const TString &Name);
0164 
0165   ClassDefOverride(AliDaqTemperature, 1)
0166 };
0167 
0168 //-----------------------------------------------------------------------------
0169 class CocoaDaqRootEvent : public TObject {
0170 private:
0171   AliDaqEventHeader *Header;
0172   TClonesArray *Array_PositionCOPS;
0173   TClonesArray *Array_Position2D;
0174   TClonesArray *Array_Tilt;
0175   TClonesArray *Array_Dist;
0176   TClonesArray *Array_Temp;
0177   int numPosCOPS;
0178   int numPos2D;
0179   int numTilt;
0180   int numDist;
0181   int numTemp;
0182 
0183 public:
0184   AliDaqEventHeader *GetHeader() const { return Header; }
0185   TClonesArray *GetArray_Position2D() const { return Array_Position2D; }
0186   TClonesArray *GetArray_PositionCOPS() const { return Array_PositionCOPS; }
0187   TClonesArray *GetArray_Tilt() const { return Array_Tilt; }
0188   TClonesArray *GetArray_Dist() const { return Array_Dist; }
0189   TClonesArray *GetArray_Temp() const { return Array_Temp; }
0190   int GetNumPos2D() const { return numPos2D; }
0191   int GetNumPosCOPS() const { return numPosCOPS; }
0192   int GetNumTilt() const { return numTilt; }
0193   int GetNumDist() const { return numDist; }
0194   int GetNumTemp() const { return numTemp; }
0195 
0196 public:
0197   CocoaDaqRootEvent();
0198   ~CocoaDaqRootEvent() override {}
0199   void SetHeader(int run, int evt) { Header->SetRunEvt(run, evt); }
0200   void DumpIt();
0201 
0202   ClassDefOverride(CocoaDaqRootEvent, 1)
0203 };
0204 
0205 #endif