]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ITS/AliITSCompressRawDataSDD.h
correcting AliHLTGlobalTriggerDecision::Clear(): using Delete instead of Clear for...
[u/mrichter/AliRoot.git] / ITS / AliITSCompressRawDataSDD.h
index a733aa60bac5a638fde164a7cd65c09ffa762124..11f4f94f79302b69c226aa105dfb807aeafb9d23 100644 (file)
@@ -8,6 +8,8 @@
 
 #include<TObject.h>
 #include<TString.h>
+#include"AliRawReader.h"
+
 ///////////////////////////////////////////////////////////////////
 //                                                               //
 // Class to decode the SDD Raw Data from the CarlosRX format to  //
 class AliITSCompressRawDataSDD : public TObject {
 
  public:
-  AliITSCompressRawDataSDD(TString filename);
-  void SetEventRange(Int_t first, Int_t last){
-    fEventRange=kTRUE;
-    fFirstEvent=first;
-    fLastEvent=last;
+  AliITSCompressRawDataSDD();
+  ~AliITSCompressRawDataSDD();
+  void SetRawReader(AliRawReader* rd){
+    fRawReader=rd;
+  }
+  void SetPointerToData(UChar_t* pt){
+    fPointerToData=pt;
+  }
+  void SetSize(UInt_t siz){
+    fSizeInMemory=siz;
+  }
+
+  UInt_t CompressEvent(UChar_t* inputPtr);
+
+  static UInt_t MakeDataWord(Int_t carlos, Int_t side, Int_t anode, Int_t tb, Int_t adc){
+    UInt_t word= (carlos<<27) + (side<<26) + (anode<<18) + (tb<<10) + adc;
+    return word;
+  }
+
+  static UInt_t MakeEndOfModuleWord(Int_t carlos){
+    UInt_t word= (15<<28) + carlos;
+    return word;
+  }
+
+  static UInt_t MakeJitterWord(Int_t jitter){
+    UInt_t word= (8<<28) + jitter;
+    return word;
   }
-  void Compress();
 
  protected:
-  TString fNameFile;    // name of the raw data file
-  Bool_t  fEventRange;  // flag to select a range of events
-  Int_t   fFirstEvent;  // first event (used only if fEventRange==kTRUE)
-  Int_t   fLastEvent;  // first event (used only if fEventRange==kTRUE)
+
+ private:
+  AliITSCompressRawDataSDD(const AliITSCompressRawDataSDD& /*c*/);
+
+  AliITSCompressRawDataSDD& operator=(const AliITSCompressRawDataSDD& /*c*/);
+
+  AliRawReader* fRawReader; // pointer to raw reader
+  UChar_t* fPointerToData;   // pointer to the start of data in memory
+  UInt_t  fSizeInMemory;    // free space in memory in Bytes
 
   ClassDef(AliITSCompressRawDataSDD, 0)
 };