]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONSubEventTracker.h
Coding conventions (Rachid)
[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   GetBusPatchId()  const {return fBusPatchId;}
34    Int_t   GetTriggerWord() const {return fTriggerWord;}
35    UInt_t  GetData(Int_t n) const;
36    UInt_t* GetData()        const {return fData;}
37
38    Char_t   GetParity(Int_t n) const;
39    UShort_t GetManuId(Int_t n) const;
40    Char_t   GetChannelId(Int_t n) const;
41    UShort_t GetCharge(Int_t n) const;
42
43    void    SetBusPatchId(Int_t b)  {fBusPatchId = b;}  
44    void    SetTriggerWord(Int_t w) {fTriggerWord = w;}
45
46    void    AddData(UInt_t d);
47    void    SetAlloc(Int_t size);
48
49    Bool_t  IsSortable() const {return kTRUE;}
50    Int_t   Compare(const TObject *obj) const;
51
52    Int_t   GetHeaderLength() const {return fgkHeaderLength;}
53
54    Int_t*  GetBusPatchHeader() {return &fTotalLength;}
55
56  private:
57    Int_t     fTotalLength;   // total length of buspatch structure
58    Int_t     fLength;        // length of raw data
59    Int_t     fBusPatchId;    // bus patch id
60    Int_t     fTriggerWord ;  // counter trigger word
61
62    static const Int_t fgkHeaderLength;   // header length in word
63
64    UInt_t*   fData;          // data 
65
66    Int_t     fBufSize;      // initial size for data array
67
68    void ResizeData(Int_t size = 0);
69
70    ClassDef(AliMUONSubEventTracker,1)  // MUON DDL Tracker
71 };
72 #endif