]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReader.h
fStopped flags the stopping condition.
[u/mrichter/AliRoot.git] / RAW / AliRawReader.h
index 13411b70fe5f69b9639e52afe69c6d6e7a333623..daf56642212428be8a1a40949426c5f667745d03 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TObject.h>
+#include <TArrayI.h>
 #include "AliRawDataHeader.h"
 
+class AliRawEventHeaderBase;
 
 class AliRawReader: public TObject {
   public :
     AliRawReader();
     AliRawReader(const AliRawReader& rawReader);
     AliRawReader& operator = (const AliRawReader& rawReader);
-    virtual ~AliRawReader() {};
+    virtual ~AliRawReader();
 
     void             Select(Int_t detectorID, 
                            Int_t minDDLID = -1, Int_t maxDDLID = -1);
+    void             Select(const char *detectorName, 
+                           Int_t minDDLID = -1, Int_t maxDDLID = -1);
     void             SelectEquipment(Int_t equipmentType, 
                                     Int_t minEquipmentId = -1, 
                                     Int_t maxEquipmentId = -1);
@@ -33,6 +37,8 @@ class AliRawReader: public TObject {
     virtual void     RequireHeader(Bool_t required)
       {fRequireHeader = required;};
 
+    virtual const AliRawEventHeaderBase* GetEventHeader() const {return NULL;};
+
     virtual UInt_t   GetType() const = 0;
     virtual UInt_t   GetRunNumber() const = 0;
     virtual const UInt_t* GetEventId() const = 0;
@@ -46,14 +52,14 @@ class AliRawReader: public TObject {
     virtual Int_t    GetEquipmentSize() const = 0;
     virtual Int_t    GetEquipmentType() const = 0;
     virtual Int_t    GetEquipmentId() const = 0;
+    Int_t            GetMappedEquipmentId() const;
+    Bool_t           LoadEquipmentIdsMap(const char *fileName);
     virtual const UInt_t* GetEquipmentAttributes() const = 0;
     virtual Int_t    GetEquipmentElementSize() const = 0;
     virtual Int_t    GetEquipmentHeaderSize() const = 0;
 
-    Int_t            GetDetectorID() const 
-      {if (GetEquipmentId() >= 0) return (GetEquipmentId() >> 8); else return -1;};
-    Int_t            GetDDLID() const 
-      {if (GetEquipmentId() >= 0) return (GetEquipmentId() & 0xFF); else return -1;};
+    Int_t            GetDetectorID() const;
+    Int_t            GetDDLID() const;
 
     Int_t            GetDataSize() const 
       {if (fHeader) {
@@ -104,18 +110,21 @@ class AliRawReader: public TObject {
     Bool_t           IsSelected() const;
     Bool_t           IsEventSelected() const;
 
-    Bool_t           fRequireHeader; // if false, data without header is accepted
+    TArrayI         *fEquipmentIdsIn;       // array of equipment Ids to be mapped
+    TArrayI         *fEquipmentIdsOut;      // array of mapped equipment Ids
+
+    Bool_t           fRequireHeader;        // if false, data without header is accepted
 
-    AliRawDataHeader* fHeader;     // current data header
-    Int_t            fCount;       // counter of bytes to be read for current DDL
+    AliRawDataHeader* fHeader;              // current data header
+    Int_t            fCount;                // counter of bytes to be read for current DDL
 
     Int_t            fSelectEquipmentType;  // type of selected equipment (<0 = no selection)
     Int_t            fSelectMinEquipmentId; // minimal index of selected equipment (<0 = no selection)
     Int_t            fSelectMaxEquipmentId; // maximal index of selected equipment (<0 = no selection)
-    Bool_t           fSkipInvalid;       // skip invalid data
-    Int_t            fSelectEventType;   // type of selected events (<0 = no selection)
+    Bool_t           fSkipInvalid;          // skip invalid data
+    Int_t            fSelectEventType;      // type of selected events (<0 = no selection)
 
-    Int_t            fErrorCode;         // code of last error
+    Int_t            fErrorCode;            // code of last error
 
     ClassDef(AliRawReader, 0) // base class for reading raw digits
 };