Home » PANDA » PandaRoot » General » Runtime DB
Re: Runtime DB [message #5367 is a reply to message #5345] |
Tue, 06 November 2007 15:55 |
Mohammad Al-Turany
Messages: 518 Registered: April 2004 Location: GSI, Germany
|
first-grade participant |
From: *gsi.de
|
|
Hi,
Sorry that I did not answer this before, but I saw it first last
week and I was very busy with other problems, any way I have a
few remarks:
BUT: a version in the root file corresponds to one RunID. The
RunID is assigned during the monte carlo. That means all files
that are produced from one mc-file will have the same runID->
will use the same version of the parameters.
This is not completely true! when you write out your parameters you call CbmParSet::setInputVersion(Int_t, Int_t):
e.g:
PndConstField *fc= (PndConstField *)fField;
PndConstPar *cp = (PndConstPar*)
rtdb->getContainer("PndConstPar");
cp->SetParameters(fc);
cp->setInputVersion(fRun->GetRunId(),1);
The second integer is the version number!
So for one runId you can have more versions, technically speaking, this is presented by a cycle number in ROOT file. the disadvantage of this is that each time you create a new file it will start counting from 1! and that you have to take care your self about this version number (i.e two root files could have same runId and version number eventhough different parameter sets).
The other and better way to do this is to use the so called context, where you can set a text description to your parameter set. This will be saved with the same RunId but different context which you can use in the initialization. I will try to write a simple example of how to use this as soon as possible!
regards
Mohammad
|
|
|
Goto Forum:
Current Time: Fri Dec 27 04:21:03 CET 2024
Total time taken to generate the page: 0.00784 seconds
|