[ROOT] How to save meta information?

From: Ole Streicher (ole.streicher@gmx.de)
Date: Mon Sep 16 2002 - 15:09:07 MEST


Hi!

I am looking for a good way to store meta information in ROOT files.

My design up to now consists of one ROOT tree per file. Each tree is
produced by an "Algorithm", which itself may produce more than one
tree (and thus, its results may be stored in more than one file).

For logging reasons, I want to store the parameters and the static
meta information of the algorithms, too. What I am thinking about is
something like:

class Algorithm: public MyObject {
  static const string VersionInfo;
  int Par1;
  TTree *ResultTree1; //!
  TTree *ResultTree2; //!
  //...
  ClassDef(Algorithm, 1)
};

where the definition of VersionInfo is done with the help of CVS tags
in the C++ file.

But, there are now some problems with that:
- rootcint doesn't like "const" (see my other mail)
- the streamer seems not to store "static" members (why?)
- how can I ensure that the algorithm goes into all files that it has
  created? Can I just use "ResultTree1->GetCurrentFile()->Add(this);"?
  before calling "Write()" to all files?

Is there another recommended way to store these meta information?

BTW, Why do "inline" functions never have a documentation within root?
They always point me to the "inline functions" section of the man page
where they link to the source code. For example, I couldn't see from
that what the difference between the "Add()" and the "Append()" member
functions of TDirectory is.

Ole



This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:51:10 MET