1 #ifndef ALITOFRAWSTREAM_H
2 #define ALITOFRAWSTREAM_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ///////////////////////////////////////////////////////////////
10 // This class provides the key-reading for TOF raw data. //
12 ///////////////////////////////////////////////////////////////
22 class AliTOFRawStream: public TObject {
25 AliTOFRawStream(); // default ctr
26 AliTOFRawStream(AliRawReader* rawReader); // ctr
27 virtual ~AliTOFRawStream(); // default dtr
29 virtual Bool_t Next();
31 virtual void LoadRawData(Int_t indexDDL);
33 Int_t GetDDL() const {return fDDL;};
34 Int_t GetTRM() const {return fTRM;};
35 Int_t GetTDC() const {return fTDC;};
36 Int_t GetTRMchain() const {return fTRMchain;};
37 Int_t GetTDCchannel() const {return fTDCchannel;};
39 Int_t GetSector() const {return fSector;};
40 Int_t GetPlate() const {return fPlate;};
41 Int_t GetStrip() const {return fStrip;};
42 Int_t GetPadZ() const {return fPadZ;};
43 Int_t GetPadX() const {return fPadX;};
45 Int_t GetTofBin() const {return fTime;};
46 Int_t GetToTbin() const {return fToT;};
47 Float_t GetLeadingEdge() const {return fLeadingEdge;};
48 Float_t GetTrailingEdge() const {return fTrailingEdge;};
50 Int_t GetPSbit() const {return fPSbit;};
51 Int_t GetACQ() const {return fACQ;};
53 Int_t GetErrorFlag() const {return fErrorFlag;};
55 void SetDDL(Int_t nDDL) {fDDL = nDDL;};
56 void SetTRM(Int_t nTRM) {fTRM = nTRM;};
57 void SetTDC(Int_t nTDC) {fTDC = nTDC;};
58 void SetTRMchain(Int_t nChain) {fTRMchain = nChain;};
59 void SetTDCchannel(Int_t nChannel) {fTDCchannel = nChannel;};
61 TClonesArray *GetRawData() const {return fTOFrawData;};
69 void EquipmentId2VolumeId(Int_t nDDL, Int_t nTRM, Int_t iChain,
70 Int_t iTDC, Int_t iCH, Int_t *volume) const;
71 Int_t Equip2VolNplate(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ;
72 Int_t Equip2VolNstrip(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ;
73 Int_t Equip2VolNpad(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH) const ;
74 Int_t GetDDLnumberPerSector(Int_t nDDL) const;
75 Int_t GetSectorNumber(Int_t nDDL) const;
79 Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const;
81 AliTOFRawStream(const AliTOFRawStream& stream); // copy ctr
82 AliTOFRawStream& operator = (const AliTOFRawStream& stream); // ass. op.
84 AliRawReader* fRawReader; // object for reading the raw data
86 TClonesArray *fTOFrawData; // pointer to AliTOFrawData TClonesArray
88 Int_t fDDL; // DDL file number [0;71]
89 Int_t fTRM; // TRM number [1;12]
90 Int_t fTRMchain; // TRM chain number [0;1]
91 Int_t fTDC; // TDC number [0;14]
92 Int_t fTDCchannel; // TDC channel number [0;7]
93 Int_t fTime; // time-of-flight measurement [0;8191]
94 Int_t fToT; // time-over-threshould measurement [0;255]
95 Float_t fLeadingEdge; // leading edge measurement
96 Float_t fTrailingEdge; // trailing edge measurement
97 Int_t fErrorFlag; // error flag
99 Int_t fSector; // sector number [0;17]
100 Int_t fPlate; // plate number [0;4]
101 Int_t fStrip; // strip number [0;14/18]
102 Int_t fPadX; // pad number along the strip [0;47]
103 Int_t fPadZ; // pad-row number [0;1]
105 AliTOFGeometry *fTOFGeometry; // pointer to the TOF geometry
107 Int_t fPackedDigits; // counter for packed digits
109 Int_t fWordType; // word type
110 Int_t fSlotID; // crate slot ID number
111 Int_t fACQ; // flag to identify the aquisition kind
112 Int_t fPSbit; // flag for packing
113 Int_t fTDCerrorFlag; // TDC error flag
114 Bool_t fInsideDRM; // inside/outside DRM
115 Bool_t fInsideTRM; // inside/outside TRM
116 Bool_t fInsideLTM; // inside/outside LTM
117 Bool_t fInsideTRMchain0; // inside/outside chain 0
118 Bool_t fInsideTRMchain1; // inside/outside chain 1
120 ClassDef(AliTOFRawStream, 1) // class for reading TOF raw digits