GSI Forum
GSI Helmholtzzentrum für Schwerionenforschung

Home » PANDA » PandaRoot » General » Configuration files outside gconfig directory
Configuration files outside gconfig directory [message #7532] Thu, 13 November 2008 15:27 Go to next message
Mohammad Al-Turany is currently offline  Mohammad Al-Turany
Messages: 518
Registered: April 2004
Location: GSI, Germany
first-grade participant
From: *gsi.de
Hi,

after a discussion with CBM people, I modify the framework to check for the environmental variable CONFIG_DIR, if this is defined (i.e export CONFIG_DIR=/yourpath) the framework will look for the configuration files (g3Config, g4Config, etc..) in this directory if not found the default one will be used and this is done for the single files, i.e. you can define your CONFIG_DIR to a directory which only contains the g3Config.C, then this file is taken from there and all other files (g3Libs, etc) will be taken from the default one.

This is true for all configuration files and decay configuration files, except for the SetCuts.C because it is called from the g3Config.C (and/or g4Config.C , flConfig.C) So in case you use your own directory for the gXConfig files you have to call the SetCuts.C yourself.

At the moment these changes are in fairbase/base/trunk, so to test this please go to your $VMCWORKDIR/base and call:

svn switch https://subversion.gsi.de/fairroot/fairbase/trunk/base .

then recompile.

As soon as many people test this I will move it to the release branch in fairbase
P.S: In case you do not define this CONFIG_DIR or the files are not there everything works as before!

regards

Mohammad
Re: Configuration files outside gconfig directory [message #7533 is a reply to message #7532] Thu, 13 November 2008 21:01 Go to previous messageGo to next message
Johan Messchendorp is currently offline  Johan Messchendorp
Messages: 693
Registered: April 2007
Location: University of Groningen
first-grade participant

From: *xs4all.nl
works fine as far I can see... also a very nice option!

Johan
Re: Configuration files outside gconfig directory [message #7560 is a reply to message #7533] Mon, 24 November 2008 16:06 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,

Further modification to this issue:

1. The CbmRunSim following new methods:

SetUserConfig(const TString &Config)
SetUserCuts(const TString &Cuts)
SetPythiaDecayer(const TString & Config )
SetUserDecay(const TString& Config)


these methods can be called from the macro, you can use either the absolute path or simply the name of your macro for configurations and/or cuts. In case the macro name was set without path, the framework will try to find this macro in the $VMCWORKDIR/gconfig or in the $CONFIG_DIR if defined, otherwise it takes the full path as given!

2. In the G3/G4/Fluka config files there is no need to call the cuts any more they are called directly from the run manager

3. The only constrain is that the function name in the config has to be Config() and for the cuts it has to be SetCuts()

4. In case of Geant4 the optional G4 native macro (g4Config.in) has to be called from the G4Config.C, this cannot be generalized because of timing and dependancy issues

5. For Geane the same was implimented except that the user config and cuts are optional argument in the CbmGeane ctor.

6. Pythia and Phase space decayer configuration follow the same logic

7. The library loading macros have to be in $VMCWORKDIR/gconfig or $CONFIG_DIR, they cannot be set by the user directly from the macro!



P.S all this is still in the trunk of fairbase, after testing it I will move it to the release!


regards

Mohammad
Previous Topic: New Solenoid geometry
Next Topic: QA macros
Goto Forum:
  


Current Time: Thu Mar 28 21:01:37 CET 2024

Total time taken to generate the page: 0.00863 seconds