]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONPayloadTracker.h
Modifications in AliESDMuonTrack:
[u/mrichter/AliRoot.git] / MUON / AliMUONPayloadTracker.h
1 #ifndef ALIMUONPAYLOADTRACKER_H
2 #define ALIMUONPAYLOADTRACKER_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
8 /// \ingroup raw
9 /// \class AliMUONPayloadTracker
10 /// \brief Class for decoding the payload for tracker raw data 
11 ///
12 //  Author Christian Finck
13
14 #include <TObject.h>
15 #include <TArrayI.h>
16
17 class AliMUONDDLTracker;
18 class AliMUONBusStruct;
19 class AliMUONDspHeader;
20 class AliMUONBlockHeader;
21
22 class AliMUONPayloadTracker: public TObject {
23   public :
24     AliMUONPayloadTracker();
25     virtual ~AliMUONPayloadTracker();
26
27     /// Return maximum number of block per DDL in DATE file
28     Int_t GetMaxBlock() const {return fMaxBlock;}
29     /// Return maximum number of Dsp per block in DATE file
30     Int_t GetMaxDsp()   const {return fMaxDsp;}
31     /// Return maximum number of Buspatch per Dsp in DATE file
32     Int_t GetMaxBus()   const {return fMaxBus;}
33
34     // check input before assigment
35     void SetMaxBlock(Int_t blk);
36
37     /// \brief Set maximum number of Dsp per block in DATE file
38     /// does not check, done via BusPatchManager
39     void SetMaxDsp(Int_t dsp) {fMaxDsp = dsp;}
40     /// \brief Set maximum number of Buspatch per Dsp in DATE file
41     /// does not check, done via BusPatchManager
42     void SetMaxBus(Int_t bus) {fMaxBus = bus;}
43
44     void ResetDDL();
45
46     Bool_t Decode(UInt_t* buffer, Int_t datasize);
47
48     /// Return pointer for local structure
49     AliMUONBusStruct*       GetBusPatchInfo() const {return fBusStruct;}
50     /// Return pointer for buspatch structure
51     AliMUONDDLTracker*      GetDDLTracker()   const {return fDDLTracker;}
52
53     /// Get number of parity errors
54     Int_t   GetParityErrors() const {return fParityErrBus.GetSize();} // for online
55     /// Get parity errors in buspatch
56     TArrayI GetParityErrBus() const {return fParityErrBus;} // for MOOD
57     /// Get number of glitch errors
58     Int_t   GetGlitchErrors() const {return fGlitchErrors;}
59     /// Get number of padding word errors
60     Int_t   GetPaddingErrors() const {return fPaddingErrors;}
61
62   private :
63     /// Not implemented
64     AliMUONPayloadTracker(const AliMUONPayloadTracker& stream);
65     /// Not implemented
66     AliMUONPayloadTracker& operator = (const AliMUONPayloadTracker& stream);
67
68     Bool_t CheckDataParity();
69     void   AddParityErrBus(Int_t buspatch);
70
71     Int_t  fBusPatchId;   ///< entry of buspatch structure
72     Int_t  fDspId;        ///< entry of Dsp header
73     Int_t  fBlkId;        ///< entry of Block header
74
75     Int_t fMaxDDL;        ///< maximum number of DDL in DATE file
76     Int_t fMaxBlock;      ///< maximum number of block per DDL in DATE file
77     Int_t fMaxDsp;        ///< maximum number of Dsp per block in DATE file
78     Int_t fMaxBus;        ///< maximum number of Buspatch per Dsp in DATE file
79
80     AliMUONDDLTracker*      fDDLTracker;      //!< pointer for buspatch structure
81     AliMUONBusStruct*       fBusStruct;       //!< pointer for local structure
82     AliMUONBlockHeader*     fBlockHeader;     //!< pointer for block structure 
83     AliMUONDspHeader*       fDspHeader;       //!< pointer for dsp structure 
84
85     TArrayI fParityErrBus;                    //!< list of buspatch with at least one parity errors;
86     Int_t   fGlitchErrors;                    //!< number of glitch errors;
87     Int_t   fPaddingErrors;                   //!< number of padding word errors;
88
89     ClassDef(AliMUONPayloadTracker, 3)    // base class for reading MUON raw digits
90 };
91
92 #endif