} else {
fInputEventHandler->Init(tree, "local");
}
+ } else {
+ // If no input event handler we need to get the tree once
+ // for the chain
+ if(!tree->GetTree()) tree->LoadTree(0);
}
+
if (fMCtruthEventHandler) {
if (fMode == kProofAnalysis) {
if (!filename || !strlen(filename)) continue;
TFile *file = (TFile*)gROOT->GetListOfFiles()->FindObject(filename);
+ TDirectory *opwd = gDirectory;
if (file) file->cd();
else file = new TFile(filename, "RECREATE");
if (file->IsZombie()) continue;
callEnv.Execute(output->GetData());
}
output->GetData()->Write();
+ file->Close();
+ if (opwd) opwd->cd();
}
if (fDebug > 1) {
cout << "<-AliAnalysisManager::UnpackOutput()" << endl;