]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReaderRoot.h
Possibility for decreasing size ordering of events
[u/mrichter/AliRoot.git] / RAW / AliRawReaderRoot.h
index a6ca8029073b3b1c9bd40e91c3a1fbeeeb256e62..04b22addbeae550872274561a600a0bb501eedcb 100644 (file)
@@ -13,8 +13,8 @@
 
 #include "AliRawReader.h"
 
-class AliRawEvent;
-class AliRawEquipment;
+class AliRawVEvent;
+class AliRawVEquipment;
 class AliRawData;
 class TFile;
 class TBranch;
@@ -22,12 +22,15 @@ class TBranch;
 
 class AliRawReaderRoot: public AliRawReader {
   public :
+    AliRawReaderRoot();
     AliRawReaderRoot(const char* fileName, Int_t eventNumber = -1);
-    AliRawReaderRoot(AliRawEvent* event);
+    AliRawReaderRoot(AliRawVEvent* event);
     AliRawReaderRoot(const AliRawReaderRoot& rawReader);
     AliRawReaderRoot& operator = (const AliRawReaderRoot& rawReader);
     virtual ~AliRawReaderRoot();
 
+    virtual const AliRawEventHeaderBase* GetEventHeader() const;
+
     virtual UInt_t   GetType() const;
     virtual UInt_t   GetRunNumber() const;
     virtual const UInt_t* GetEventId() const;
@@ -37,6 +40,7 @@ class AliRawReaderRoot: public AliRawReader {
     virtual const UInt_t* GetSubEventAttributes() const;
     virtual UInt_t   GetLDCId() const;
     virtual UInt_t   GetGDCId() const;
+    virtual UInt_t   GetTimestamp() const;
 
     virtual Int_t    GetEquipmentSize() const;
     virtual Int_t    GetEquipmentType() const;
@@ -53,21 +57,37 @@ class AliRawReaderRoot: public AliRawReader {
 
     virtual Bool_t   NextEvent();
     virtual Bool_t   RewindEvents();
+    virtual Bool_t   GotoEvent(Int_t event);
+    virtual Int_t    GetEventIndex() const { return fEventIndex; }
+    virtual Int_t    GetNumberOfEvents() const;
 
     virtual Int_t    CheckData() const;
 
+    virtual const AliRawVEvent* GetEvent() const {return fEvent;}
+
+    virtual AliRawReader* CloneSingleEvent() const;
+    static Bool_t           GetUseOrder() {return fgUseOrder;}
+    static void             UseOrder() {fgUseOrder = kTRUE;}
+
   protected :
     TFile*           fFile;         // raw data root file
     TBranch*         fBranch;       // branch of raw events
     Int_t            fEventIndex;   // index of the event in the tree
-    AliRawEvent*     fEvent;        // (super) event
+    AliRawVEvent*    fEvent;        // (super) event
+    AliRawEventHeaderBase* fEventHeader; // (super) event header
     Int_t            fSubEventIndex; // index of current sub event
-    AliRawEvent*     fSubEvent;     // current sub event
+    AliRawVEvent*    fSubEvent;     // current sub event
     Int_t            fEquipmentIndex; // index of current equipment
-    AliRawEquipment* fEquipment;    // current equipment
+    AliRawVEquipment*fEquipment;    // current equipment
     AliRawData*      fRawData;      // current raw data
     UChar_t*         fPosition;     // current position in the raw data
     UChar_t*         fEnd;          // end position of the current subevent
+    Long64_t*        fIndex;       // Index of the tree
+    static Bool_t    fgUseOrder;       // Flag to use or not sorting in decreased size order
+
+    void SwapData(const void* inbuf, const void* outbuf, UInt_t size);
+    void MakeIndex();
+
 
     ClassDef(AliRawReaderRoot, 0) // class for reading raw digits from a root file
 };