GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » Bugs, Fixes, Releases » Problems with FairRootManager
Re: Problems with FairRootManager [message #11653 is a reply to message #11649] Sat, 09 April 2011 12:18 Go to previous messageGo to previous message
Felix Boehmer is currently offline  Felix Boehmer
Messages: 149
Registered: May 2007
Location: Munich
first-grade participant

From: *gsi.de
Dear Mohammad, Dear Florian,

thank you very much for your prompt help!

I got the macro running again using FairRun::CreateGeometryFile() and setting it up as Mohammad explained.

However, to make it finally work, I had to hack FairRunAna:
FairRunAna::SetGeomFile() does NOT instantly set the gGeoManager pointer, instead it sets the fInputGeoFile. This is then used in FairRunAna::Init() to load the actual TGeoManager into memory.

The problem with this approach is that Init() can only be called once,
if(fIsInitialized) {
    fLogger->Fatal(MESSAGE_ORIGIN,"Error Init is already called before!");
    exit(-1);
  } else {
    fIsInitialized=kTRUE;
  }
  ...
and this has to happen after all Tasks have been added to FairRunAna in order to call the tasks' Init() - but reco tasks may require the geometry to be present during construction already (e.g. the KalmanTask)! One would have to call FairRunAna::Init() twice ...

Maybe I am overlooking some already present method to do this properly, but for now to make it work I hacked the setting of the gGeoManager pointer into the SetGeomFile() method of FairRunAna. I don't see a conceptual problem of doing that there, so maybe this should be changed ... what is your opinion?


Cheers and have a nice weekend!

Felix

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Warnings from TPC libraries
Next Topic: Bug in LHE (fixed) and MC propagation for tracks
Goto Forum:
  


Current Time: Mon Jul 04 08:44:07 CEST 2022

Total time taken to generate the page: 0.01074 seconds