7 gSystem->Setenv(
"DB_ACCESS_MODE",
"write");
9 gROOT->Macro(
"LoadLogger.C");
10 gSystem->Load(
"St_base.so");
11 gSystem->Load(
"libStDb_Tables.so");
12 gSystem->Load(
"StDbLib.so");
17 StDbTable* dbtable = node->addDbTable(
"fgtStatus");
19 TString storeTime =
"2012-11-08 00:00:00";
20 cout <<
"The RTS Start date and time is " << storeTime<<endl;
21 mgr->setStoreTime(storeTime.Data());
26 TString infile =
"Cosmic_";
28 infile +=
".FGT-stat-DB.dat";
29 cout<<
" Opening File "<<infile<<endl;
31 std::ifstream in(infile);
33 cout <<
"Can't find file!\n";
45 for (
int i = 0; i < 51200; i++) {
46 table.Status[i] = (Char_t)zero;
50 while(in >> electId >>statread){
53 stat = statread.Atoi();
54 status = (Char_t)stat;
55 cout<<counter++<<
" electId="<<electId<<
" stat ="<<statread<<
" status="<<(Short_t)status<<endl;
56 table.Status[electId] = status;
63 mgr->storeDbTable(dbtable);
virtual void SetTable(char *data, int nrows, int *idList=0)
calloc'd version of data for StRoot
static StDbManager * Instance()
strdup(..) is not ANSI