Hi all,
I need to run several iterations of a simulation with the same instance of FairRunSim, but it crashes while entering in the second iteration (first iteration is fine). I think the problem is that Init() is trying to create a second instance of a singleton (FairGeoLoader). If I not define Init() it crashes without further explanations. Example:
// ----- Initialize simulation run ------------------------------------
run->Init();
Bool_t kParameterMerged = kTRUE;
FairParRootFileIo* parOut = new FairParRootFileIo(kParameterMerged);
parOut->open(ParFile.Data());
rtdb->setOutput(parOut);
rtdb->saveOutput();
rtdb->print();
// ----- Start run ----------------------------------------------------
if (nEvents > 0)
run->Run(nEvents);
// ---- Fine until here -------
run->Init();
if (nEvents > 0)
run->Run(nEvents);
//-------- Crashes -------
Any idea of how to solve this?
Many thanks!