]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RAW/AliRawReader.h
Adding MUON HLT code to the repository.
[u/mrichter/AliRoot.git] / RAW / AliRawReader.h
index c80814201d19b68e9f6e25f831ab472bfd6dd7e6..f3a6f00ac561c2ca935b16fa80768b07cb70bd25 100644 (file)
@@ -30,6 +30,8 @@ class AliRawReader: public TObject {
     void             SkipInvalid(Bool_t skip = kTRUE)
       {fSkipInvalid = skip;};
     void             SelectEvents(Int_t type);
+    void             RequireHeader(Bool_t required = kTRUE)
+      {fRequireHeader = required;};
 
     virtual UInt_t   GetType() const = 0;
     virtual UInt_t   GetRunNumber() const = 0;
@@ -37,6 +39,7 @@ class AliRawReader: public TObject {
     virtual const UInt_t* GetTriggerPattern() const = 0;
     virtual const UInt_t* GetDetectorPattern() const = 0;
     virtual const UInt_t* GetAttributes() const = 0;
+    virtual const UInt_t* GetSubEventAttributes() const = 0;
     virtual UInt_t   GetLDCId() const = 0;
     virtual UInt_t   GetGDCId() const = 0;
 
@@ -52,8 +55,10 @@ class AliRawReader: public TObject {
       {if (GetEquipmentId() >= 0) return (GetEquipmentId() & 0xFF); else return -1;};
 
     Int_t            GetDataSize() const 
-      {if (fHeader) return fHeader->fSize - sizeof(AliRawDataHeader); 
-      else return GetEquipmentSize();};
+      {if (fHeader) {
+       if (fHeader->fSize != 0xFFFFFFFF) return fHeader->fSize - sizeof(AliRawDataHeader); 
+       else return GetEquipmentSize() - sizeof(AliRawDataHeader);
+      } else return GetEquipmentSize();};
 
     Int_t            GetVersion() const 
       {if (fHeader) return fHeader->fVersion; else return -1;};
@@ -63,9 +68,17 @@ class AliRawReader: public TObject {
     Bool_t           IsCompressed() const 
       {if (fHeader) return fHeader->TestAttribute(1); 
       else return kFALSE;};
+    Bool_t           TestBlockAttribute(Int_t index) const
+      {if (fHeader) return fHeader->TestAttribute(index); 
+      else return kFALSE;};
+    UChar_t          GetBlockAttributes() const 
+      {if (fHeader) return fHeader->GetAttributes(); 
+      else return 0;};
     UInt_t           GetStatusBits() const
       {if (fHeader) return fHeader->GetStatus(); 
       else return 0;};
+    const AliRawDataHeader* GetDataHeader() const
+      {return fHeader;}
 
     virtual Bool_t   ReadHeader() = 0;
     virtual Bool_t   ReadNextData(UChar_t*& data) = 0;
@@ -91,6 +104,8 @@ class AliRawReader: public TObject {
 
     virtual Bool_t   ReadNext(UChar_t* data, Int_t size) = 0;
 
+    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