KaliVeda  1.12/06
Heavy-Ion Analysis Toolkit
KVDataBase.h
Go to the documentation of this file.
1 /***************************************************************************
2 $Id: KVDataBase.h,v 1.20 2009/01/22 13:55:00 franklan Exp $
3  KVDataBase.h - description
4  -------------------
5  begin : jeu fév 6 2003
6  copyright : (C) 2003 by Alexis Mignon
7  email : mignon@ganil.fr
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  ***************************************************************************/
18 #ifndef KV_DATA_BASE_H
19 #define KV_DATA_BASE_H
20 #include "TFolder.h"
21 #include "TString.h"
22 #include "KVList.h"
23 #include "KVDBTable.h"
24 #include "KVDBRecord.h"
25 
26 class TFile;
27 class KVNumberList;
28 
45 
48 
53 
70 
75 
82 
86 
136 class KVDataBase: public TFolder {
137 
139 
140 public:
141  KVDataBase();
142  KVDataBase(const Char_t* name);
143  KVDataBase(const Char_t* name, const Char_t* title);
144  virtual ~ KVDataBase();
145 
146  inline virtual KVDBTable* GetTable(const Char_t* table) const;
147  inline virtual TList* GetTables() const;
148  virtual Bool_t AddTable(KVDBTable* table);
149  virtual KVDBTable* AddTable(const Char_t* name, const Char_t* title,
150  Bool_t unique = kFALSE);
151  virtual KVDBRecord* GetRecord(const Char_t* table_name,
152  const Char_t* rec_name) const;
153  virtual void Print(Option_t* option = "") const;
154 
155  ClassDef(KVDataBase, 3) // Base Class for a database of parameters
156 };
157 
159 {
160  return (KVDBTable*) FindObject(table);
161 }
162 
164 {
165  return (TList*) GetListOfFolders();
166 }
167 
168 #endif
char Char_t
bool Bool_t
const char Option_t
#define ClassDef(name, id)
Record folder for the database.
Definition: KVDBRecord.h:42
Table in a database.
Definition: KVDBTable.h:33
Simple cross-referenced database structure.
Definition: KVDataBase.h:136
virtual void Print(Option_t *option="") const
Definition: KVDataBase.cpp:152
virtual KVDBTable * GetTable(const Char_t *table) const
Definition: KVDataBase.h:158
virtual KVDBRecord * GetRecord(const Char_t *table_name, const Char_t *rec_name) const
Definition: KVDataBase.cpp:133
virtual TList * GetTables() const
Definition: KVDataBase.h:163
TString fFolderName
Definition: KVDataBase.h:138
virtual Bool_t AddTable(KVDBTable *table)
Definition: KVDataBase.cpp:84
virtual ~ KVDataBase()
Strings used to represent a set of ranges of values.
Definition: KVNumberList.h:83
TCollection * GetListOfFolders() const
virtual TObject * FindObject(const char *name) const