103 TString bmndstFileName =
"$VMCWORKDIR/macro/run8/bmndst.root",
104 Int_t nStartEvent = 0,
120 FairRunAna* fRunAna =
new FairRunAna();
124 (inputFileName.Contains(
"noField")) ?
kFALSE :
kTRUE;
134 Int_t run_period = 8, run_number = -1;
137 fFileSource =
new FairFileSource(inputFileName);
141 fFileSource =
new BmnFileSource(inputFileName, run_period, run_number);
148 cout <<
"ERROR: could not load geometry '" << setupTag <<
"' from the Geometry Database" << endl;
154 if (pCurrentRun == 0)
157 if (field_voltage == NULL) {
158 cout <<
"ERROR: no field voltage was found for run " << run_period <<
":" << run_number << endl;
162 if (*field_voltage < 10) {
166 fieldScale = (*field_voltage) / map_current;
171 fRunAna->SetField(magField);
183 cout <<
"\n\n|||||||||||||||| EXPERIMENTAL RUN SUMMARY ||||||||||||||||" << endl;
184 cout <<
"||\t\t\t\t\t\t\t||" << endl;
185 cout <<
"||\t\tPeriod:\t\t" << run_period <<
"\t\t\t||" << endl;
186 cout <<
"||\t\tNumber:\t\t" << run_number <<
"\t\t\t||" << endl;
187 cout <<
"||\t\tBeam:\t\t" << beam <<
"\t\t\t||" << endl;
188 cout <<
"||\t\tTarget:\t\t" << targ <<
"\t\t\t||" << endl;
189 cout <<
"||\t\tField scale:\t" << setprecision(4) << fieldScale <<
"\t\t\t||" << endl;
190 cout <<
"||\t\t\t\t\t\t\t||" << endl;
191 cout <<
"||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n\n" << endl;
192 remove(geoFileName.Data());
195 fRunAna->SetSource(fFileSource);
199 fRunAna->SetSink(
new FairRootFileSink(bmndstFileName));
200 fRunAna->SetGenerateRunInfo(
false);
226 fRunAna->AddTask(sibtHM);
232 fRunAna->AddTask(siliconHM);
239 fRunAna->AddTask(gemHM);
248 fRunAna->AddTask(cscHM);
255 fRunAna->AddTask(tof1HP);
270 fRunAna->AddTask(tof2HP);
284 fRunAna->AddTask(zdcAna);
288 fRunAna->AddTask(hitConverter);
294 fRunAna->AddTask(kalman);
300 fRunAna->AddTask(l1);
304 fRunAna->AddTask(stsFindTracks);
311 fRunAna->AddTask(innerTF);
318 fRunAna->AddTask(beamTF);
324 fRunAna->AddTask(mwpcTF);
331 fRunAna->AddTask(dchTF);
340 fRunAna->AddTask(glTF);
348 fRunAna->AddTask(findVertex);
351 fRunAna->AddTask(gemVF);
358 fRunAna->AddTask(pid_analyser);
369 fRunAna->AddTask(dst_task);
372 FairRuntimeDb* rtdb = fRunAna->GetRuntimeDb();
373 FairParRootFileIo* parIo1 =
new FairParRootFileIo();
374 FairParAsciiFileIo* parIo2 =
new FairParAsciiFileIo();
375 parIo1->open(inputFileName.Data());
376 parIo2->open(parFileNameList,
"in");
377 rtdb->setFirstInput(parIo1);
378 rtdb->setSecondInput(parIo2);
379 rtdb->setOutput(parIo1);
383 fRunAna->GetMainTask()->SetVerbose(iVerbose);
385 cout <<
"Starting run" << endl;
386 fRunAna->Run(nStartEvent, nStartEvent + nEvents);
392 cout << endl << endl;
393 cout <<
"Macro finished successfully." << endl;
394 cout <<
"Input file is " + inputFileName << endl;
395 cout <<
"Output file is " + bmndstFileName << endl;
396 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;