]>
Commit | Line | Data |
---|---|---|
e3a2b9c9 | 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 */ | |
6 | ||
7 | /* $Id$*/ | |
8 | ||
9 | /// | |
10 | /// \file AliMUONVRawStreamTracker.h | |
11 | /// \author Artur Szostak <artursz@iafrica.com> | |
12 | /// \date 28-11-2007 | |
13 | /// \brief Declaration of the abstract base class for muon trigger chamber raw stream decoders. | |
14 | /// | |
15 | ||
16 | #include "AliMUONRawStream.h" | |
17 | ||
18 | class AliMUONVRawStreamTracker : public AliMUONRawStream | |
19 | { | |
20 | public: | |
21 | ||
22 | /// Default constructor. | |
23 | AliMUONVRawStreamTracker(); | |
24 | ||
25 | /// Constructor setting the raw reader. | |
26 | AliMUONVRawStreamTracker(AliRawReader* rawReader); | |
27 | ||
28 | /// Default destructor. | |
29 | virtual ~AliMUONVRawStreamTracker(); | |
30 | ||
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, | |
34 | UShort_t& adc) = 0; | |
35 | ||
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. | |
38 | class AliChannelInfo | |
39 | { | |
40 | public: | |
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) | |
44 | {} | |
45 | ||
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; } | |
52 | /// ADC signal. | |
53 | UShort_t ADC() const { return fADC; } | |
54 | ||
55 | private: | |
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. | |
60 | }; | |
61 | ||
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; | |
68 | ||
69 | /// Return maximum number of DDLs | |
70 | static Int_t GetMaxDDL() { return fgkMaxDDL; }; | |
71 | ||
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; | |
78 | ||
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; | |
85 | ||
86 | /// Return number of the current DDL. | |
87 | virtual Int_t GetDDL() const = 0; | |
88 | ||
89 | /// check error/Warning presence | |
90 | virtual Bool_t IsErrorMessage() const = 0; | |
91 | ||
92 | /// error numbers | |
93 | enum rawStreamTrackerError | |
94 | { | |
95 | kGlitchErr = 1, ///< glitch error | |
96 | kPaddingWordErr = 2, ///< padding word error | |
97 | kParityErr = 3 ///< parity error | |
98 | }; | |
99 | ||
100 | private: | |
101 | ||
102 | // Do not allow copying of this class. | |
103 | /// Not implemented | |
104 | AliMUONVRawStreamTracker(const AliMUONVRawStreamTracker& stream); | |
105 | /// Not implemented | |
106 | AliMUONVRawStreamTracker& operator = (const AliMUONVRawStreamTracker& stream); | |
107 | ||
108 | static const Int_t fgkMaxDDL; //!< maximum number of DDLs | |
109 | ||
110 | ClassDef(AliMUONVRawStreamTracker, 0) // Base class for reading MUON raw digits from tracking chambers. | |
111 | }; | |
112 | ||
113 | #endif // ALIMUONVRAWSTREAMTRACKER_H |