]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliAODInputHandler.cxx
Protected retrieval of statistics histograms from EventStat_temp.root when AOD is...
[u/mrichter/AliRoot.git] / STEER / AliAODInputHandler.cxx
index 6f082f8a1c442dc827ba5d395d8c8c63788b7265..52af5cd4b8fd15990450eb69c26f0475f5241104 100644 (file)
@@ -135,9 +135,17 @@ Bool_t AliAODInputHandler::Notify(const char* path)
     
   TTree *ttree = fTree->GetTree();
   if (!ttree) ttree = fTree;
-  TString statFname(gSystem->DirName(ttree->GetCurrentFile()->GetName()));
-  statFname += "/EventStat_temp.root";
-  TFile *statFile = TFile::Open(statFname, "READ");
+  TString statFname(ttree->GetCurrentFile()->GetName());
+  Int_t indarchive = statFname.Index("#");
+  if (indarchive<0) {
+     statFname = gSystem->DirName(statFname);
+     statFname += "/";
+  } else {
+     statFname.Remove(indarchive+1);
+  }   
+  statFname += "EventStat_temp.root";
+  TFile *statFile = 0;
+  if (IsCheckStatistics()) statFile = TFile::Open(statFname, "READ");
   if (statFile) {
      TList *list = (TList*)statFile->Get("cstatsout");
      if (list) {