Cleaned up some more in AliL3MemHandler, by removing the AliL3Transform in
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Apr 2002 15:27:03 +0000 (15:27 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Apr 2002 15:27:03 +0000 (15:27 +0000)
arguments of member functions. This also required some changes in AliLevel3,
which make use of these functions.

HLT/src/AliL3MemHandler.cxx
HLT/src/AliL3MemHandler.h
HLT/src/AliLevel3.cxx

index 1002319256f63ee502eaaf43e47ba90a6261b05e..a355d8405b96b3a6a0358b6c0e2810584019512d 100644 (file)
@@ -974,8 +974,7 @@ Bool_t AliL3MemHandler::Memory2Binary(UInt_t npoint,AliL3SpacePointData *data)
   return kTRUE;
 }
 
-Bool_t AliL3MemHandler::Transform(UInt_t npoint,AliL3SpacePointData *data,
-                                 Int_t slice, AliL3Transform* trans)
+Bool_t AliL3MemHandler::Transform(UInt_t npoint,AliL3SpacePointData *data,Int_t slice)
 {
   //Transform the space points in data, to global coordinates in slice.
   if(!data){
@@ -983,8 +982,8 @@ Bool_t AliL3MemHandler::Transform(UInt_t npoint,AliL3SpacePointData *data,
     <<"Pointer to AliL3SpacePointData = 0x0 "<<ENDLOG;
     return kFALSE;
   }
-  if(!trans){
-    LOG(AliL3Log::kWarning,"AliL3MemHandler::Transform","Object")
+  if(!fTransformer){
+    LOG(AliL3Log::kError,"AliL3MemHandler::Transform","Object")
     <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
     return kFALSE;
   }
@@ -993,7 +992,7 @@ Bool_t AliL3MemHandler::Transform(UInt_t npoint,AliL3SpacePointData *data,
     xyz[0] = data[i].fX;
     xyz[1] = data[i].fY;
     xyz[2] = data[i].fZ;
-    trans->Local2Global(xyz,slice);
+    fTransformer->Local2Global(xyz,slice);
     data[i].fX = xyz[0];
     data[i].fY = xyz[1];
     data[i].fZ = xyz[2];
@@ -1240,11 +1239,10 @@ Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *d
   return kTRUE;
 }
 
-Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice,
-                                         AliL3Transform* trans)
+Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *data,AliL3TrackArray *array,Int_t slice)
 {
   //Fill the tracks in data into trackarray, and rotate the tracks to global coordinates.
-  
+    
   if(!data){
     LOG(AliL3Log::kWarning,"AliL3MemHandler::Memory2TrackArray","Memory")
     <<"Pointer to AliL3TrackSegmentData = 0x0 "<<ENDLOG;
@@ -1255,12 +1253,12 @@ Bool_t AliL3MemHandler::Memory2TrackArray(UInt_t ntrack,AliL3TrackSegmentData *d
     <<"Pointer to AliL3TrackArray = 0x0 "<<ENDLOG;
     return kFALSE;
   }
-  if(!trans){
-    LOG(AliL3Log::kWarning,"AliL3MemHandler::Memory2TrackArray","Object")
+  if(!fTransformer){
+    LOG(AliL3Log::kError,"AliL3MemHandler::Memory2TrackArray","Object")
     <<"Pointer to AliL3Transform = 0x0 "<<ENDLOG;
     return kFALSE;
   }
-  array->FillTracks(ntrack,data,slice,trans);
+  array->FillTracks(ntrack,data,slice,fTransformer);
   return kTRUE;
 }
 
index c2f776ae5c30c9f2f27fce515d1b1f4f1cd15d59..abd768117c0103761f0b709eeff759aa5614a0c6 100644 (file)
@@ -59,7 +59,7 @@ class AliL3MemHandler{
   virtual ~AliL3MemHandler();
   
   void Reset(){CloseBinaryInput();CloseBinaryOutput();Free();}  
-  void Init(AliL3Transform *t){fTransformer = t;}
+  void SetTransformer(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);
@@ -98,8 +98,7 @@ class AliL3MemHandler{
   //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 +111,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
index 97dc2a915faf9d396cff4efecc1259ece07e6454..4c66ae5a383262ae38f0e289662cdcd5e2402e90 100644 (file)
@@ -259,7 +259,7 @@ void AliLevel3::ProcessSlice(Int_t slice){
   fTrackMerger->SetRows(fRow[0]);
   for(Int_t patch=fNPatch-1;patch>=0;patch--){
     fFileHandler->Init(slice,patch,fRow[patch]);
-    fFileHandler->Init(fTransformer);
+    fFileHandler->SetTransformer(fTransformer);
     UInt_t npoints=0;
     AliL3SpacePointData *points =0;
     UInt_t ndigits=0;
@@ -514,8 +514,9 @@ void AliLevel3::WriteSpacePoints(UInt_t npoints,AliL3SpacePointData *points,
   char name[256];
   sprintf(name,"%spoints_%d_%d.raw",fWriteOutPath,slice,patch);
   AliL3MemHandler * memory = new AliL3MemHandler();
+  memory->SetTransformer(fTransformer);
   memory->SetBinaryOutput(name);
-  memory->Transform(npoints,points,slice,fTransformer);
+  memory->Transform(npoints,points,slice);
   memory->Memory2Binary(npoints,points);
   memory->CloseBinaryOutput();
   delete  memory;