]>
Commit | Line | Data |
---|---|---|
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 | ||
6 | /* $Id$ */ | |
7 | ||
8 | /////////////////////////////////////////////////////////////////////////////// | |
9 | /// | |
10 | /// This is a class for reading raw data from a root file. | |
11 | /// | |
12 | /////////////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #include "AliRawReader.h" | |
15 | ||
16 | class AliRawVEvent; | |
17 | class AliRawVEquipment; | |
18 | class AliRawData; | |
19 | class TFile; | |
20 | class TBranch; | |
21 | ||
22 | ||
23 | class AliRawReaderRoot: public AliRawReader { | |
24 | public : | |
25 | AliRawReaderRoot(); | |
26 | AliRawReaderRoot(const char* fileName, Int_t eventNumber = -1); | |
27 | AliRawReaderRoot(AliRawVEvent* event); | |
28 | AliRawReaderRoot(const AliRawReaderRoot& rawReader); | |
29 | AliRawReaderRoot& operator = (const AliRawReaderRoot& rawReader); | |
30 | virtual ~AliRawReaderRoot(); | |
31 | ||
32 | virtual const AliRawEventHeaderBase* GetEventHeader() const; | |
33 | ||
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; | |
40 | virtual const UInt_t* GetSubEventAttributes() const; | |
41 | virtual UInt_t GetLDCId() const; | |
42 | virtual UInt_t GetGDCId() const; | |
43 | virtual UInt_t GetTimestamp() const; | |
44 | ||
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; | |
50 | virtual Int_t GetEquipmentHeaderSize() const; | |
51 | ||
52 | virtual Bool_t ReadHeader(); | |
53 | virtual Bool_t ReadNextData(UChar_t*& data); | |
54 | virtual Bool_t ReadNext(UChar_t* data, Int_t size); | |
55 | ||
56 | virtual Bool_t Reset(); | |
57 | ||
58 | virtual Bool_t NextEvent(); | |
59 | virtual Bool_t RewindEvents(); | |
60 | virtual Bool_t GotoEvent(Int_t event); | |
61 | virtual Int_t GetEventIndex() const { return fEventIndex; } | |
62 | virtual Int_t GetNumberOfEvents() const; | |
63 | ||
64 | virtual Int_t CheckData() const; | |
65 | ||
66 | virtual const AliRawVEvent* GetEvent() const {return fEvent;} | |
67 | ||
68 | virtual AliRawReader* CloneSingleEvent() const; | |
69 | static Bool_t GetUseOrder() {return fgUseOrder;} | |
70 | static void UseOrder() {fgUseOrder = kTRUE;} | |
71 | ||
72 | protected : | |
73 | TFile* fFile; // raw data root file | |
74 | TBranch* fBranch; // branch of raw events | |
75 | Int_t fEventIndex; // index of the event in the tree | |
76 | AliRawVEvent* fEvent; // (super) event | |
77 | AliRawEventHeaderBase* fEventHeader; // (super) event header | |
78 | Int_t fSubEventIndex; // index of current sub event | |
79 | AliRawVEvent* fSubEvent; // current sub event | |
80 | Int_t fEquipmentIndex; // index of current equipment | |
81 | AliRawVEquipment*fEquipment; // current equipment | |
82 | AliRawData* fRawData; // current raw data | |
83 | UChar_t* fPosition; // current position in the raw data | |
84 | UChar_t* fEnd; // end position of the current subevent | |
85 | Long64_t* fIndex; // Index of the tree | |
86 | static Bool_t fgUseOrder; // Flag to use or not sorting in decreased size order | |
87 | ||
88 | void SwapData(const void* inbuf, const void* outbuf, UInt_t size); | |
89 | void MakeIndex(); | |
90 | ||
91 | ||
92 | ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file | |
93 | }; | |
94 | ||
95 | #endif |