New class AliESDEvent, backward compatibility with the old AliESD (Christian)
[u/mrichter/AliRoot.git] / MUON / AliMUONPayloadTracker.h
CommitLineData
939ae4b2 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
78649106 10/// \brief Class for decoding the payload for tracker raw data
939ae4b2 11///
78649106 12// Author Christian Finck
939ae4b2 13
14#include <TObject.h>
1ed3c5c2 15#include <TArrayI.h>
939ae4b2 16
17class AliMUONDDLTracker;
18class AliMUONBusStruct;
19class AliMUONDspHeader;
20class AliMUONBlockHeader;
21
22class AliMUONPayloadTracker: public TObject {
23 public :
24 AliMUONPayloadTracker();
939ae4b2 25 virtual ~AliMUONPayloadTracker();
26
71a2d3aa 27 /// Return maximum number of block per DDL in DATE file
939ae4b2 28 Int_t GetMaxBlock() const {return fMaxBlock;}
71a2d3aa 29 /// Return maximum number of Dsp per block in DATE file
939ae4b2 30 Int_t GetMaxDsp() const {return fMaxDsp;}
71a2d3aa 31 /// Return maximum number of Buspatch per Dsp in DATE file
939ae4b2 32 Int_t GetMaxBus() const {return fMaxBus;}
33
34 // check input before assigment
35 void SetMaxBlock(Int_t blk);
36
71a2d3aa 37 /// \brief Set maximum number of Dsp per block in DATE file
38 /// does not check, done via BusPatchManager
939ae4b2 39 void SetMaxDsp(Int_t dsp) {fMaxDsp = dsp;}
71a2d3aa 40 /// \brief Set maximum number of Buspatch per Dsp in DATE file
41 /// does not check, done via BusPatchManager
939ae4b2 42 void SetMaxBus(Int_t bus) {fMaxBus = bus;}
43
44 void ResetDDL();
45
84ceeb06 46 Bool_t Decode(UInt_t* buffer, Int_t datasize);
939ae4b2 47
71a2d3aa 48 /// Return pointer for local structure
939ae4b2 49 AliMUONBusStruct* GetBusPatchInfo() const {return fBusStruct;}
71a2d3aa 50 /// Return pointer for buspatch structure
939ae4b2 51 AliMUONDDLTracker* GetDDLTracker() const {return fDDLTracker;}
52
1ed3c5c2 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;}
ea59383d 59 /// Get number of padding word errors
60 Int_t GetPaddingErrors() const {return fPaddingErrors;}
1ed3c5c2 61
9f5dcca3 62 private :
71a2d3aa 63 /// Not implemented
64 AliMUONPayloadTracker(const AliMUONPayloadTracker& stream);
65 /// Not implemented
66 AliMUONPayloadTracker& operator = (const AliMUONPayloadTracker& stream);
67
68 Bool_t CheckDataParity();
1ed3c5c2 69 void AddParityErrBus(Int_t buspatch);
939ae4b2 70
939ae4b2 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
939ae4b2 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
1ed3c5c2 85 TArrayI fParityErrBus; //!< list of buspatch with at least one parity errors;
86 Int_t fGlitchErrors; //!< number of glitch errors;
ea59383d 87 Int_t fPaddingErrors; //!< number of padding word errors;
1ed3c5c2 88
ea59383d 89 ClassDef(AliMUONPayloadTracker, 3) // base class for reading MUON raw digits
939ae4b2 90};
91
92#endif