GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Moving the Geometry from data file to the parameters
Re: Moving the Geometry from data file to the parameters [message #9530 is a reply to message #9529] Wed, 07 October 2009 19:30 Go to previous messageGo to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *
Hallo Dima and Stefano,

Dima, in the macro you show here you should set the Runtime data base before the init of the run, and the last two lines are not needed because this is done internally, so you macro will look like:



FairRunAna *fRun= new FairRunAna();

TString parFile = "simparams.root";
FairRuntimeDb* rtdb = fRun->GetRuntimeDb();
FairParRootFileIo* parInput1 = new FairParRootFileIo();


geom = gGeoManager;

In fact the geometry is now a parameter like any other parameter, except that it is a parameter of a RUN, just like the field or beam momentum, and because ROOT has the global variable gGeoManager which is set internally, there is no need to you or anybody to try to get himself from the parameter file. So in any Task which is added to the run you can simply use the gGeoManager in the init of your task or anywhere except in the ctor or the method SetParTask() because at the time when they are called the Parameter containers are still not initialized.



Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New version of DPM
Next Topic: GENFIT restructuring in development branch is done - merge needed
Goto Forum:

Current Time: Thu May 19 20:59:31 CEST 2022

Total time taken to generate the page: 0.01115 seconds