} else {
file = TFile::Open(Form("%s#%s.RecPoints.root", fPathName->Data(), det->GetName()));
}
- if (!file) AliFatal(Form("AliESDInputHandlerRP: %s.RecPoints.root not found in %s ! \n", det->GetName(), fPathName->Data()));
+ if (!file) {
+ AliError(Form("AliESDInputHandlerRP: %s.RecPoints.root not found in %s ! \n", det->GetName(), fPathName->Data()));
+ return kFALSE;
+ }
fRFiles->Add(file);
}
if (file) {
fEventsPerFile = file->GetNkeys() - file->GetNProcessIDs();
} else {
- AliFatal(Form("AliESDInputHandlerRP: No file with RecPoints found in %s ! \n", fPathName->Data()));
+ AliError(Form("AliESDInputHandlerRP: No file with RecPoints found in %s ! \n", fPathName->Data()));
+ return kFALSE;
}
fFileNumber = 0;
// Get number of events from esd tree
printf("AliESDInputHandlerRP::Init() %d %d\n",__LINE__, fNEvents);
+ //
+ AliESDInputHandler::Init(opt);
+ //
return kTRUE;
}
}
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;
}
// Load the event number iev
//
// Calculate the file number
+ if (fEventsPerFile<=0) return kFALSE;
Int_t inew = iev / fEventsPerFile;
if (inew != fFileNumber) {
fFileNumber = inew;
// 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 #
TFile* file = TFile::Open(fPathName->Data());
TArchiveFile* arch = file->GetArchive();
members = arch->GetMembers();
+ fPathName->ReplaceAll("#AliESDs.root", "");
} else {
// Directory or alien archive
if (fileName.BeginsWith("alien:")) {
{
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"))){
ResetIO();
InitIO("");
// Some clean-up
- members->Delete();
+ if (members) members->Delete();
+ AliESDInputHandler::Notify(path);
+
return kTRUE;
}