Re-Run in FairRunSim [message #25252] |
Wed, 28 October 2020 17:12 |
GGarJim
Messages: 3 Registered: October 2020 Location: Santiago de Compostela
|
occasional visitor |
From: *usc.es
|
|
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!
|
|
|
|
|
|
|