StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StDbModifier.h
1 /***************************************************************************
2  *
3  * $Id: StDbModifier.h,v 1.2 2007/08/20 18:21:29 deph Exp $
4  *
5  * Author: Masashi Kaneta, updated by R. Jeff Porter
6  ***************************************************************************
7  *
8  * Description: Class to act between Root-Cint files and database
9  *
10  ***************************************************************************
11  *
12  * $Log: StDbModifier.h,v $
13  * Revision 1.2 2007/08/20 18:21:29 deph
14  * New Version of Load Balancer
15  *
16  * Revision 1.1 2000/08/15 22:51:52 porter
17  * Added Root2DB class from Masashi Kaneta
18  * + made code more robust against requesting data from non-existent databases
19  *
20  **************************************************************************/
21 
22 #ifdef __ROOT__
23 #ifndef STAR_StDbModifier
24 #define STAR_StDbModifier
25 
26 #include "StDbManager.hh"
27 #include "StDbConfigNode.hh"
28 #include "StDbTable.h"
29 #include "StDbDefs.hh"
30 
31 class StDbModifier
32 {
33 
34  private:
35  char* fDbName; // Database bame
36  Int_t fDebug; // Debug flag
37  char* fTableName; // c-structure name that is same as table in database
38  unsigned int funixTime; // unix timestamp
39  char* fTimestamp; // Timestamp of the data requested
40  char* fVersionName; // version name of table
41  char* fOutputFileName; // file name for output
42  char* fInputFileName; // file name for inputt
43  char* fFlavorName; // flavor name, like 'ofl', 'sim'
44 
45  protected:
46 
47  public:
48  StDbModifier();
49  virtual ~StDbModifier();
50 
51  virtual Int_t ReadDataFromDB();
52  virtual Int_t WriteDataToDB();
53 
54  virtual void SetTime(unsigned int timestamp);
55  virtual void SetDateTime(const char* timestamp);
56  virtual void SetDbName(const char* dbname);
57  virtual void SetFlavor(const char* flavorname);
58  virtual void SetInputFileName(const char* inputfilename);
59  virtual void SetOutputFileName(const char* outputfilename);
60  virtual void SetTableName(const char* tablename);
61  virtual void SetVersionName(const char* versionname);
62 
63  virtual void SetDebug() { fDebug = 1 ; }
64  virtual void SetDebug(Int_t debug){ fDebug = debug; }
65 
66  ClassDef(StDbModifier, 1)
67 
68 };
69 
70 #endif
71 #endif
72