Data base generation class for configuration entries (Haavard)
[u/mrichter/AliRoot.git] / TPC / AliTPCGenDBConf.cxx
1
2 // .L /afs/cern.ch/user/h/haavard/alice/tpc/temperature/AliTPCGenDBConf.C+
3 // Int_t run=2546
4 // Int_t firstRun =0
5 // Int_t lastRun = 9999999
6 // AliTPCGenDBConf db
7 // db->Init(run,"TPC/Config/Preprocessor","TPC/*/*")
8 // db->MakeConfig("Preprocessor.txt",firstRun,lastRun,"TPC/Config/Preprocessor")
9
10
11 #include "AliTPCGenDBConf.h"
12
13 ClassImp(AliTPCGenDBConf)
14
15
16 //______________________________________________________________________________________________
17
18 AliTPCGenDBConf::AliTPCGenDBConf():
19    AliDCSGenDB()
20 {
21 }
22
23 //______________________________________________________________________________________________
24
25 AliTPCGenDBConf::AliTPCGenDBConf(const AliTPCGenDBConf& org):
26   AliDCSGenDB(org)
27 {
28
29 //
30 //  Copy constructor
31 //
32
33  ((AliTPCGenDBConf &) org).Copy(*this);
34 }
35
36 //______________________________________________________________________________________________
37 AliTPCGenDBConf::~AliTPCGenDBConf(){
38 //
39 // destructor
40 //
41
42 }
43 //______________________________________________________________________________________________
44 AliTPCGenDBConf& AliTPCGenDBConf::operator= (const AliTPCGenDBConf& org )
45 {
46  //
47  // assignment operator
48  //
49  if (&org == this) return *this;
50
51  new (this) AliTPCGenDBConf(org);
52  return *this;
53 }
54
55
56 //______________________________________________________________________________________________
57
58 void AliTPCGenDBConf::MakeConfig(const char *file, Int_t firstRun, Int_t lastRun, const char *confDir )
59 {
60    //
61    // Store Configuration file to OCDB
62    //
63
64    TEnv *confEnv = new TEnv(file);
65    SetFirstRun(firstRun);
66    SetLastRun(lastRun);
67
68    StoreObject(confDir, confEnv, fMetaData);
69 }
70
71 //______________________________________________________________________________________________
72