void ana_etac_task_batch(TString prefix="test", int nevts=0, double pbarmom = 6.232069, int decayMode = 0, int recoilMode = 0, int dataMode=0, TString pidQuality = "All") { InFile=prefix+"_fast.root"; TString OutFile = prefix+ "_" + pidQuality + TString::Format("_d%dr%d_m%d", decayMode, recoilMode, dataMode) + "_taskana.root"; // cut away input path // *** initialization FairLogger::GetLogger()->SetLogToFile(kFALSE); FairRunAna* fRun = new FairRunAna(); fRun->SetWriteRunInfoFile(kFALSE); fRun->SetInputFile(InFile); fRun->SetOutputFile(prefix+"_dummy.root"); // *** take constant field; needed for PocaVtx RhoCalculationTools::ForceConstantBz(20.0); // *** HERE OUR ANALYSIS TASK GOES! PndScrutJpsiEtacTask *scrutTask = new PndScrutJpsiEtacTask(pbarmom, OutFile, decayMode, recoilMode, dataMode, pidQuality); fRun->AddTask(scrutTask); // *** and run analysis fRun->Init(); fRun->Run(0,nevts); }