]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliESDInputHandlerRP.cxx
AliESDHeader: AliTriggerConfiguration and more trigger scalers added
[u/mrichter/AliRoot.git] / STEER / AliESDInputHandlerRP.cxx
index f66de4938f88b40bfa54b7c786570f5c029d912f..8febf1f3db8379d0f82b63a1b445ca8a56d96271 100644 (file)
@@ -118,6 +118,9 @@ Bool_t AliESDInputHandlerRP::Init(Option_t* opt)
     fFileNumber       =  0;
     // Get number of events from esd tree 
     printf("AliESDInputHandlerRP::Init() %d %d\n",__LINE__, fNEvents);
+    //
+    AliESDInputHandler::Init(opt);
+    //
     return kTRUE;
 }
 
@@ -133,7 +136,7 @@ Bool_t AliESDInputHandlerRP::BeginEvent(Long64_t entry)
     }
     
     if (entry >= fNEvents) {
-       AliWarning(Form("AliESDInputHandlerRP: Event number out of range %5d %5d\n", entry, fNEvents));
+       AliWarning(Form("AliESDInputHandlerRP: Event number out of range %5lld %5d\n", entry, fNEvents));
        return kFALSE;
     }
     
@@ -159,7 +162,7 @@ Bool_t AliESDInputHandlerRP::LoadEvent(Int_t iev)
     }
     // Folder name
     char folder[20];
-    sprintf(folder, "Event%d", iev);
+    snprintf(folder, 20, "Event%d", iev);
     // Tree R
     TIter next(fRFiles);
     TFile* file;
@@ -213,9 +216,11 @@ Bool_t AliESDInputHandlerRP::Notify(const char *path)
   // Notify about directory change
   // The directory is taken from the 'path' argument
   // 
-    AliInfo(Form("Directory change %s \n", path));
+
     // Get path to directory
     TString fileName(path);
+    if (fileName.IsNull()) return kFALSE;
+    AliInfo(Form("Directory change %s \n", path));
 
     if(fileName.Contains("#")){
     // If this is an archive it will contain a # 
@@ -262,7 +267,12 @@ Bool_t AliESDInputHandlerRP::Notify(const char *path)
     {
        TString name(entry->GetName());
        TObjArray* tokens = name.Tokenize(".");
-       Int_t ntok = tokens->GetEntries();
+       Int_t ntok = 0;
+       if (tokens) {
+         ntok = tokens->GetEntries();
+       } else {
+         continue;
+       }
        if (ntok <= 1) continue;
        TString str = ((TObjString*) tokens->At(1))->GetString();
        if (!(strcmp(str.Data(), "RecPoints"))){
@@ -286,6 +296,8 @@ Bool_t AliESDInputHandlerRP::Notify(const char *path)
     // Some clean-up
     if (members) members->Delete();
 
+    AliESDInputHandler::Notify(path);
+    
     return kTRUE;
 }