]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/src/AliL3MemHandler.cxx
Not needed any more.
[u/mrichter/AliRoot.git] / HLT / src / AliL3MemHandler.cxx
index 34b13333ff56f386e8210c7d7682c01b56f8484c..1002319256f63ee502eaaf43e47ba90a6261b05e 100644 (file)
@@ -1,5 +1,8 @@
+/* $Id$
 // Author: Uli Frankenfeld <mailto:franken@fi.uib.no>
-//*-- Copyright &copy Uli 
+// -- Copyright &copy Uli 
+// changes done by Constantin Loizides <mailto:loizides@ikf.physik.uni-frankfurt.de>
+*/
 
 #include <math.h>
 #include <time.h>
 #include "AliL3SpacePointData.h"
 #include "AliL3TrackArray.h"
 
+/** \class AliL3MemHandler 
+//<pre>
 //_____________________________________________________________
 // AliL3MemHandler
 //
-// The L3 Binary File handler 
+// The HLT Binary File handler 
 //
 //
 //  This class does all the memory I/O handling on raw binary files.
 //  newfile.SetBinaryOutput(newfilename);
 //  newfile.Memory2CompBinary((UInt_t)NumberOfRowsInPatch,(AliL3DigitRowData*)data);
 //  newfile.CloseBinaryOutput();
+</pre> */  
   
-  
-
 ClassImp(AliL3MemHandler)
-
+  
 AliL3MemHandler::AliL3MemHandler()
 {
-  ///Constructor
+  //Constructor
   
   fPt = 0;
   fSize =0;
@@ -86,7 +90,7 @@ AliL3MemHandler::AliL3MemHandler()
   fNGenerate = 0;
   fNUsed = 0;
   fNDigits = 0;
-  
+  fTransformer = 0;
   Int_t row[2] = {0,175};
   Init(0,0,row);
   ResetROI();
@@ -122,7 +126,8 @@ void AliL3MemHandler::SetROI(Float_t *eta,Int_t *slice)
   //   eta[1] = maximum eta
   //   slice[0] = mimumum slice
   //   slice[1] = maximum slice
-  
+
+
   if(eta[1]==0)
     {
       LOG(AliL3Log::kWarning,"AliL3MemHandler::SetROI","Eta Values")
@@ -241,7 +246,6 @@ void AliL3MemHandler::CloseBinaryOutput()
   fOutBinary =0;
 }
 
-
 UInt_t AliL3MemHandler::GetFileSize()
 {
   //Returns the file size in bytes of the input file.
@@ -326,47 +330,47 @@ void AliL3MemHandler::SetRandomCluster(Int_t maxnumber)
   fDPt = new AliL3RandomDigitData *[fNRandom*9];
 }
 
-void AliL3MemHandler::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last)
-{
-  
-  // Sort array of AliL3RandomDigitData pointers using a quicksort algorithm.
-  // Uses CompareDigits() to compare objects.
-  // Thanks to Root!
-  
-  static AliL3RandomDigitData *tmp;
-  static int i;           // "static" to save stack space
-  int j;
-  
-  while (last - first > 1) {
-    i = first;
-    j = last;
-    for (;;) {
-      while (++i < last && CompareDigits(a[i], a[first]) < 0)
-       ;
-      while (--j > first && CompareDigits(a[j], a[first]) > 0)
-       ;
-      if (i >= j)
-       break;
-      
-      tmp  = a[i];
-      a[i] = a[j];
+void AliL3MemHandler::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last){
+
+   // Sort array of AliL3RandomDigitData pointers using a quicksort algorithm.
+   // Uses CompareDigits() to compare objects.
+   // Thanks to Root!
+
+   static AliL3RandomDigitData *tmp;
+   static int i;           // "static" to save stack space
+   int j;
+
+   while (last - first > 1) {
+      i = first;
+      j = last;
+      for (;;) {
+         while (++i < last && CompareDigits(a[i], a[first]) < 0)
+            ;
+         while (--j > first && CompareDigits(a[j], a[first]) > 0)
+            ;
+         if (i >= j)
+            break;
+
+         tmp  = a[i];
+         a[i] = a[j];
+         a[j] = tmp;
+      }
+      if (j == first) {
+         ++first;
+         continue;
+      }
+      tmp = a[first];
+      a[first] = a[j];
       a[j] = tmp;
-    }
-    if (j == first) {
-      ++first;
-      continue;
-    }
-    tmp = a[first];
-    a[first] = a[j];
-    a[j] = tmp;
-    if (j - first < last - (j + 1)) {
-      QSort(a, first, j);
-      first = j + 1;   // QSort(j + 1, last);
-    } else {
-      QSort(a, j + 1, last);
-      last = j;        // QSort(first, j);
-    }
-  }
+
+      if (j - first < last - (j + 1)) {
+       QSort(a, first, j);
+       first = j + 1;   // QSort(j + 1, last);
+      } else {
+       QSort(a, j + 1, last);
+       last = j;        // QSort(first, j);
+      }
+   }
 }
 
 UInt_t AliL3MemHandler::GetRandomSize()