6 timeinfo = localtime (&rawtime);
7 std::cout <<
"Start = " << asctime(timeinfo) << std::endl;
10 TString RunsListFile =
"runs.txt";
11 std::ifstream runsFileInput(RunsListFile.Data());
13 bool runexists =
false;
14 int nrun, nrunmax = -1;
21 runsFileInput >> strg;
22 while(!runsFileInput.eof()) {
24 sscanf(strg.c_str(),
"%d",&nrun);
27 runsFileInput >> strg; sscanf(strg.c_str(),
"%d",&
pid);
28 runsFileInput >> strg; sscanf(strg.c_str(),
"%d",&
nEvents);
29 runsFileInput >> strg; sscanf(strg.c_str(),
"%d",&
mult);
30 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&pmin);
31 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&pmax);
32 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&tmin);
33 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&tmax);
34 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&fmin);
35 runsFileInput >> strg; sscanf(strg.c_str(),
"%f",&fmax);
38 for(
size_t iw=0;iw<9;iw++) runsFileInput >> strg;
40 nrunmax = nrun>nrunmax ? nrun : nrunmax;
42 runsFileInput >> strg;
44 runsFileInput.close();
47 std::cout <<
"Run number " << nRun <<
" is not defined!" << std::endl;
51 std::cout <<
"run = " << nRun <<
" " << pid <<
" " << nEvents <<
" " << mult <<
" " << pmin <<
" "
52 << pmax <<
" " << tmin <<
" " << tmax <<
" " << fmin <<
" " << fmax << std::endl;
75 TString sim_File = Form(
"sim_complete_v%d_r%d.root",0,nRun);
76 TString digi_File = Form(
"digi_complete_v%d_r%d.root",0,nRun);
77 TString reco_File = Form(
"reco_complete_v%d_r%d.root",0,nRun);
84 FairRunAna *
fRun=
new FairRunAna();
88 fRun->SetInputFile(sim_File);
89 fRun->AddFriend(digi_File);
90 fRun->AddFriend(reco_File);
91 fRun->SetOutputFile(outFile);
92 fRun->SetGenerateRunInfo(kFALSE);
93 fRun->SetUseFairLinks(kTRUE);
94 FairGeane *
Geane =
new FairGeane();
99 emcDigiFile +=
"/macro/params/";
102 FairRuntimeDb*
rtdb = fRun->GetRuntimeDb();
103 FairParRootFileIo*
parInput1 =
new FairParRootFileIo();
104 parInput1->open(parFile.Data());
106 FairParAsciiFileIo*
parIo1 =
new FairParAsciiFileIo();
107 parIo1->open(emcDigiFile.Data(),
"in");
109 rtdb->setFirstInput(parInput1);
110 rtdb->setSecondInput(parIo1);
117 corr->SetInputIDBranch(
"SttMvdGemGenTrackID");
119 corr->SetInputIDBranch2(
"FtsIdealGenTrackID");
127 fRun->AddTask(bremCorr);
130 fRun->AddTask(clone);
133 fRun->AddTask(assMC);
136 fRun->AddTask(assMvd);
139 fRun->AddTask(assMdt);
142 fRun->AddTask(assDrc);
145 fRun->AddTask(assDisc);
148 fRun->AddTask(assStt);
151 fRun->AddTask(assEMC);
154 fRun->AddTask(assRich);
158 cout <<
"fRun->Init()" << endl;
162 fRun->Run(0,nEvents);
170 cout << endl << endl;
171 cout <<
"Macro finished successfully." << endl;
172 cout <<
"Output file is " << outFile << endl;
173 cout <<
"Parameter file is " << parFile << endl;
174 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
177 cout <<
" Test passed" << endl;
178 cout <<
" All ok " << endl;
void SetBarrelTrackBranch(TString branch)
PndPidIdealAssociatorTask * assMC
PndPidMdtHCAssociatorTask * assMdt
PndPidDiscAssociatorTask * assDisc
PndPidMvdAssociatorTask * assMvd
PndPidEmcBayesAssociatorTask * assEMC
PndPidSttAssociatorTask * assStt
static void Init(Int_t MapVersion)
PndPidDrcAssociatorTask * assDrc
FairParRootFileIo * parInput1
FairParAsciiFileIo * parIo1
void SetForwardTrackBranch(TString branch)