]>
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 | |
16 | class AliRawReader; | |
17 | ||
571dda3d | 18 | class AliTOFRawStream: public TObject { |
d0eb8f39 | 19 | public: |
571dda3d | 20 | |
d0eb8f39 | 21 | AliTOFRawStream(); // default ctr |
22 | AliTOFRawStream(AliRawReader* rawReader); // ctr | |
23 | virtual ~AliTOFRawStream(); // default dtr | |
571dda3d | 24 | |
25 | virtual Bool_t Next(); | |
26 | ||
d0eb8f39 | 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;}; | |
571dda3d | 32 | |
d0eb8f39 | 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;}; | |
571dda3d | 38 | |
39 | Int_t GetTofBin() const {return fTof;}; | |
d0eb8f39 | 40 | Int_t GetToTbin() const {return fToT;}; |
571dda3d | 41 | |
d0eb8f39 | 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;}; | |
47 | ||
48 | void SetSector(); | |
49 | void SetPlate(); | |
50 | void SetStrip(); | |
51 | void SetPadZ(); | |
52 | void SetPadX(); | |
571dda3d | 53 | |
d0eb8f39 | 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; | |
61 | ||
62 | private: | |
63 | ||
64 | Int_t GetField(UInt_t word, Int_t fieldMask, Int_t fieldPosition) const; | |
65 | ||
66 | AliTOFRawStream(const AliTOFRawStream& stream); // copy ctr | |
67 | AliTOFRawStream& operator = (const AliTOFRawStream& stream); // ass. op. | |
68 | ||
69 | AliRawReader* fRawReader; // object for reading the raw data | |
70 | ||
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 | |
79 | ||
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] | |
85 | ||
d3c7bfac | 86 | AliTOFGeometry *fTOFGeometry; // pointer to the TOF geometry |
87 | ||
d0eb8f39 | 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 | |
100 | ||
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 | |
109 | Int_t fTime; // Time | |
110 | }; | |
111 | ||
571dda3d | 112 | |
113 | ClassDef(AliTOFRawStream, 1) // class for reading TOF raw digits | |
114 | }; | |
115 | ||
116 | #endif |