Forgot to check in this the last time. Some changes in AliL3MemHandler as
[u/mrichter/AliRoot.git] / HLT / src / AliL3MemHandler.h
index 3df7c25c8260bc53a58880463c1a20fcac9e8bfb..c8c6901efb841f6c7461bb75da2c23ab79d90d2d 100644 (file)
@@ -5,7 +5,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "AliL3DigitData.h"
-#include "AliL3Transform.h"
+
 class AliL3SpacePointData;
 class AliL3DigitRowData;
 class AliL3TrackSegmentData;
@@ -14,9 +14,7 @@ class AliL3RandomPointData;
 
 class AliL3MemHandler{
  private:
-  AliL3Transform *fTransformer;//!
-  FILE *fInBinary;//!
-  FILE *fOutBinary;//!
+  
   Byte_t *fPt;//!
   UInt_t fSize;
 
@@ -43,6 +41,7 @@ class AliL3MemHandler{
                       UInt_t row,UShort_t pad,UShort_t time,UShort_t charge);
   void AddDataRandom(AliL3DigitData *data,UInt_t & ndata,
                       UInt_t row,UShort_t pad,UShort_t time,UShort_t charge);
+  
 
  protected:
   Int_t fRowMin;
@@ -53,13 +52,14 @@ class AliL3MemHandler{
   Int_t fEtaMinTimeBin[176];
   Int_t fEtaMaxTimeBin[176];
   
-
+  FILE *fInBinary;//!
+  FILE *fOutBinary;//!
+  
  public:
   AliL3MemHandler();
   virtual ~AliL3MemHandler();
   
   void Reset(){CloseBinaryInput();CloseBinaryOutput();Free();}  
-  void Init(AliL3Transform *t){fTransformer = t;}
   void Init(Int_t s,Int_t p,const Int_t* row){fSlice=s;fPatch=p;fRowMin=row[0];fRowMax=row[1]; ResetROI();}
 
   Bool_t SetBinaryInput(char *name);
@@ -91,15 +91,15 @@ class AliL3MemHandler{
   Bool_t CompMemory2CompBinary(UInt_t nrow,UInt_t *comp, UInt_t size=0);
   Bool_t CompBinary2CompMemory(UInt_t & nrow,UInt_t *comp);
 
-  AliL3DigitRowData *CompBinary2Memory(UInt_t & nrow);
-  Bool_t Memory2CompBinary(UInt_t nrow,AliL3DigitRowData *data);
+  virtual AliL3DigitRowData *CompBinary2Memory(UInt_t & nrow);
+  virtual Bool_t Memory2CompBinary(UInt_t nrow,AliL3DigitRowData *data);
+  
   UInt_t GetNRow(UInt_t *comp,UInt_t size);
 
   //Point IO
   Bool_t Memory2Binary(UInt_t npoint,AliL3SpacePointData *data);
   Bool_t Binary2Memory(UInt_t & npoint,AliL3SpacePointData *data);
-  Bool_t Transform(UInt_t npoint,AliL3SpacePointData *data,
-                              Int_t slice, AliL3Transform* trans);
+  Bool_t Transform(UInt_t npoint,AliL3SpacePointData *data,Int_t slice);
   static void UpdateRowPointer(AliL3DigitRowData *&tempPt);
   
   //Track IO
@@ -112,7 +112,7 @@ class AliL3MemHandler{
   Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,
                                              AliL3TrackArray *array);
   Bool_t Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,
-                          AliL3TrackArray *array,Int_t slice, AliL3Transform* trans);
+                          AliL3TrackArray *array,Int_t slice);
   
   
   //Memory Allocation
@@ -125,9 +125,10 @@ class AliL3MemHandler{
   Byte_t *Allocate(UInt_t size);
   Byte_t *Allocate();  // allocate size of Binary Input File
   Byte_t *Allocate(AliL3TrackArray *array);
+  Byte_t *GetDataPointer(UInt_t &size) {size = fSize; return fPt;}
   void   Free();
   
-  ClassDef(AliL3MemHandler,1) 
+  ClassDef(AliL3MemHandler,1) // Memory handler class
 };
 
 inline Int_t  AliL3MemHandler::ComparePoints(UInt_t row,UShort_t pad,UShort_t time){