Go to the documentation of this file.    1 #ifndef __JSUPPORT__JMETA__ 
    2 #define __JSUPPORT__JMETA__ 
   72     public std::map<std::string, std::string>
 
   87     JMeta(
const int argc, 
const char* 
const argv[])
 
  100         for (
int i = 1; i != argc; ++i) {
 
  107         const JUTSName buffer;
 
  110                                         << buffer.sysname  << 
' ' 
  111                                         << buffer.nodename << 
' ' 
  112                                         << buffer.release  << 
' ' 
  113                                         << buffer.version  << 
' ' 
  128       for (const_iterator i = this->begin(); i != this->end(); ++i) {
 
  129         comment.
add(i->first + 
' ' + i->second);
 
  142     static void copy(
const char* 
const file_name, TFile& out);
 
  171       istringstream is(buffer);
 
  175       for (JEquation equation; is >> equation; ) {
 
  176         meta[equation.getKey()] = equation.getValue();
 
  197       for (JMeta::const_iterator i = this->begin(); i != this->end(); ++i) {
 
  218       if (p != meta.end()) { 
 
  219         for (const_iterator i = meta.begin(); i != meta.end(); ++i) {
 
  221             out << p->second << 
' ' << i->second << endl; 
 
  260       file->GetObject(key, __p);
 
  266         const TString title = __p->GetTitle();
 
  270         const string::size_type pos = buffer.find(
';');
 
  272         if (pos != string::npos) {
 
  276           istringstream(buffer.substr(pos + 1)) >> cycle;
 
  278           buffer = buffer.substr(0, pos);
 
  280           for (
int i = 1; i < cycle; ++i) {
 
  284             if (__p != NULL && __p->GetTitle() == title) {
 
  319       if (number_of_cycles != 0) {
 
  347   inline bool putMeta(TDirectory* dir, 
const std::string key, 
const std::string buffer)
 
  349     static TNamed object;
 
  359       object.SetName (key.c_str());       
 
  360       object.SetTitle(buffer.c_str());    
 
  362       return (dir->WriteTObject(&
object) > 0);
 
  380     if (p != meta.end()) { 
 
  400     JRootFileReader<JMeta> in(file_name);
 
  402     while (in.hasNext()) {
 
  404       const JMeta* p = in.next();
 
  448     const char* buffer[number_of_items] = {
 
  468       if (number_of_cycles != 0) {
 
  472         file->GetObject(key, __p);
 
  478         for (
int i = 1; i != number_of_items; ++i) {
 
  483             (*ps)[buffer[i]] = __p->GetTitle();
 
  501     return putObject(dir, static_cast<const JMeta&>(meta));
 
 
void getObject(TFile *file, const char *key, JMetaOld_t *&ps)
Read object from ROOT file.
 
static const char *const META_DIRECTORY
ROOT sub-directory for meta data.
 
Auxiliary class for a type holder.
 
bool putMeta(TDirectory *dir, const std::string key, const std::string buffer)
Write meta data as ROOT TNamed object.
 
static const char *const namespace_t
name space
 
static const char *const GITrelease_t
GIT release.
 
std::string getPath(const std::string &file_name)
Get path, i.e.
 
const char * getName(const JType< JMetaOld_t > &type)
Get ROOT name of given data type.
 
#define MAKE_STRING(A)
Make string.
 
size_t get_number_of_tokens(const std::string &buffer)
Count number of white space separated tokens.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
#define MAKE_CSTRING(A)
Make C-string.
 
std::string getNamespace(const std::string &type_name)
Get name space, i.e.
 
static const char *const application_t
Definition of meta data parameters.
 
std::string getFilename(const std::string &file_name)
Get file name part, i.e.
 
static const char *const system_t
system information
 
const char * getGITVersion()
Get GIT version.
 
static const char *const PATH
binary file paths
 
Simple data structure to support I/O of equations (see class JLANG::JEquation).
 
JLANG::JEquationFacet setequation
Type definition of stream manipulator for equational I/O.
 
static const char *const META_NAME
ROOT name for meta data.
 
Support classes and methods for experiment specific I/O.
 
static equation_type< T > make_equation(const std::string &key, const T &value)
Auxiliary method to create equation type.
 
static const char *const SVNrelease_t
SVN release.
 
static const char *const ROOTrelease_t
ROOT release.
 
int getNumberOfCycles(TFile *file, const TString key)
Get number of cycles of named objects with same title as given key.
 
bool putObject(TDirectory *dir, const JMetaOld_t &meta)
Write meta data to ROOT directory.
 
static const char *const command_t
Linux command.