SetStatus(-1);
return;
}
- if (fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis->GetDebugLevel()>1) {
cout << "->AliAnalysisSelector->Init()" << endl;
}
if (!tree) {
SetStatus(-1);
return;
}
- if (fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis->GetDebugLevel()>1) {
cout << "<-AliAnalysisSelector->Init()" << endl;
}
}
{
// Assembly the input list.
RestoreAnalysisManager();
- if (fAnalysis && fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis && fAnalysis->GetDebugLevel()>1) {
cout << "->AliAnalysisSelector->Begin: Analysis manager restored" << endl;
}
}
void AliAnalysisSelector::SlaveBegin(TTree *tree)
{
// Called on each worker. We "unpack" analysis manager here and call InitAnalysis.
+ TObject::SetObjectStat(kFALSE);
RestoreAnalysisManager();
if (fAnalysis) {
- if (fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis->GetDebugLevel()>1) {
cout << "->AliAnalysisSelector->SlaveBegin() after Restore" << endl;
}
fAnalysis->SlaveBegin(tree);
- if (fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis->GetDebugLevel()>1) {
cout << "<-AliAnalysisSelector->SlaveBegin()" << endl;
}
}
Bool_t AliAnalysisSelector::Process(Long64_t entry)
{
// Event loop.
- if (fAnalysis->GetDebugLevel() > 0) {
+ static Int_t count = 0;
+ count++;
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "->AliAnalysisSelector::Process()" << endl;
}
Int_t nobjCount = TProcessID::GetObjectCount();
- fAnalysis->GetEntry(entry);
- fAnalysis->ExecAnalysis();
+ Int_t returnCode = fAnalysis->GetEntry(entry);
+ if (returnCode <= 0) {
+ cout << "Error retrieving event:" << entry << " Skipping ..." << endl;
+ fAnalysis->CountEvent(1,0,1,0);
+ // Try to skip file
+ Abort("Bad stream to file. Trying next image.", kAbortFile);
+ return kFALSE;
+ } else {
+ fAnalysis->ExecAnalysis();
+ if (returnCode<100000000) fAnalysis->CountEvent(1,1,0,0);
+ }
TProcessID::SetObjectCount(nobjCount);
- if (fAnalysis->GetDebugLevel() > 0) {
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "<-AliAnalysisSelector::Process()" << endl;
}
return kTRUE;
if (obj->IsA() == AliAnalysisManager::Class()) {
fAnalysis = (AliAnalysisManager*)obj;
fAnalysis->SetSelector(this);
- if (fAnalysis->GetDebugLevel()>0) {
+ if (fAnalysis->GetDebugLevel()>1) {
cout << "->AliAnalysisSelector->RestoreAnalysisManager: Analysis manager restored" << endl;
}
break;
// on each slave server.
if (fStatus == -1) return; // TSelector won't abort...
if (fAnalysis->GetAnalysisType() == AliAnalysisManager::kMixingAnalysis) return;
- if (fAnalysis->GetDebugLevel() > 0) {
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "->AliAnalysisSelector::SlaveTerminate()" << endl;
}
fAnalysis->PackOutput(fOutput);
- if (fAnalysis->GetDebugLevel() > 0) {
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "<-AliAnalysisSelector::SlaveTerminate()" << endl;
}
}
}
// No Terminate() in case of event mixing
if (fAnalysis->GetAnalysisType() == AliAnalysisManager::kMixingAnalysis) return;
- if (fAnalysis->GetDebugLevel() > 0) {
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "->AliAnalysisSelector::Terminate()" << endl;
}
fAnalysis->UnpackOutput(fOutput);
fAnalysis->Terminate();
- if (fAnalysis->GetDebugLevel() > 0) {
+ if (fAnalysis->GetDebugLevel() > 1) {
cout << "<-AliAnalysisSelector::Terminate()" << endl;
}
}