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