]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RAW/AliRawReaderRoot.h
Improvements in the raw-data dumping utility which allows to perform deeper checks...
[u/mrichter/AliRoot.git] / RAW / AliRawReaderRoot.h
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 AliRawEvent;
17 class AliRawEquipment;
18 class AliRawData;
19 class TFile;
20 class TBranch;
21
22
23 class AliRawReaderRoot: public AliRawReader {
24   public :
25     AliRawReaderRoot(const char* fileName, Int_t eventNumber = -1);
26     AliRawReaderRoot(AliRawEvent* event);
27     AliRawReaderRoot(const AliRawReaderRoot& rawReader);
28     AliRawReaderRoot& operator = (const AliRawReaderRoot& rawReader);
29     virtual ~AliRawReaderRoot();
30
31     virtual const AliRawEventHeaderBase* GetEventHeader() const;
32
33     virtual UInt_t   GetType() const;
34     virtual UInt_t   GetRunNumber() const;
35     virtual const UInt_t* GetEventId() const;
36     virtual const UInt_t* GetTriggerPattern() const;
37     virtual const UInt_t* GetDetectorPattern() const;
38     virtual const UInt_t* GetAttributes() const;
39     virtual const UInt_t* GetSubEventAttributes() const;
40     virtual UInt_t   GetLDCId() const;
41     virtual UInt_t   GetGDCId() const;
42     virtual UInt_t   GetTimestamp() const;
43
44     virtual Int_t    GetEquipmentSize() const;
45     virtual Int_t    GetEquipmentType() const;
46     virtual Int_t    GetEquipmentId() const;
47     virtual const UInt_t* GetEquipmentAttributes() const;
48     virtual Int_t    GetEquipmentElementSize() const;
49     virtual Int_t    GetEquipmentHeaderSize() const;
50
51     virtual Bool_t   ReadHeader();
52     virtual Bool_t   ReadNextData(UChar_t*& data);
53     virtual Bool_t   ReadNext(UChar_t* data, Int_t size);
54
55     virtual Bool_t   Reset();
56
57     virtual Bool_t   NextEvent();
58     virtual Bool_t   RewindEvents();
59
60     virtual Int_t    CheckData() const;
61
62   protected :
63     TFile*           fFile;         // raw data root file
64     TBranch*         fBranch;       // branch of raw events
65     Int_t            fEventIndex;   // index of the event in the tree
66     AliRawEvent*     fEvent;        // (super) event
67     Int_t            fSubEventIndex; // index of current sub event
68     AliRawEvent*     fSubEvent;     // current sub event
69     Int_t            fEquipmentIndex; // index of current equipment
70     AliRawEquipment* fEquipment;    // current equipment
71     AliRawData*      fRawData;      // current raw data
72     UChar_t*         fPosition;     // current position in the raw data
73     UChar_t*         fEnd;          // end position of the current subevent
74
75     void SwapData(const void* inbuf, const void* outbuf, UInt_t size);
76
77
78     ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file
79 };
80
81 #endif