GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » Fairroot » General Discussion » Re-Run in FairRunSim (Run a FairRunSim several times.)
Re-Run in FairRunSim [message #25252] Wed, 28 October 2020 17:12 Go to previous message
GGarJim is currently offline  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!
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Remove hits from removed tracks
Next Topic: Visualization of trajectories from simulation
Goto Forum:
  


Current Time: Wed Dec 08 13:43:54 CET 2021

Total time taken to generate the page: 0.02432 seconds