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 */
9 /// \class AliMUONRawStreamTracker
10 /// \brief Class for reading MUON raw digits
12 // Author: Christian Finck
15 #include "AliMUONPayloadTracker.h"
16 #include "AliMUONVRawStreamTracker.h"
19 class AliMUONDDLTracker;
20 class AliMUONDspHeader;
21 class AliMUONBusStruct;
22 class AliMUONBlockHeader;
24 class AliMUONRawStreamTracker: public AliMUONVRawStreamTracker {
26 AliMUONRawStreamTracker();
27 AliMUONRawStreamTracker(AliRawReader* rawReader);
28 virtual ~AliMUONRawStreamTracker();
30 /// Initialize iterator
33 /// Returns current DDL object during iteration
34 AliMUONDDLTracker* CurrentDDL() const { return fCurrentDDL; }
36 /// Returns current BlockHeader object during iteration
37 AliMUONBlockHeader* CurrentBlockHeader() const { return fCurrentBlockHeader; }
39 /// Returns current DspHeader object during iteration
40 AliMUONDspHeader* CurrentDspHeader() const { return fCurrentDspHeader; }
42 /// Returns current BusStruct object during iteration
43 AliMUONBusStruct* CurrentBusStruct() const { return fCurrentBusStruct; }
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,
50 virtual Bool_t NextDDL();
52 /// Return maximum number of block per DDL in DATE file
53 Int_t GetMaxBlock() const {return fPayload->GetMaxBlock();}
54 /// Return maximum number of Dsp per block in DATE file
55 Int_t GetMaxDsp() const {return fPayload->GetMaxDsp();}
56 /// Return maximum number of Buspatch per Dsp in DATE file
57 Int_t GetMaxBus() const {return fPayload->GetMaxBus();}
59 // check input before assigment
60 void SetMaxBlock(Int_t blk);
62 /// Set maximum number of Dsp per block in DATE file
63 /// does not check, done via BusPatchManager
64 void SetMaxDsp(Int_t dsp) {fPayload->SetMaxDsp(dsp);}
65 /// Set maximum number of Buspatch per Dsp in DATE file
66 /// does not check, done via BusPatchManager
67 void SetMaxBus(Int_t bus) {fPayload->SetMaxBus(bus);}
69 /// Return pointer for DDL
70 AliMUONDDLTracker* GetDDLTracker() const {return fPayload->GetDDLTracker();}
72 /// Return number of DDL
73 Int_t GetDDL() const {return fDDL - 1;}
75 /// Return current DDL index
76 Int_t GetCurentDDL() const {return fCurrentDDLIndex;}
78 /// Return pointer for payload
79 AliMUONPayloadTracker* GetPayLoad() const {return fPayload;}
81 /// Whether the iteration is finished or not
82 Bool_t IsDone() const;
84 /// add error message into error logger
85 void AddErrorMessage();
88 void DisableWarnings() {fPayload->DisableWarnings();}
90 /// check error/Warning presence
91 Bool_t IsErrorMessage() const;
94 enum rawStreamTrackerError {
95 kGlitchErr = 1, ///< glitch error
96 kPaddingWordErr = 2, ///< padding word error
97 kParityErr = 3 ///< parity error
102 AliMUONRawStreamTracker(const AliMUONRawStreamTracker& stream);
104 AliMUONRawStreamTracker& operator = (const AliMUONRawStreamTracker& stream);
107 Bool_t GetNextBlockHeader();
108 Bool_t GetNextDspHeader();
109 Bool_t GetNextBusStruct();
114 AliMUONPayloadTracker* fPayload; ///< pointer to payload decoder
115 AliMUONDDLTracker* fCurrentDDL; //!< for iterator: current ddl ptr
116 Int_t fCurrentDDLIndex; //!< for iterator: current ddl index
117 AliMUONBlockHeader* fCurrentBlockHeader; //!< for iterator: current block ptr
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
124 Int_t fDDL; //!< number of DDL
126 ClassDef(AliMUONRawStreamTracker, 4) // base class for reading MUON raw digits