57void eventdisplay(
const char* sim_run_info =
"$VMCWORKDIR/macro/run/bmnsim.root",
58 const char* reco_file =
"$VMCWORKDIR/macro/run/bmndst.root",
60 bool is_online =
false)
65 FairRunAna* fRunAna =
new FairRunAna();
67 int run_period = -1, run_number = -1;
68 bool isTarget =
false, isField =
true;
71 TString strSimRunInfo(sim_run_info), strRecoFile(reco_file);
73 if (data_source == 0) {
76 cout << endl <<
"ERROR: Simulation file with detector geometry wasn't found!" << endl;
80 fFileSource =
new FairFileSource(strSimRunInfo);
83 FairRuntimeDb* rtdb = fRunAna->GetRuntimeDb();
84 FairParRootFileIo* parIo1 =
new FairParRootFileIo();
85 parIo1->open(strSimRunInfo.Data());
86 rtdb->setFirstInput(parIo1);
87 rtdb->setOutput(parIo1);
92 ((FairFileSource*)fFileSource)->AddFriend(strRecoFile);
94 cout << endl <<
"Warning: File with reconstructed data wasn't found!" << endl;
100 Ssiz_t indDash = strSimRunInfo.First(
'-');
101 if ((indDash > 0) && (strSimRunInfo.BeginsWith(
"run"))) {
103 run_period =
TString(strSimRunInfo(3, indDash - 3)).
Atoi();
105 run_number =
TString(strSimRunInfo(indDash + 1, strSimRunInfo.Length() - indDash - 1)).
Atoi();
112 cout <<
"\nGeometry '" << setupTag <<
"' couldn't be loaded from the Geometry Database" << endl;
118 if (pCurrentRun == 0)
124 if ((field_voltage == NULL) || (*field_voltage < 10)) {
128 fieldScale = (*field_voltage) / map_current;
132 fRunAna->SetField(magField);
141 cout <<
"\n\n|||||||||||||||| EXPERIMENTAL RUN SUMMARY ||||||||||||||||" << endl;
142 cout <<
"||\t\tPeriod:\t\t" << run_period <<
"\t\t\t||" << endl;
143 cout <<
"||\t\tNumber:\t\t" << run_number <<
"\t\t\t||" << endl;
144 cout <<
"||\t\tBeam:\t\t" << beam <<
"\t\t\t||" << endl;
145 cout <<
"||\t\tTarget:\t\t" << targ <<
"\t\t\t||" << endl;
146 cout <<
"||\t\tField scale:\t" << setprecision(4) << fieldScale <<
"\t\t\t||" << endl;
147 cout <<
"||||||||||||||||||||||||||||||||||||||||||||||||||||||||||\n\n" << endl;
149 cout <<
"Error: run info wasn't found!" << endl;
157 if (data_source == 1)
160 if (data_source == 2) {
168 gSystem->Load(
"libomnithread");
175 if (fFileSource != NULL)
176 fRunAna->SetSource(fFileSource);
184 fRunAna->SetSink(
new FairRootFileSink(
"ed_out.root"));
187 SetTasks(fMan, data_source, run_period, run_number, isField, isTarget);
204 if (data_source == 0) {
250 "BmnGemStripHit", recoPointColor, pointMarker);
281 if (data_source == 1) {
void SetTasks(MpdEventManager *fMan, int data_source, int run_period, int run_number, bool isField, bool isTarget)
void eventdisplay(const char *sim_run_info="$VMCWORKDIR/macro/run/bmnsim.root", const char *reco_file="$VMCWORKDIR/macro/run/bmndst.root", int data_source=0, bool is_online=false)