minor bugfixes (table names); get rid of warnings(Jenny)
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 08:19:15 +0000 (08:19 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 May 2008 08:19:15 +0000 (08:19 +0000)
HLT/comp/AliHLTCOMPHuffmanAltro.cxx
HLT/comp/AliHLTCompPreprocessor.cxx
HLT/comp/AliHLTCompPreprocessor.h

index 07166fb..766e57c 100644 (file)
@@ -1214,15 +1214,15 @@ Int_t AliHLTCOMPHuffmanAltro::CreateCodeTable()
   fTranslationTable = new AliHLTCOMPHuffmanCodeData::AliHLTCOMPHuffmanCodeStruct[TIMEBINS];
 
   // initialise the array with validcodelengths 0 and codes = 0
-  for(Int_t kk = 0; kk < TIMEBINS; kk++)
+  for(Int_t kk1 = 0; kk1 < TIMEBINS; kk1++)
     {
       // validation test for correct HuffmanCode()
-      // fTranslationTable[kk].famplitude = TIMEBINS+1; // check if eventnames are written
+      // fTranslationTable[kk1].famplitude = TIMEBINS+1; // check if eventnames are written
 
-      fTranslationTable[kk].famplitude = kk;
-      fTranslationTable[kk].fhuffmancode = 0;
-      fTranslationTable[kk].fvalidcodelength = 0;
-      // fTranslationTable[kk].morecode = NULL;
+      fTranslationTable[kk1].famplitude = kk1;
+      fTranslationTable[kk1].fhuffmancode = 0;
+      fTranslationTable[kk1].fvalidcodelength = 0;
+      // fTranslationTable[kk1].morecode = NULL;
     }
 
   // create HuffmanCode and abort when HuffmanCode produces errors
@@ -1246,14 +1246,14 @@ Int_t AliHLTCOMPHuffmanAltro::CreateCodeTable()
     UInt_t maxcodelength = fTranslationTable[0].fvalidcodelength;
     UInt_t mincodelength = TIMEBINS;
 
-    for (Int_t kk = 0; kk < TIMEBINS; kk++)
+    for (Int_t kk2 = 0; kk2 < TIMEBINS; kk2++)
       {
-       //      if(fTranslationTable[kk].fvalidcodelength != 0) {cout << kk << " |  " << fTranslationTable[kk].fhuffmancode << " |  " << fTranslation "Table[kk].fvalidcodelength << endl;}
+       //      if(fTranslationTable[kk2].fvalidcodelength != 0) {cout << kk2 << " |  " << fTranslationTable[kk2].fhuffmancode << " |  " << fTranslation "Table[kk2].fvalidcodelength << endl;}
 
-       if(fTranslationTable[kk].fvalidcodelength > maxcodelength)
-         { maxcodelength = fTranslationTable[kk].fvalidcodelength;};
-       if( (fTranslationTable[kk].fvalidcodelength != 0) && (fTranslationTable[kk].fvalidcodelength < mincodelength) )
-         { mincodelength = fTranslationTable[kk].fvalidcodelength;};
+       if(fTranslationTable[kk2].fvalidcodelength > maxcodelength)
+         { maxcodelength = fTranslationTable[kk2].fvalidcodelength;};
+       if( (fTranslationTable[kk2].fvalidcodelength != 0) && (fTranslationTable[kk2].fvalidcodelength < mincodelength) )
+         { mincodelength = fTranslationTable[kk2].fvalidcodelength;};
       }
 
     // print results to screen
index 45caf73..483baf6 100644 (file)
@@ -25,7 +25,6 @@
 
 #include "AliHLTCompPreprocessor.h"
 #include "AliCDBMetaData.h"
-#include "AliPreprocessor.h"
 #include "TObjString.h"
 #include "TString.h"
 #include "TList.h"
@@ -92,6 +91,7 @@ UInt_t AliHLTCompPreprocessor::GetHuffmanTables()
   UInt_t retVal = 0;
 
   // get all huffman tables stored at FXS      
+  //TList* HuffmanList = GetFileSources(AliPreprocessor::kHLT, fgkHuffmanFileId);
   TList* HuffmanList = GetFileSources(AliPreprocessor::kHLT, fgkHuffmanFileId);
   // -> list of all DDL numbers that own a huffman table
 
@@ -106,16 +106,19 @@ UInt_t AliHLTCompPreprocessor::GetHuffmanTables()
   TList* TPCHuffmanList;
   TList* PHOSHuffmanList;
 
-  if(fTPCactive)
+  TPCHuffmanList = new TList();
+
+  if(!fTPCactive)
     {
-      TPCHuffmanList = new TList();
+      delete TPCHuffmanList;
     };
 
-  if(fPHOSactive)
+  PHOSHuffmanList = new TList();
+
+  if(!fPHOSactive)
     {
-      PHOSHuffmanList = new TList();
+      delete PHOSHuffmanList;
     };
-       
 
   // loop over all DDL numbers and put huffman tables into special containers
   // (one for each detector)
@@ -143,7 +146,7 @@ UInt_t AliHLTCompPreprocessor::GetHuffmanTables()
       TFile* currenthuffmanfile = new TFile(fileName, "READ");
 
       // if current huffman table file does not contain a table, return an error
-      if ( currenthuffmanfile->Get("fHuffmanData") == NULL)
+      if ( currenthuffmanfile->Get("HuffmanData") == NULL)
        {
          char logging[1000];
          sprintf(logging,"Local file %s does not contain a Huffman code table.", fileName.Data());
@@ -152,13 +155,13 @@ UInt_t AliHLTCompPreprocessor::GetHuffmanTables()
          retVal = 0;
        }
            
-      TObject* huffmandata = (TObject*) currenthuffmanfile->Get("fHuffmanData");
+      TObject* huffmandata = (TObject*) currenthuffmanfile->Get("HuffmanData");
       // class object not needed since container uses TObjects!
-      //AliHLTCOMPHuffmanData* currenthuffmandata = (AliHLTCOMPHuffmanData*) huffmandata;
+      AliHLTCOMPHuffmanData* currenthuffmandata = (AliHLTCOMPHuffmanData*) currenthuffmanfile->Get("HuffmanData");
 
       // specifications necessary for sorting process
-      TString detectororigin = "";//currenthuffmandata->GetOrigin();
-      Int_t tablespec = 0;//currenthuffmandata->GetDataSpec();
+      TString detectororigin = currenthuffmandata->GetOrigin();
+      Int_t tablespec = currenthuffmandata->GetDataSpec();
           
            
       // plug them into a container:
index 7ae0267..ad5505e 100644 (file)
@@ -20,6 +20,7 @@
 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
 
 #include "AliHLTModulePreprocessor.h"
+#include "AliHLTPreprocessor.h"
 
 /**
  * @class AliHLTCompPreprocessor