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 */
8 ///////////////////////////////////////////////////////////////////////////////
10 /// This is a class for reading raw data from a root file.
12 ///////////////////////////////////////////////////////////////////////////////
14 #include "AliRawReader.h"
17 class AliRawVEquipment;
23 class AliRawReaderRoot: public AliRawReader {
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();
32 virtual const AliRawEventHeaderBase* GetEventHeader() const;
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;
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;
52 virtual Bool_t ReadHeader();
53 virtual Bool_t ReadNextData(UChar_t*& data);
54 virtual Bool_t ReadNext(UChar_t* data, Int_t size);
56 virtual Bool_t Reset();
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;
64 virtual Int_t CheckData() const;
66 virtual const AliRawVEvent* GetEvent() const {return fEvent;}
68 virtual AliRawReader* CloneSingleEvent() const;
71 TFile* fFile; // raw data root file
72 TBranch* fBranch; // branch of raw events
73 Int_t fEventIndex; // index of the event in the tree
74 AliRawVEvent* fEvent; // (super) event
75 AliRawEventHeaderBase* fEventHeader; // (super) event header
76 Int_t fSubEventIndex; // index of current sub event
77 AliRawVEvent* fSubEvent; // current sub event
78 Int_t fEquipmentIndex; // index of current equipment
79 AliRawVEquipment*fEquipment; // current equipment
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
84 void SwapData(const void* inbuf, const void* outbuf, UInt_t size);
87 ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file