]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONRawStream.h
ALIROOT-5420 Changes for CDH v3
[u/mrichter/AliRoot.git] / MUON / AliMUONRawStream.h
index caf0bdd95a2e8d0b4ef4bdca2c05b5dfae637ba9..b600483d4df4ef3300c49a6c58762c1dba20a029 100644 (file)
@@ -3,46 +3,69 @@
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
-/*$Id$*/
+// $Id$
 
-/// \ingroup rec
+/// \ingroup raw
 /// \class AliMUONRawStream
-/// \brief Class for reading MUON raw digits
+/// \brief Base class for reading MUON raw digits
 ///
-///////////////////////////////////////////////////////////////////////////////
-///
-/// This class provides access to MUON digits in raw data.
-///
-///////////////////////////////////////////////////////////////////////////////
+//  Author: Christian Finck
 
 #include <TObject.h>
 
 class AliRawReader;
 
-
 class AliMUONRawStream: public TObject {
   public :
+    AliMUONRawStream();
     AliMUONRawStream(AliRawReader* rawReader);
-    AliMUONRawStream(const AliMUONRawStream& stream);
-    AliMUONRawStream& operator = (const AliMUONRawStream& stream);
     virtual ~AliMUONRawStream();
 
-    virtual Bool_t   Next();
+    /// Initialize iterator
+    virtual void First() {return;} // not yet virtual pure, waiting for trigger
+    
+    /// DDL iterator 
+    virtual Bool_t NextDDL() = 0;
+
+    /// Whether the iteration is finished or not
+    virtual Bool_t IsDone() const {return kTRUE;} // not yet virtual pure, waiting for trigger
 
+    /// add error message into error logger
+    virtual void AddErrorMessage() = 0;
 
-  protected :
+    /// Set object for reading the raw data
+    virtual void SetReader(AliRawReader* rawReader) {fRawReader = rawReader;}
 
-    AliRawReader*    fRawReader;    // object for reading the raw data
+    /// Get object for reading the raw data
+    virtual AliRawReader* GetReader() {return fRawReader;}
 
-    static const Int_t fgkDataMax = 10000000; // size of array for uncompressed raw data
-    UShort_t*        fData;         // uncompressed raw data
-    Int_t            fDataSize;     // actual size of the uncompressed raw data
-    Int_t            fPosition;     // current position in fData
-    Int_t            fCount;        // counter of words to be read for current trailer
+    /// Enable error info logger
+    virtual void EnabbleErrorLogger() {fEnableErrorLogger = kTRUE;}
+
+    /// Check if error info logger enable
+    virtual Bool_t IsErrorLogger() const {return fEnableErrorLogger;}
+
+    /// swap method for Power PC
+    virtual void Swap(UInt_t *buffer, Int_t size) const;
+
+
+  private :
+    /// Not implemented
+    AliMUONRawStream(const AliMUONRawStream& stream);
+    /// Not implemented
+    AliMUONRawStream& operator = (const AliMUONRawStream& stream);
 
+    typedef struct {
+     UInt_t fB1:8; ///< first byte word
+     UInt_t fB2:8; ///< second byte word
+     UInt_t fB3:8; ///< third byte word
+     UInt_t fB4:8; ///< fourth byte word
+    } RawWord;
 
-    ClassDef(AliMUONRawStream, 0)    // base class for reading MUON raw digits
+    AliRawReader* fRawReader;    //!< object for reading the raw data  
+    Bool_t fEnableErrorLogger;   //!< flag to enable the error info logger
+    
+    ClassDef(AliMUONRawStream, 1)    // base class for reading MUON raw digits
 };
 
 #endif