HRuntimeDb
class description - source file - inheritance tree (.pdf)
private:
Bool_t fillParamFile()
Bool_t initContainers()
protected:
HRuntimeDb()
public:
~HRuntimeDb()
Bool_t addContainer(HParSet*)
void addContFactory(HContFact*)
Bool_t addParamContext(const char*)
HRun* addRun(Int_t runId, Int_t refId = -1)
static TClass* Class()
void clearRunList()
void closeFirstInput()
void closeOutput()
void closeSecondInput()
void disconnectInputs()
HParSet* findContainer(const char*)
Int_t findOutputVersion(HParSet*)
HParSet* getContainer(Text_t*)
const Text_t* getCurrentFileName() const
HRun* getCurrentRun()
HParIo* getFirstInput()
HParIo* getOutput()
HRun* getRun(Int_t)
HRun* getRun(Text_t*)
HParIo* getSecondInput()
Bool_t initContainers(Int_t runId, Int_t refId = -1, const Text_t* fileName)
static HRuntimeDb* instance()
virtual TClass* IsA() const
Bool_t makeParamFile(const char*, const char*, const char* startAt, const char* endAt)
void print()
void printParamContexts()
Bool_t readAll()
Bool_t reconnectInputs()
void removeAllContainers()
void removeContainer(Text_t*)
void removeRun(Text_t*)
void resetAllVersions()
void resetInputVersions()
void resetOutputVersions()
void saveOutput()
void setContainersStatic(Bool_t f = kTRUE)
Bool_t setFirstInput(HParIo*)
Bool_t setInputVersion(Int_t run, Text_t* container, Int_t version, Int_t inputNumber)
Bool_t setOutput(HParIo*)
Bool_t setRootOutputVersion(Int_t run, Text_t* container, Int_t version)
Bool_t setSecondInput(HParIo*)
void setVersionsChanged(Bool_t f = kTRUE)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
Bool_t writeContainer(HParSet*, HRun*, HRun* refRun = 0)
Bool_t writeContainers()
void writeSetup()
void writeVersions()
private:
static HRuntimeDb* gRtdb !
protected:
TList contFactories list of container factories
TList* containerList list of parameter containers
TList* runs list of runs
HParIo* firstInput first (prefered) input for parameters
HParIo* secondInput second input (used if not found in first input)
HParIo* output output for parameters
HRun* currentRun Current run
TString currentFileName Name of current event file
Bool_t versionsChanged flag for write of list of runs (set kTRUE by each write)
Bool_t isRootFileOutput flag indicating that the output is a ROOT file
HParamFileGenerator* pParamFileGenerator ! generator for a parameter file
HRuntimeDb
Administration class for parameter input/output
HRuntimeDb* instance(void)
HRuntimeDb(void)
constructor creates an empty list for parameter containers
and an empty list of runs for the version management
~HRuntimeDb()
destructor
deletes the list of runs and all containers
void addContFactory(HContFact* fact)
Adds a container factory to the list of factories
Bool_t addParamContext(const char* context)
Sets via the container factories the context of all parameter containers,
which accept this context
void printParamContexts()
Prints the context of all parameter containers, which can be created by
the container factories
Bool_t addContainer(HParSet* container)
adds a container to the list of containers
HParSet* getContainer(Text_t* name)
The function loops over the container factories to find the corresponding container
with the give name and its context.
The name is the original name of the parameter container without the concatination
with the context.
The factory checks, if the container exists already in the runtime database. Otherwise
it will be created and added by the factory.
The function returns a pointer to the container or NULL, if not created.
HParSet* findContainer(const char* name)
returns a pointer to the container called by name
The name is the original name of the parameter container eventually concatinated with
a non-default context.
void removeContainer(Text_t* name)
removes the container from the list and deletes it
void removeAllContainers(void)
removes all containers from the list and deletes them
HRun* addRun(Int_t runId,Int_t refId)
adds a run at the end of the list of runs
returns a pointer to the run newly added
HRun* getRun(Int_t id)
returns a pointer to the run called by the run id
HRun* getRun(Text_t* name)
returns a pointer to the run called by name
void removeRun(Text_t* name)
removes the run from the list and deletes it
void clearRunList()
void writeSetup()
writes the setup to the output if the setup has changed
void writeVersions()
writes the parameter versions for all runs to the output
Bool_t writeContainers()
writes all containers to the output
loops over the list of containers and calls for each the
function writeContainer(...)
Int_t findOutputVersion(HParSet* cont)
Bool_t writeContainer(HParSet* cont, HRun* run, HRun* refRun)
writes a container to the output if the containers has changed
The output might be suppressed if the changes is due an
initialisation from a ROOT file which serves also as output
or if it was already written
Bool_t initContainers(Int_t runId,Int_t refId,
const Text_t* fileName)
loops over the list of containers and calls the init() function of each
container if it is not static
(typically called by Hades::eventLoop(...))
Bool_t readAll()
reads all containers with all versions for all runs and writes the
containers, the setup information and the version table to the output
Bool_t initContainers(void)
private function
void setContainersStatic(Bool_t flag)
sets the status flag in all containers
flag kTRUE sets all 'static'
flag kFALSE sets all 'not static'
Bool_t setInputVersion(Int_t run,Text_t* container,
Int_t version,Int_t inp)
sets the input version of a container defined by its name and a
run defined by its id taken from input with inputNumber inp
(1 for first input and 2 for second input)
Bool_t setRootOutputVersion(Int_t run,Text_t* container,
Int_t version)
sets the Root file output version of a container defined by its name
and a run defined by its id
should only be used after initialization 'by hand' on the interpreter level
void print()
prints the list of the actual containers, the list of the
runs/versions and information about input/output
cout<<"-----------------------------------------------------------"<<'n';
cout<<"--------- actual containers in runtime database ---------"<<'n';
void resetInputVersions()
resets all input versions in the list of runs and in all containers
which are not static
is called each time a new input is set
void resetOutputVersions()
resets all output versions in the list of runs
is called each time a new output is set
is called also each time a new input is set which is not
identical with the output
void resetAllVersions()
resets all input and output versions in the list of runs
and in all containers which are not static
Bool_t setFirstInput(HParIo* inp1)
sets the first input pointer
Bool_t setSecondInput(HParIo* inp2)
sets the second input pointer
Bool_t setOutput(HParIo* op)
sets the output pointer
HParIo* getFirstInput()
return a pointer to the first input
HParIo* getSecondInput()
return a pointer to the second input
HParIo* getOutput()
return a pointer to the output
void closeFirstInput()
void closeSecondInput()
Bool_t reconnectInputs()
reconnects the inputs (actually only used for the Oracle interface)
void disconnectInputs()
disconnects the inputs (actually only used for the Oracle interface)
void saveOutput()
writes the setup, the versions and the containers (if not
yet written out)
without the setup and version information the containers cannot
be read again!
void closeOutput()
calls saveOutput() and deletes then the output
Bool_t makeParamFile(const char* fName,const char* experiment,
const char* startAt,const char* endAt)
Creates the parameter file generator, which opens a ROOT file and a log file
Returns kFALSE if the ROOT file already exists
Bool_t fillParamFile()
This function is called in saveOutput, if the parameter file generator exists
It gets the lists of runs from Oracle and initializes the parameter containers for each run
The loop does not break, if an error occurs, but error information is written to a log file
It returns kFALSE if there is not open Oracle connection
void Streamer(TBuffer &R__b)
Inline Functions
HRun* getCurrentRun()
const Text_t* getCurrentFileName() const
void setVersionsChanged(Bool_t f = kTRUE)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void StreamerNVirtual(TBuffer& b)
Last update: Mon Feb 5 16:52:50 2007
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.