]>
Commit | Line | Data |
---|---|---|
571dda3d | 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 */ | |
5 | ||
6 | /* $Id$ */ | |
7 | ||
0e46b9ae | 8 | /////////////////////////////////////////////////////////////// |
9 | // // | |
10 | // This class provides the key-reading for TOF raw data. // | |
11 | // // | |
12 | /////////////////////////////////////////////////////////////// | |
571dda3d | 13 | |
0e46b9ae | 14 | #include "TObject.h" |
571dda3d | 15 | |
15ec34b9 | 16 | class TClonesArray; |
17 | ||
571dda3d | 18 | class AliRawReader; |
15ec34b9 | 19 | class AliTOFGeometry; |
20 | class AliTOFrawData; | |
571dda3d | 21 | |
571dda3d | 22 | class AliTOFRawStream: public TObject { |
d0eb8f39 | 23 | public: |
571dda3d | 24 | |
d0eb8f39 | 25 | AliTOFRawStream(); // default ctr |
26 | AliTOFRawStream(AliRawReader* rawReader); // ctr | |
27 | virtual ~AliTOFRawStream(); // default dtr | |
571dda3d | 28 | |
15ec34b9 | 29 | virtual Bool_t Next(); |
571dda3d | 30 | |
15ec34b9 | 31 | virtual void LoadRawData(Int_t indexDDL); |
32 | ||
d0eb8f39 | 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;}; | |
571dda3d | 38 | |
d0eb8f39 | 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;}; | |
740f0695 | 44 | Int_t GetIndex(Int_t *detId); // Get channel index for Online Calibration |
571dda3d | 45 | |
d11fc181 | 46 | Float_t GetTofBin() const {return fTime;}; |
47 | Float_t GetToTbin() const {return fToT;}; | |
15ec34b9 | 48 | Float_t GetLeadingEdge() const {return fLeadingEdge;}; |
49 | Float_t GetTrailingEdge() const {return fTrailingEdge;}; | |
50 | ||
51 | Int_t GetPSbit() const {return fPSbit;}; | |
52 | Int_t GetACQ() const {return fACQ;}; | |
571dda3d | 53 | |
15ec34b9 | 54 | Int_t GetErrorFlag() const {return fErrorFlag;}; |
55 | ||
d0eb8f39 | 56 | void SetDDL(Int_t nDDL) {fDDL = nDDL;}; |
57 | void SetTRM(Int_t nTRM) {fTRM = nTRM;}; | |
58 | void SetTDC(Int_t nTDC) {fTDC = nTDC;}; | |
59 | void SetTRMchain(Int_t nChain) {fTRMchain = nChain;}; | |
60 | void SetTDCchannel(Int_t nChannel) {fTDCchannel = nChannel;}; | |
61 | ||
15ec34b9 | 62 | TClonesArray *GetRawData() const {return fTOFrawData;}; |
63 | ||
d0eb8f39 | 64 | void SetSector(); |
65 | void SetPlate(); | |
66 | void SetStrip(); | |
67 | void SetPadZ(); | |
68 | void SetPadX(); | |
571dda3d | 69 | |
d0eb8f39 | 70 | void EquipmentId2VolumeId(Int_t nDDL, Int_t nTRM, Int_t iChain, |
71 | Int_t iTDC, Int_t iCH, Int_t *volume) const; | |
72 | Int_t Equip2VolNplate(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ; | |
73 | Int_t Equip2VolNstrip(Int_t iDDL, Int_t nTRM, Int_t nTDC) const ; | |
74 | Int_t Equip2VolNpad(Int_t iDDL, Int_t iChain, Int_t nTDC, Int_t iCH) const ; | |
75 | Int_t GetDDLnumberPerSector(Int_t nDDL) const; | |
76 | Int_t GetSectorNumber(Int_t nDDL) const; | |
77 | ||
78 | private: | |
79 | ||
80 | Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const; | |
81 | ||
82 | AliTOFRawStream(const AliTOFRawStream& stream); // copy ctr | |
83 | AliTOFRawStream& operator = (const AliTOFRawStream& stream); // ass. op. | |
84 | ||
85 | AliRawReader* fRawReader; // object for reading the raw data | |
86 | ||
15ec34b9 | 87 | TClonesArray *fTOFrawData; // pointer to AliTOFrawData TClonesArray |
88 | ||
89 | Int_t fDDL; // DDL file number [0;71] | |
90 | Int_t fTRM; // TRM number [1;12] | |
91 | Int_t fTRMchain; // TRM chain number [0;1] | |
92 | Int_t fTDC; // TDC number [0;14] | |
93 | Int_t fTDCchannel; // TDC channel number [0;7] | |
d11fc181 | 94 | Float_t fTime; // time-of-flight measurement [0;8191] |
95 | Float_t fToT; // time-over-threshould measurement [0;255] | |
15ec34b9 | 96 | Float_t fLeadingEdge; // leading edge measurement |
97 | Float_t fTrailingEdge; // trailing edge measurement | |
98 | Int_t fErrorFlag; // error flag | |
d0eb8f39 | 99 | |
100 | Int_t fSector; // sector number [0;17] | |
101 | Int_t fPlate; // plate number [0;4] | |
102 | Int_t fStrip; // strip number [0;14/18] | |
103 | Int_t fPadX; // pad number along the strip [0;47] | |
104 | Int_t fPadZ; // pad-row number [0;1] | |
105 | ||
d3c7bfac | 106 | AliTOFGeometry *fTOFGeometry; // pointer to the TOF geometry |
107 | ||
15ec34b9 | 108 | Int_t fPackedDigits; // counter for packed digits |
109 | ||
d0eb8f39 | 110 | Int_t fWordType; // word type |
111 | Int_t fSlotID; // crate slot ID number | |
112 | Int_t fACQ; // flag to identify the aquisition kind | |
113 | Int_t fPSbit; // flag for packing | |
d0eb8f39 | 114 | Int_t fTDCerrorFlag; // TDC error flag |
115 | Bool_t fInsideDRM; // inside/outside DRM | |
116 | Bool_t fInsideTRM; // inside/outside TRM | |
117 | Bool_t fInsideLTM; // inside/outside LTM | |
118 | Bool_t fInsideTRMchain0; // inside/outside chain 0 | |
119 | Bool_t fInsideTRMchain1; // inside/outside chain 1 | |
571dda3d | 120 | |
121 | ClassDef(AliTOFRawStream, 1) // class for reading TOF raw digits | |
122 | }; | |
123 | ||
124 | #endif |