]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReader.h
Code commit for Ramona, fix of warnings, add of AddTask macros and exchange of comments
[u/mrichter/AliRoot.git] / RAW / AliRawReader.h
index 0229aef3d1599e59de6201dfa70bf85274e0b33e..b2ee284adb9b42bf251b0f1bb14bd40246cd40b0 100644 (file)
 #include "AliRawDataErrorLog.h"
 #include "AliRawDataHeader.h"
 
+class THashList;
 class TChain;
 class AliRawEventHeaderBase;
-class AliRawEvent;
+class AliRawVEvent;
 
 class AliRawReader: public TObject {
+  friend class AliEveEventManager;
   public :
     AliRawReader();
     AliRawReader(const AliRawReader& rawReader);
@@ -44,7 +46,7 @@ class AliRawReader: public TObject {
       {fRequireHeader = required;};
 
     virtual const AliRawEventHeaderBase* GetEventHeader() const {return NULL;};
-    virtual const AliRawEvent* GetEvent() const {return NULL;}
+    virtual const AliRawVEvent* GetEvent() const {return NULL;}
 
     virtual UInt_t   GetType() const = 0;
     virtual UInt_t   GetRunNumber() const = 0;
@@ -61,6 +63,11 @@ class AliRawReader: public TObject {
       const UInt_t *id = GetEventId();
       return id ? ((id)[1]&0x00000fff) : 0;
     }
+    ULong64_t             GetEventIdAsLong() const {
+      return (((ULong64_t)GetPeriod() << 36) |
+             ((ULong64_t)GetOrbitID() << 12) |
+             (ULong64_t)GetBCID()); 
+    }
     virtual const UInt_t* GetTriggerPattern() const = 0;
     ULong64_t             GetClassMask() const {
       const UInt_t *pattern = GetTriggerPattern();
@@ -123,6 +130,10 @@ class AliRawReader: public TObject {
     virtual Bool_t   NextEvent() = 0;
     virtual Bool_t   RewindEvents() = 0;
     virtual Bool_t   GotoEvent(Int_t event);
+    virtual Bool_t   GotoEventWithID(Int_t event,
+                                    UInt_t period,
+                                    UInt_t orbitID,
+                                    UShort_t bcID);
     virtual Int_t    GetEventIndex() const { return -1; }
     virtual Int_t    GetNumberOfEvents() const { return -1; }
 
@@ -162,8 +173,13 @@ class AliRawReader: public TObject {
 
     Bool_t           IsRawReaderValid() const { return fIsValid; }
 
+    void             LoadTriggerClass(const char* name, Int_t index);
+    void             LoadTriggerAlias(const THashList *lst);
+
+    virtual AliRawReader* CloneSingleEvent() const { return NULL; }
+
   protected :
-    virtual void     SelectEvents(Int_t type, ULong64_t triggerMask = 0);
+    virtual void     SelectEvents(Int_t type, ULong64_t triggerMask = 0, const char *triggerExpr = NULL);
     Bool_t           IsSelected() const;
     Bool_t           IsEventSelected() const;
 
@@ -181,6 +197,7 @@ class AliRawReader: public TObject {
     Bool_t           fSkipInvalid;          // skip invalid data
     Int_t            fSelectEventType;      // type of selected events (<0 = no selection)
     ULong64_t        fSelectTriggerMask;    // trigger mask for selecting events (0 = no selection)
+    TString          fSelectTriggerExpr;    // trigger expression for selecting events (empty = no selection)
 
     Int_t            fErrorCode;            // code of last error
 
@@ -193,6 +210,7 @@ class AliRawReader: public TObject {
     UShort_t SwapShort(UShort_t x) const;
 
     Bool_t           fIsValid;              // is raw-reader created successfully
+    Bool_t           fIsTriggerClassLoaded; // flags the call to LoadTriggerClass
 
     ClassDef(AliRawReader, 0) // base class for reading raw digits
 };