]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSubEventTracker.h
Removing extrap.F (Christian)
[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
7 #include <TObject.h>
8
9  const Int_t bufSize = 1024;
10
11 class AliMUONSubEventTracker : public TObject {
12
13 public:
14    AliMUONSubEventTracker ();
15    virtual ~AliMUONSubEventTracker ();
16    AliMUONSubEventTracker(const AliMUONSubEventTracker& rhs);
17    AliMUONSubEventTracker& operator=(const AliMUONSubEventTracker& rhs);
18
19    Int_t   GetTotalLength() const {return fTotalLength;}
20    Int_t   GetLength()      const {return fLength;}
21    Int_t   GetBusPatchId()  const {return fBusPatchId;}
22    Int_t   GetTriggerWord() const {return fTriggerWord;}
23    UInt_t  GetData(Int_t n) const {return fData[n];}
24    UInt_t* GetData()        const {return fData;}
25
26    Char_t   GetParity(Int_t n)    {return (Char_t)(fData[n] >> 29) &  0x7;}
27    UShort_t GetManuId(Int_t n)    {return (UShort_t)(fData[n] >> 18) &  0x7FF;}
28    Char_t   GetChannelId(Int_t n) {return (Char_t)(fData[n] >> 12) & 0x3F;}
29    UShort_t GetCharge(Int_t n)    {return (UShort_t)(fData[n] & 0xFFF);}
30
31    void    SetTotalLength(Int_t l) {fTotalLength = l;}
32    void    SetLength(Int_t l)      {fLength = l;}
33    void    SetBusPatchId(Int_t b)  {fBusPatchId = b;}  
34    void    SetTriggerWord(Int_t w) {fTriggerWord = w;}
35    void    SetData(UInt_t d, Int_t n)  {fData[n] = d; fLength++;}
36
37    void    AddData(UInt_t d);
38    void    SetAlloc(Int_t size);
39
40    Bool_t  IsSortable() const {return kTRUE;}
41    Int_t   Compare(const TObject *obj) const;
42
43    Int_t GetHeaderLength() const {return fgkHeaderLength;}
44
45    Int_t* GetAddress() {return &fTotalLength;}
46
47  private:
48    Int_t     fTotalLength;   // total length of buspatch structure
49    Int_t     fLength;        // length of raw data
50    Int_t     fBusPatchId;    // bus patch id
51    Int_t     fTriggerWord ;  // counter trigger word
52
53    static const Int_t fgkHeaderLength;   // header length in word
54
55    UInt_t*   fData;          // data 
56
57    Int_t     fBufSize;      // initial size for data array
58
59    void ResizeData(Int_t size = 0);
60
61    ClassDef(AliMUONSubEventTracker,1)  // MUON DDL Tracker
62 };
63 #endif