GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Retrieve parameters from all.par in simulation.
Retrieve parameters from all.par in simulation. [message #14187] Thu, 01 November 2012 18:21 Go to next message
Lia Lavezzi
Messages: 291
Registered: May 2007
Location: Torino
first-grade participant

From: *21-151.libero.it
Dear developers,
I need some help with the parameters writing/reading: I want to put some numbers connected to the geometry of the STT (e.g. the geometry version, the radius, the tubeID of some reference tubes...) in the ascii file macro/params/all.par and read them.
I need to know the geometry version directly in the simulation and so I need to read the parameters directly inside PndStt.

To this end I set up a parameter container, PndSttRecoPar, with (for the moment) only a test variable in it and I added it to the PndSttContFact.

These files are set up correctly and also the all.par since I could get value of the parameter set in the ascii file during the digitization stage, setting:
par = (PndSttRecoPar*) rtdb->getContainer("PndSttRecoPar");
par->setChanged();
par->setInputVersion( FairRun::Instance()->GetRunId(),1);
in the SetParContainers() function inside the hit producer task.

However, I cannot get the parameter during the simulation stage: I tried to do it by setting the previous lines inside PndStt, in the function Initialize(), but the parameter is not filled in the parameters.root file (PndSttRecoPar is there, but the parameters has not the correct value from the ascii file).
Is it possible to get the parameters written in all.par by means of the useul procedure (i.e. with the rtdb) in the simulation? If so, how?
Thank you in advance,
Lia.
Re: Retrieve parameters from all.par in simulation. [message #14218 is a reply to message #14187] Wed, 21 November 2012 11:20 Go to previous message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hallo Lia,

Sorry for the delay, I introduce a new virtual method to the Module class, "SetParContainers". if you want to read parameters from your detector/module class you have to implement this method as in the Task classes (to set the containers that need to be used later).

Cheers,

Mohammad
Previous Topic: simulation of specific event number
Next Topic: Analysis for Material Radiation length
Goto Forum:
  


Current Time: Mon Dec 02 05:14:00 CET 2024

Total time taken to generate the page: 0.00621 seconds