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 ///////////////////////////////////////////////////////////////
18 class AliTOFRawStream: public TObject {
21 AliTOFRawStream(); // default ctr
22 AliTOFRawStream(AliRawReader* rawReader); // ctr
23 virtual ~AliTOFRawStream(); // default dtr
25 virtual Bool_t Next();
27 Int_t GetDDL() const {return fDDL;};
28 Int_t GetTRM() const {return fTRM;};
29 Int_t GetTDC() const {return fTDC;};
30 Int_t GetTRMchain() const {return fTRMchain;};
31 Int_t GetTDCchannel() const {return fTDCchannel;};
33 Int_t GetSector() const {return fSector;};
34 Int_t GetPlate() const {return fPlate;};
35 Int_t GetStrip() const {return fStrip;};
36 Int_t GetPadZ() const {return fPadZ;};
37 Int_t GetPadX() const {return fPadX;};
39 Int_t GetTofBin() const {return fTof;};
40 Int_t GetToTbin() const {return fToT;};
42 void SetDDL(Int_t nDDL) {fDDL = nDDL;};
43 void SetTRM(Int_t nTRM) {fTRM = nTRM;};
44 void SetTDC(Int_t nTDC) {fTDC = nTDC;};
45 void SetTRMchain(Int_t nChain) {fTRMchain = nChain;};
46 void SetTDCchannel(Int_t nChannel) {fTDCchannel = nChannel;};
54 void EquipmentId2VolumeId(Int_t nDDL, Int_t nTRM, Int_t iChain,
55 Int_t iTDC, Int_t iCH, Int_t *volume) const;
56 Int_t Equip2VolNplate(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ;
57 Int_t Equip2VolNstrip(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ;
58 Int_t Equip2VolNpad(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH) const ;
59 Int_t GetDDLnumberPerSector(Int_t nDDL) const;
60 Int_t GetSectorNumber(Int_t nDDL) const;
64 Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const;
66 AliTOFRawStream(const AliTOFRawStream& stream); // copy ctr
67 AliTOFRawStream& operator = (const AliTOFRawStream& stream); // ass. op.
69 AliRawReader* fRawReader; // object for reading the raw data
71 Int_t fDDL; // DDL file number [0;71]
72 Int_t fTRM; // TRM number [1;12]
73 Int_t fTDC; // TDC number [0;14]
74 Int_t fTRMchain; // TRM chain number [0;1]
75 Int_t fTDCchannel; // TDC channel number [0;7]
76 Int_t fTof; // time-of-flight measurement [0;8191]
77 Int_t fToT; // time-over-threshould measurement [0;255]
78 Int_t fErrorFlag; // error flag
80 Int_t fSector; // sector number [0;17]
81 Int_t fPlate; // plate number [0;4]
82 Int_t fStrip; // strip number [0;14/18]
83 Int_t fPadX; // pad number along the strip [0;47]
84 Int_t fPadZ; // pad-row number [0;1]
86 AliTOFGeometry *fTOFGeometry; // pointer to the TOF geometry
88 Int_t fWordType; // word type
89 Int_t fSlotID; // crate slot ID number
90 Int_t fACQ; // flag to identify the aquisition kind
91 Int_t fPSbit; // flag for packing
92 Int_t fTime; // time-of-light measurement
93 Int_t fTDCerrorFlag; // TDC error flag
94 Bool_t fInsideDRM; // inside/outside DRM
95 Bool_t fInsideTRM; // inside/outside TRM
96 Bool_t fInsideLTM; // inside/outside LTM
97 Bool_t fInsideTRMchain0; // inside/outside chain 0
98 Bool_t fInsideTRMchain1; // inside/outside chain 1
99 Bool_t fLeadingOrphane; // flag for leading orphane digit
101 struct AliTOFtdcDigit {
102 // TOF TDC digit data struct
103 Int_t fSlotID; // TRM slot ID
104 Int_t fChain; // Chain ID
105 Int_t fPS; // Packing bit
106 Int_t fTDC; // TDC number
107 Int_t fChannel; // TDC channel number
108 Int_t fTOT; // Time-Over-Threashould
113 ClassDef(AliTOFRawStream, 1) // class for reading TOF raw digits