5 #define BEMCMODULES 120
17 TString changetime(TString time,
int shift);
19 void bemcCalibTxtUpload(
const char* gainfilename=
"./electron.gains.2012.final")
21 const int ntowers=4800;
23 gROOT->Macro(
"LoadLogger.C");
24 gROOT->Macro(
"loadMuDst.C");
25 gSystem->Load(
"StDaqLib");
29 TString time =
"20111220.000001";
30 cout<<time.Data()<<endl;
31 time = changetime(time,0);
32 cout<<time.Data()<<endl;
34 ifstream infile(gainfilename);
38 infile >>
id >> gain >> rms >> status;
39 if(!infile.good())
break;
41 bemctables->setCalib(BTOW,
id,1,gain);
42 bemctables->setCalibStatus(BTOW,
id,(
unsigned short)status);
49 TString changetime(TString timea,
int shift)
51 TString y,m,d,h,min,s,newtime;
52 int year,month,day,hour,minute,second;
53 y+=timea(0,4); cout<<
"year "<<y<<endl;
54 m+=timea(4,2); cout<<
"month "<<m<<endl;
55 d+=timea(6,2); cout<<
"day "<<d<<endl;
56 h+=timea(9,2); cout<<
"hour "<<h<<endl;
57 min+=timea(11,2); cout<<
"minute "<<min<<endl;
58 s+=timea(13,2); cout<<
"second "<<s<<endl;
61 tstamp.Set(y.Atoi(),m.Atoi(),d.Atoi(),h.Atoi(),min.Atoi(),s.Atoi(),0,1,shift);
62 newtime += tstamp.AsString(
"yyyy-mm-dd HH:mm:ss");
void loadTables(const char *sqlTime, const char *flavor="ofl")
load directly from DB, no Maker needed