3 #include "fgtPedestal.h"
7 gSystem->Setenv(
"DB_ACCESS_MODE",
"write");
8 gROOT->Macro(
"LoadLogger.C");
9 gSystem->Load(
"St_base.so");
10 gSystem->Load(
"libStDb_Tables.so");
11 gSystem->Load(
"StDbLib.so");
13 TString storeTime =
"2012-11-08 00:00:00";
14 cout <<
"The RTS Start date and time is " << storeTime<<endl;
18 StDbTable* dbtable = node->addDbTable(
"fgtPedestal");
19 mgr->setStoreTime(storeTime.Data());
22 TString infile =
"Cosmic_";
24 infile +=
".FGT-ped-DB.dat";
25 cout<<
" Opening File "<<infile<<endl;
27 std::ifstream in(infile);
29 cout <<
"Can't find file!\n";
33 std::cout << setprecision(10);
36 Int_t electId, timebin;
40 for (
int i = 0; i < 51200; i++) {
41 table.AdcPedestal[i] = 0.0;
42 table.AdcPedestalRMS[i] = 0.0;
43 table.Status[i] =
'0';
48 in >> electId >> timebin >> ped >> stdev;
49 cout<<counter++<<
" electId="<<electId<<
" ped ="<<ped<<
" stdev="<<stdev<<endl;
50 table.AdcPedestal[electId]=ped;
51 table.AdcPedestalRMS[electId]=stdev;
61 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