void reco_complete() { // Number of events to process Int_t nEvents = 0; // if 0 all the vents will be processed // Parameter file TString parFile = "simparams.root"; // at the moment you do not need it // Digitisation file (ascii) TString digiFile = "all.par"; // Output file TString outFile = "reco_complete.root"; // ----- Timer -------------------------------------------------------- TStopwatch timer; // ------------------------------------------------------------------------ // ----- Reconstruction run ------------------------------------------- FairRunAna *fRun= new FairRunAna(); fRun->SetInputFile("sim_complete.root"); fRun->AddFriend("digi_complete.root"); fRun->SetOutputFile(outFile); FairRuntimeDb* rtdb = fRun->GetRuntimeDb(); FairParRootFileIo* parInput1 = new FairParRootFileIo(); parInput1->open(parFile.Data(), "UPDATE"); rtdb->setFirstInput(parInput1); Bool_t kParameterMerged=kTRUE; // ------------------------------------------------------------------------ PndTrkPrototype* tracking = new PndTrkPrototype(); tracking->SetVerbose(0); // tracking->SetDisplay(kTRUE); fRun->AddTask(tracking); rtdb->setOutput(parInput1); // ----- Intialise and run -------------------------------------------- fRun->Init(); timer.Start(); fRun->Run(0,nEvents); tracking->WriteHistograms(); // ------------------------------------------------------------------------ rtdb->saveOutput(); rtdb->print(); // ----- Finish ------------------------------------------------------- timer.Stop(); Double_t rtime = timer.RealTime(); Double_t ctime = timer.CpuTime(); cout << endl << endl; cout << "Macro finished successfully." << endl; cout << "Output file is " << outFile << endl; cout << "Parameter file is " << parFile << endl; cout << "Real time " << rtime << " s, CPU time " << ctime << " s" << endl; cout << endl; // ------------------------------------------------------------------------ cout << " Test passed" << endl; cout << " All ok " << endl; exit(0); }