]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONBlockHeader.h
Loading libraries needed for reading & decoding rawdata
[u/mrichter/AliRoot.git] / MUON / AliMUONBlockHeader.h
1 #ifndef ALIMUONBLOCKHEADER_H
2 #define ALIMUONBLOCKHEADER_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 AliMUONBlockHeader
10 /// \brief MUON block header for tracker event
11 ///
12 /// \author Christian Finck
13
14 #include <TObject.h>
15 #include <TClonesArray.h>
16
17 class AliMUONDspHeader;
18
19 class AliMUONBlockHeader : public TObject {
20
21 public:
22    AliMUONBlockHeader();
23    AliMUONBlockHeader(const AliMUONBlockHeader &event);
24    AliMUONBlockHeader& operator=(const AliMUONBlockHeader &event);
25
26    virtual ~AliMUONBlockHeader();
27
28    // Block header
29    Int_t   GetTotalLength()    const {return fTotalLength;}
30    Int_t   GetLength()         const {return fLength;}
31    Int_t   GetDspId()          const {return fDspId;}
32    Int_t   GetTriggerWord(Int_t n) const {return fTriggerWord[n];}
33    Int_t   GetPadding()        const {return fPadding;}
34    Int_t   GetHeaderLength()   const {return fgkHeaderLength;}
35
36    void    SetTotalLength(Int_t l) {fTotalLength = l;}
37    void    SetLength(Int_t l)      {fLength = l;}
38    void    SetDspId(Int_t d)       {fDspId = d;}  
39    void    SetTriggerWord(Int_t w, Int_t n) {fTriggerWord[n] = w;}
40
41    Int_t* GetHeader() {return &fTotalLength;}
42
43    void   AddDspHeader(const AliMUONDspHeader& dspHeader);
44
45    // get TClonesArray
46    TClonesArray*      GetDspHeaderArray()  const {return fDspHeaderArray;}
47
48    // get entries
49    Int_t              GetDspHeaderEntries() const {return fDspHeaderArray->GetEntriesFast();}
50
51    // get entry
52    AliMUONDspHeader*  GetDspHeaderEntry(Int_t i) const {
53      return (AliMUONDspHeader*)fDspHeaderArray->At(i);}
54
55    // clear
56    void Clear(Option_t* opt);
57
58  private:
59
60    // block header
61    Int_t     fTotalLength;    // total length of block structure (w/o padding word)
62    Int_t     fLength;         // length of raw data
63    Int_t     fDspId;          // Dsp id
64    Int_t     fTriggerWord[4]; // counter trigger word
65    Int_t     fPadding;        // padding dummy word for 64 bits transfer
66
67    static const Int_t fgkHeaderLength; // header length in word
68  
69    TClonesArray*  fDspHeaderArray;  // array of block header
70
71    ClassDef(AliMUONBlockHeader,1)  // MUON block header for Tracker event
72 };
73 #endif