New method for reading input files (taking fragmented files int account)
authorhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Nov 2010 09:37:03 +0000 (09:37 +0000)
committerhaavard <haavard@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 18 Nov 2010 09:37:03 +0000 (09:37 +0000)
TPC/AliTPCPreprocessor.cxx

index 939d1f3..a202893 100644 (file)
@@ -984,14 +984,7 @@ UInt_t AliTPCPreprocessor::ExtractCE(Int_t sourceFXS)
       if (fileNameEntry!=NULL) {
         TString fileName = GetFile(sourceFXS, "CE",
                                    fileNameEntry->GetString().Data());
-        TFile *f = TFile::Open(fileName);
-        if (!f) {
-          Log ("Error opening central electrode file.");
-          result =2;
-          break;
-        }
-        AliTPCCalibCE *calCE;
-        f->GetObject("tpcCalibCE",calCE);
+        AliTPCCalibCE *calCE=AliTPCCalibCE::ReadFromFile(fileName.Data());        
         
         if (!calCE) {
           Log ("No valid calibCE object.");
@@ -1027,7 +1020,6 @@ UInt_t AliTPCPreprocessor::ExtractCE(Int_t sourceFXS)
         }
 
         delete calCE;
-        f->Close();
       }
       ++index;
     }  // while(list)