]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Protections added to avoid craches as indicated from Alberto Colla (G.V.)
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Oct 2007 13:34:57 +0000 (13:34 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 25 Oct 2007 13:34:57 +0000 (13:34 +0000)
HMPID/AliHMPIDPreprocessor.cxx

index 0f3c177ea4eb06b8a49237d0a5deb7b030f0cd5f..1e4bb8d51c76ee69e0ff8347ce76be2b67341d6f 100644 (file)
@@ -9,6 +9,7 @@
 #include <TTimeStamp.h>           //Initialize()
 #include <TF1.h>                  //Process()
 #include <TF2.h>                  //Process()
+//#include <TString.h>
 #include <TGraph.h>               //Process()
 #include <TMatrix.h>              //ProcPed()
 #include <TList.h>                //ProcPed()
@@ -148,11 +149,27 @@ Bool_t AliHMPIDPreprocessor::ProcPed()
   TObjArray aDaqSig(7); aDaqSig.SetOwner(kTRUE); for(Int_t i=0;i<7;i++) aDaqSig.AddAt(new TMatrix(160,144),i); //TObjArray of 7 TMatrixF, m(padx,pady)=sigma
   
   TList *pLdc=GetFileSources(kDAQ,"pedestals"); //get list of LDC names containing id "pedestals"
+
+  if(!pLdc) {
+        Log("ERROR: Retrieval of sources for pedestals failed!");
+        return 1;}
+
   Log(Form("HMPID - Pedestal files to be read --> %i LDCs for HMPID",pLdc->GetEntries()));
   
-  for(Int_t i=0;i<pLdc->GetEntries();i++)//lists of LDCs
-    gSystem->Exec(Form("tar xf %s",GetFile(kDAQ,"pedestals",((TObjString*)pLdc->At(i))->GetName()))); //untar pedestal files from current LDC
+  for(Int_t i=0;i<pLdc->GetEntries();i++) {//lists of LDCs
+
+    //gSystem->Exec(Form("tar xf %s",GetFile(kDAQ,"pedestals",((TObjString*)pLdc->At(i))->GetName()))); //untar pedestal files from current LDC
   
+  TString fileName = GetFile(kDAQ,"pedestals", ((TObjString*)pLdc->At(i))->GetName());
+
+  if(fileName.Length()==0) {
+        Log("ERROR retrieving pedestal file!");
+        return 1;  }
+
+  gSystem->Exec(Form("tar xf %s",fileName.Data()));
+
+ }
+
   AliHMPIDDigit dig;
   AliHMPIDRawStream rs;
   Int_t nSigCut,r,d,a,hard;  Float_t mean,sigma;