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