]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSubEventTracker.h
Minor fixes in the event tag to take into account the new way of storing the trigger...
[u/mrichter/AliRoot.git] / MUON / AliMUONSubEventTracker.h
1 #ifndef ALIMUONSUBEVENTTRACKER_H
2 #define ALIMUONSUBEVENTTRACKER_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 rec
9 /// \class AliMUONSubEventTracker
10 /// \brief MUON subevent tracker
11 ///
12 /// Bus patch structure for tracker raw data
13 /// each Dsp contains at most 5 bus patch structure
14 /// Beside the total length and length of the below data
15 /// the header of the block contains the bus patch id, trigger words 
16 /// and data structure itself (11bits for manu id, 6 bits for channel id and
17 /// 12 bits for charge)
18 ///
19 /// \author Christian Finck
20
21 #include <TObject.h>
22
23 class AliMUONSubEventTracker : public TObject {
24
25 public:
26    AliMUONSubEventTracker ();
27    virtual ~AliMUONSubEventTracker ();
28    AliMUONSubEventTracker(const AliMUONSubEventTracker& rhs);
29    AliMUONSubEventTracker& operator=(const AliMUONSubEventTracker& rhs);
30
31    Int_t   GetTotalLength() const {return fTotalLength;}
32    Int_t   GetLength()      const {return fLength;}
33    Int_t   GetBufSize()     const {return fBufSize;}
34    Int_t   GetBusPatchId()  const {return fBusPatchId;}
35    Int_t   GetTriggerWord() const {return fTriggerWord;}
36    UInt_t  GetData(Int_t n) const;
37    UInt_t* GetData()        const {return fData;}
38
39    Char_t   GetParity(Int_t n) const;
40    UShort_t GetManuId(Int_t n) const;
41    Char_t   GetChannelId(Int_t n) const;
42    UShort_t GetCharge(Int_t n) const;
43
44    void    SetBusPatchId(Int_t b)  {fBusPatchId = b;}  
45    void    SetTriggerWord(Int_t w) {fTriggerWord = w;}
46
47    void    AddData(UInt_t d);
48    void    SetAlloc(Int_t size);
49
50    Bool_t  IsSortable() const {return kTRUE;}
51    Int_t   Compare(const TObject *obj) const;
52
53    Int_t   GetHeaderLength() const {return fgkHeaderLength;}
54
55    Int_t*  GetBusPatchHeader() {return &fTotalLength;}
56
57  private:
58    Int_t     fTotalLength;   // total length of buspatch structure
59    Int_t     fLength;        // length of raw data
60    Int_t     fBusPatchId;    // bus patch id
61    Int_t     fTriggerWord ;  // counter trigger word
62
63    static const Int_t fgkHeaderLength;   // header length in word
64
65    UInt_t*   fData;          // data 
66
67    Int_t     fBufSize;      // initial size for data array
68
69    void ResizeData(Int_t size = 0);
70
71    ClassDef(AliMUONSubEventTracker,1)  // MUON DDL Tracker
72 };
73 #endif