|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
Re: Runtime DB [message #5380 is a reply to message #5368] |
Sat, 10 November 2007 10:33 |
Sebastian Neubert
Messages: 282 Registered: March 2006 Location: Munich
|
first-grade participant |
From: *cern.ch
|
|
Hey!
Just a follow up question: You said, that when using version ids the user has to keep track of the version himself.
Is the same true when using the context?
If so, we urgently need to discuss the database issue. I am running detector study jobs and already begin to feel the need for database support.
To be more specific: I would like the database to deliver the right parameters for an event without me having to worry about it. I would like to have this functionality:
* Have ONE database which is always used. The name of the database(file) is the only thing I specify in my scipts.
* To add parameters to the database I use the available mechanism to create Par-Objects from text-file.
* I expect those Par-Objects to be available in any proceeding step of data-treatment, without any more user intervention.
If any of this is not supported please tell me soon, because then I would need to develop something!
Cheers! Sebastian.
Sebastian Neubert
Technische Universität München
Department Physik E18
sneubert@e18.physik.tu-muenchen.de
tel: +49-8928912592
|
|
|