Changed parameters of WriteRootFile
authorvestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Oct 2002 17:10:18 +0000 (17:10 +0000)
committervestbo <vestbo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Oct 2002 17:10:18 +0000 (17:10 +0000)
HLT/comp/AliL3Compress.cxx
HLT/comp/AliL3Compress.h

index c8b532d..968d0b0 100644 (file)
@@ -729,19 +729,23 @@ void AliL3Compress::QSort(AliL3RandomDigitData **a, Int_t first, Int_t last)
   }
 }
 
-void AliL3Compress::WriteRootFile(Char_t *newrootfile)
+void AliL3Compress::WriteRootFile(Char_t *newrootfile,Char_t *digitfile)
 {
 #ifdef use_aliroot
   Char_t fname[100];
   AliL3MemHandler *mem = new AliL3MemHandler();
-  sprintf(fname,"%s/comp/restored_%d_%d.raw",fPath,fSlice,fPatch);
+  sprintf(fname,"%s/comp/remains_%d_%d.raw",fPath,fSlice,fPatch);
+  mem->Init(fSlice,fPatch);
   mem->SetBinaryInput(fname);
   UInt_t ndigits;
   AliL3DigitRowData *rowPt = (AliL3DigitRowData*)mem->CompBinary2Memory(ndigits);
   mem->CloseBinaryInput();
   
-  sprintf(fname,"%s/digitfile.root",fPath);
-  
+  if(!digitfile)
+    sprintf(fname,"%s/digitfile.root",fPath);
+  else
+    sprintf(fname,"%s",digitfile);
+
   AliL3FileHandler *file = new AliL3FileHandler();
   if(!file->SetAliInput(fname))
     {
index df4566c..172b4be 100644 (file)
@@ -44,7 +44,7 @@ class AliL3Compress {
   void ExpandFile();
   void RestoreData(Char_t which='u');
   void WriteRestoredData();
-  void WriteRootFile(Char_t *newrootfile);
+  void WriteRootFile(Char_t *newrootfile,Char_t *digitfile=0);
   void PrintDigits(Int_t padrow=-1);
   void PrintCompRatio(FILE *outfile=0);