1 #ifndef ALIMUONVRAWSTREAMTRACKER_H
2 #define ALIMUONVRAWSTREAMTRACKER_H
3 /* This file is property of and copyright by the ALICE HLT Project *
4 * ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
10 /// \file AliMUONVRawStreamTracker.h
11 /// \author Artur Szostak <artursz@iafrica.com>
13 /// \brief Declaration of the abstract base class for muon trigger chamber raw stream decoders.
16 #include "AliMUONRawStream.h"
18 class AliMUONVRawStreamTracker : public AliMUONRawStream
22 /// Default constructor.
23 AliMUONVRawStreamTracker();
25 /// Constructor setting the raw reader.
26 AliMUONVRawStreamTracker(AliRawReader* rawReader);
28 /// Default destructor.
29 virtual ~AliMUONVRawStreamTracker();
31 /// Advance one step in the iteration. Returns false if finished.
32 virtual Bool_t Next(Int_t& busPatchId,
33 UShort_t& manuId, UChar_t& manuChannel,
36 /// Class used in the following Next() method to return blocks of decoded
37 /// channel data. This is better because we generate a lot fewer method calls.
41 /// Default constructor.
42 AliChannelInfo(Int_t busPatchId = 0, UShort_t manuId = 0, UChar_t channelId = 0, UShort_t adc = 0) :
43 fBusPatchId(busPatchId), fManuId(manuId), fChannelId(channelId), fADC(adc)
46 /// Returns the bus patch ID.
47 Int_t BusPatchId() const { return fBusPatchId; }
48 /// Returns the MANU ID.
49 UShort_t ManuId() const { return fManuId; }
50 /// Returns the channel ID.
51 UShort_t ChannelId() const { return fChannelId; }
53 UShort_t ADC() const { return fADC; }
56 Int_t fBusPatchId; //!< The bus patch ID for this channel.
57 UShort_t fManuId; //!< MANU ID.
58 UChar_t fChannelId; //!< MANU channel ID.
59 UShort_t fADC; //!< ADC signal.
62 /// Returns the next batch of decoded channel data.
63 /// [out] \param channels This is filled with the pointer to the array
64 /// containing the channel information.
65 /// \return The number of elements in the 'channels' array is returned.
66 /// Zero is returned if there are no more digits to be fetched.
67 virtual UInt_t Next(const AliChannelInfo*& channels) = 0;
69 /// Return maximum number of DDLs
70 static Int_t GetMaxDDL() { return fgkMaxDDL; };
72 /// Return maximum number of blocks per DDL allowed.
73 virtual Int_t GetMaxBlock() const = 0;
74 /// Return maximum number of Dsp per block allowed.
75 virtual Int_t GetMaxDsp() const = 0;
76 /// Return maximum number of Buspatch per Dsp allowed.
77 virtual Int_t GetMaxBus() const = 0;
79 /// Set maximum number of blocks per DDL allowed.
80 virtual void SetMaxBlock(Int_t blk) = 0;
81 /// Set maximum number of Dsp per block allowed.
82 virtual void SetMaxDsp(Int_t dsp) = 0;
83 /// Set maximum number of Buspatch per Dsp allowed.
84 virtual void SetMaxBus(Int_t bus) = 0;
86 /// Return number of the current DDL.
87 virtual Int_t GetDDL() const = 0;
89 /// check error/Warning presence
90 virtual Bool_t IsErrorMessage() const = 0;
93 enum rawStreamTrackerError
95 kGlitchErr = 1, ///< glitch error
96 kPaddingWordErr = 2, ///< padding word error
97 kParityErr = 3 ///< parity error
102 // Do not allow copying of this class.
104 AliMUONVRawStreamTracker(const AliMUONVRawStreamTracker& stream);
106 AliMUONVRawStreamTracker& operator = (const AliMUONVRawStreamTracker& stream);
108 static const Int_t fgkMaxDDL; //!< maximum number of DDLs
110 ClassDef(AliMUONVRawStreamTracker, 0) // Base class for reading MUON raw digits from tracking chambers.
113 #endif // ALIMUONVRAWSTREAMTRACKER_H