]>
Commit | Line | Data |
---|---|---|
04fa961a | 1 | #ifndef ALIRAWREADERROOT_H |
2 | #define ALIRAWREADERROOT_H | |
3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
4 | * See cxx source for full Copyright notice */ | |
5 | ||
bea6b2a4 | 6 | /* $Id$ */ |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | /// | |
10 | /// This is a class for reading raw data from a root file. | |
11 | /// | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
04fa961a | 14 | #include "AliRawReader.h" |
15 | ||
33314186 | 16 | class AliRawVEvent; |
17 | class AliRawVEquipment; | |
42d20574 | 18 | class AliRawData; |
19 | class TFile; | |
dd9a70fe | 20 | class TBranch; |
42d20574 | 21 | |
04fa961a | 22 | |
23 | class AliRawReaderRoot: public AliRawReader { | |
24 | public : | |
6923e953 | 25 | AliRawReaderRoot(); |
dd9a70fe | 26 | AliRawReaderRoot(const char* fileName, Int_t eventNumber = -1); |
33314186 | 27 | AliRawReaderRoot(AliRawVEvent* event); |
42d20574 | 28 | AliRawReaderRoot(const AliRawReaderRoot& rawReader); |
29 | AliRawReaderRoot& operator = (const AliRawReaderRoot& rawReader); | |
04fa961a | 30 | virtual ~AliRawReaderRoot(); |
31 | ||
1fb5b4a8 | 32 | virtual const AliRawEventHeaderBase* GetEventHeader() const; |
33 | ||
42d20574 | 34 | virtual UInt_t GetType() const; |
35 | virtual UInt_t GetRunNumber() const; | |
36 | virtual const UInt_t* GetEventId() const; | |
37 | virtual const UInt_t* GetTriggerPattern() const; | |
38 | virtual const UInt_t* GetDetectorPattern() const; | |
39 | virtual const UInt_t* GetAttributes() const; | |
e94ad92c | 40 | virtual const UInt_t* GetSubEventAttributes() const; |
c946ab02 | 41 | virtual UInt_t GetLDCId() const; |
42d20574 | 42 | virtual UInt_t GetGDCId() const; |
741c154c | 43 | virtual UInt_t GetTimestamp() const; |
04fa961a | 44 | |
c946ab02 | 45 | virtual Int_t GetEquipmentSize() const; |
46 | virtual Int_t GetEquipmentType() const; | |
47 | virtual Int_t GetEquipmentId() const; | |
48 | virtual const UInt_t* GetEquipmentAttributes() const; | |
49 | virtual Int_t GetEquipmentElementSize() const; | |
299738b9 | 50 | virtual Int_t GetEquipmentHeaderSize() const; |
c946ab02 | 51 | |
52 | virtual Bool_t ReadHeader(); | |
04fa961a | 53 | virtual Bool_t ReadNextData(UChar_t*& data); |
bf22797a | 54 | virtual Bool_t ReadNext(UChar_t* data, Int_t size); |
04fa961a | 55 | |
56 | virtual Bool_t Reset(); | |
57 | ||
dd9a70fe | 58 | virtual Bool_t NextEvent(); |
59 | virtual Bool_t RewindEvents(); | |
636c1780 | 60 | virtual Bool_t GotoEvent(Int_t event); |
61 | virtual Int_t GetEventIndex() const { return fEventIndex; } | |
25e82ff5 | 62 | virtual Int_t GetNumberOfEvents() const; |
dd9a70fe | 63 | |
b4857df7 | 64 | virtual Int_t CheckData() const; |
65 | ||
33314186 | 66 | virtual const AliRawVEvent* GetEvent() const {return fEvent;} |
b744fdd9 | 67 | |
b900a426 | 68 | virtual AliRawReader* CloneSingleEvent() const; |
69 | ||
04fa961a | 70 | protected : |
04fa961a | 71 | TFile* fFile; // raw data root file |
dd9a70fe | 72 | TBranch* fBranch; // branch of raw events |
73 | Int_t fEventIndex; // index of the event in the tree | |
33314186 | 74 | AliRawVEvent* fEvent; // (super) event |
75 | AliRawEventHeaderBase* fEventHeader; // (super) event header | |
04fa961a | 76 | Int_t fSubEventIndex; // index of current sub event |
33314186 | 77 | AliRawVEvent* fSubEvent; // current sub event |
94d918a7 | 78 | Int_t fEquipmentIndex; // index of current equipment |
33314186 | 79 | AliRawVEquipment*fEquipment; // current equipment |
04fa961a | 80 | AliRawData* fRawData; // current raw data |
81 | UChar_t* fPosition; // current position in the raw data | |
82 | UChar_t* fEnd; // end position of the current subevent | |
83 | ||
edd06192 | 84 | void SwapData(const void* inbuf, const void* outbuf, UInt_t size); |
85 | ||
86 | ||
04fa961a | 87 | ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file |
88 | }; | |
89 | ||
90 | #endif |