]>
Commit | Line | Data |
---|---|---|
c0751163 | 1 | #ifndef ALIMUONRAWSTREAMTRACKER_H |
2 | #define ALIMUONRAWSTREAMTRACKER_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 | ||
be68bd50 | 8 | /// \ingroup raw |
c0751163 | 9 | /// \class AliMUONRawStreamTracker |
10 | /// \brief Class for reading MUON raw digits | |
11 | /// | |
c4ee792d | 12 | // Author: Christian Finck |
c0751163 | 13 | |
14 | #include <TObject.h> | |
313a427d | 15 | #include "AliMUONPayloadTracker.h" |
e3a2b9c9 | 16 | #include "AliMUONVRawStreamTracker.h" |
c0751163 | 17 | |
18 | class AliRawReader; | |
19 | class AliMUONDDLTracker; | |
33434f31 | 20 | class AliMUONDspHeader; |
21 | class AliMUONBusStruct; | |
22 | class AliMUONBlockHeader; | |
c0751163 | 23 | |
e3a2b9c9 | 24 | class AliMUONRawStreamTracker: public AliMUONVRawStreamTracker { |
c0751163 | 25 | public : |
26 | AliMUONRawStreamTracker(); | |
ce350193 | 27 | AliMUONRawStreamTracker(TRootIOCtor* dummy); |
c0751163 | 28 | AliMUONRawStreamTracker(AliRawReader* rawReader); |
c0751163 | 29 | virtual ~AliMUONRawStreamTracker(); |
30 | ||
33434f31 | 31 | /// Initialize iterator |
32 | void First(); | |
33 | ||
34 | /// Returns current DDL object during iteration | |
35 | AliMUONDDLTracker* CurrentDDL() const { return fCurrentDDL; } | |
36 | ||
37 | /// Returns current BlockHeader object during iteration | |
38 | AliMUONBlockHeader* CurrentBlockHeader() const { return fCurrentBlockHeader; } | |
39 | ||
40 | /// Returns current DspHeader object during iteration | |
41 | AliMUONDspHeader* CurrentDspHeader() const { return fCurrentDspHeader; } | |
42 | ||
43 | /// Returns current BusStruct object during iteration | |
44 | AliMUONBusStruct* CurrentBusStruct() const { return fCurrentBusStruct; } | |
45 | ||
46 | /// Advance one step in the iteration. Returns false if finished. | |
47 | virtual Bool_t Next(Int_t& busPatchId, | |
48 | UShort_t& manuId, UChar_t& manuChannel, | |
49 | UShort_t& adc); | |
50 | ||
51 | virtual Bool_t NextDDL(); | |
c0751163 | 52 | |
71a2d3aa | 53 | /// Return maximum number of block per DDL in DATE file |
313a427d | 54 | Int_t GetMaxBlock() const {return fPayload->GetMaxBlock();} |
71a2d3aa | 55 | /// Return maximum number of Dsp per block in DATE file |
313a427d | 56 | Int_t GetMaxDsp() const {return fPayload->GetMaxDsp();} |
71a2d3aa | 57 | /// Return maximum number of Buspatch per Dsp in DATE file |
313a427d | 58 | Int_t GetMaxBus() const {return fPayload->GetMaxBus();} |
c0751163 | 59 | |
60 | // check input before assigment | |
c0751163 | 61 | void SetMaxBlock(Int_t blk); |
62 | ||
71a2d3aa | 63 | /// Set maximum number of Dsp per block in DATE file |
64 | /// does not check, done via BusPatchManager | |
313a427d | 65 | void SetMaxDsp(Int_t dsp) {fPayload->SetMaxDsp(dsp);} |
71a2d3aa | 66 | /// Set maximum number of Buspatch per Dsp in DATE file |
67 | /// does not check, done via BusPatchManager | |
313a427d | 68 | void SetMaxBus(Int_t bus) {fPayload->SetMaxBus(bus);} |
c0751163 | 69 | |
54e01c1c | 70 | /// Return pointer for DDL |
71 | AliMUONDDLTracker* GetDDLTracker() const {return fPayload->GetDDLTracker();} | |
72 | ||
dabf5427 | 73 | /// Return number of DDL |
74 | Int_t GetDDL() const {return fDDL - 1;} | |
1c66abf3 | 75 | |
76 | /// Return current DDL index | |
77 | Int_t GetCurentDDL() const {return fCurrentDDLIndex;} | |
dabf5427 | 78 | |
54e01c1c | 79 | /// Return pointer for payload |
80 | AliMUONPayloadTracker* GetPayLoad() const {return fPayload;} | |
81 | ||
33434f31 | 82 | /// Whether the iteration is finished or not |
83 | Bool_t IsDone() const; | |
84 | ||
3c7f5307 | 85 | /// add error message into error logger |
86 | void AddErrorMessage(); | |
dabf5427 | 87 | |
88 | /// Disable Warnings | |
89 | void DisableWarnings() {fPayload->DisableWarnings();} | |
90 | ||
91 | /// check error/Warning presence | |
92 | Bool_t IsErrorMessage() const; | |
3c7f5307 | 93 | |
7a0bb451 | 94 | /// error numbers |
95 | enum rawStreamTrackerError { | |
96 | kGlitchErr = 1, ///< glitch error | |
97 | kPaddingWordErr = 2, ///< padding word error | |
98 | kParityErr = 3 ///< parity error | |
99 | }; | |
100 | ||
9f5dcca3 | 101 | private : |
71a2d3aa | 102 | /// Not implemented |
103 | AliMUONRawStreamTracker(const AliMUONRawStreamTracker& stream); | |
104 | /// Not implemented | |
105 | AliMUONRawStreamTracker& operator = (const AliMUONRawStreamTracker& stream); | |
c0751163 | 106 | |
33434f31 | 107 | Bool_t GetNextDDL(); |
108 | Bool_t GetNextBlockHeader(); | |
109 | Bool_t GetNextDspHeader(); | |
110 | Bool_t GetNextBusStruct(); | |
c0751163 | 111 | |
7a0bb451 | 112 | |
33434f31 | 113 | private: |
dabf5427 | 114 | |
115 | AliMUONPayloadTracker* fPayload; ///< pointer to payload decoder | |
116 | AliMUONDDLTracker* fCurrentDDL; //!< for iterator: current ddl ptr | |
117 | Int_t fCurrentDDLIndex; //!< for iterator: current ddl index | |
33434f31 | 118 | AliMUONBlockHeader* fCurrentBlockHeader; //!< for iterator: current block ptr |
dabf5427 | 119 | Int_t fCurrentBlockHeaderIndex; //!< for iterator: current block index |
120 | AliMUONDspHeader* fCurrentDspHeader; //!< for iterator: current dsp ptr | |
121 | Int_t fCurrentDspHeaderIndex; //!< for iterator: current dsp index | |
122 | AliMUONBusStruct* fCurrentBusStruct; //!< for iterator: current bus ptr | |
123 | Int_t fCurrentBusStructIndex; //!< for iterator: current bus index | |
124 | Int_t fCurrentDataIndex; //!< for iterator: current data index | |
8a0dae7c | 125 | Int_t fDDL; //!< number of DDL |
dabf5427 | 126 | |
127 | ClassDef(AliMUONRawStreamTracker, 4) // base class for reading MUON raw digits | |
c0751163 | 128 | }; |
129 | ||
130 | #endif |