23 std::vector<std::string> list;
28 void drawTables(
char* t =
"bemcStatus",
29 char* TSi =
"2001-01-01 00:00:00",
30 char* TSf =
"2030-01-01 00:00:00",
31 char* MAX =
"2030-01-01 00:00:00",
34 gROOT->Macro(
"loadMuDst.C");
35 gROOT->LoadMacro(
"$STAR/StRoot/StEmcUtil/macros/drawSingleTable.C");
40 dbHandler->setTableName(t);
41 dbHandler->setMaxEntryTime(MAX);
42 dbHandler->setFlavor(flavor);
51 for(
int i =0;i<list.size();i++)
53 dbHandler->setTimeStamp(list[i].c_str());
58 if(!strcmp(
"bemcPed",table.Data()) || !strcmp(
"bprsPed",table.Data()))
60 emcPed = (emcPed_st*) dbHandler->
getDbTable()->GetTable();
61 for(
int j = 0;j<4800;j++)
62 if(emcPed->Status[j] == 1) nGood++;
63 else if(emcPed->Status[j] == 0) nEmpty++;
66 if(!strcmp(
"bemcCalib",table.Data()) || !strcmp(
"bprsCalib",table.Data()))
68 emcCalib = (emcCalib_st*) dbHandler->
getDbTable()->GetTable();
69 for(
int j = 0;j<4800;j++)
70 if(emcCalib->Status[j] == 1) nGood++;
71 else if(emcCalib->Status[j] == 0) nEmpty++;
74 if(!strcmp(
"bemcStatus",table.Data()) || !strcmp(
"bprsStatus",table.Data()))
76 emcStatus = (emcStatus_st*) dbHandler->
getDbTable()->GetTable();
77 for(
int j = 0;j<4800;j++)
78 if(emcStatus->Status[j] == 1) nGood++;
79 else if(emcStatus->Status[j] == 0) nEmpty++;
82 if(!strcmp(
"bemcGain",table.Data()) || !strcmp(
"bprsGain",table.Data()))
84 emcGain = (emcGain_st*) dbHandler->
getDbTable()->GetTable();
85 for(
int j = 0;j<4800;j++)
86 if(emcGain->Status[j] == 1) nGood++;
87 else if(emcGain->Status[j] == 0) nEmpty++;
91 if(!strcmp(
"bsmdePed",table.Data()) || !strcmp(
"bsmdpPed",table.Data()))
93 smdPed = (smdPed_st*) dbHandler->
getDbTable()->GetTable();
94 for(
int j = 0;j<18000;j++)
95 if (smdPed->Status[j] == 1) nGood++;
96 else if(smdPed->Status[j] == 0) nEmpty++;
99 if(!strcmp(
"bsmdeCalib",table.Data()) || !strcmp(
"bsmdpCalib",table.Data()))
101 smdCalib = (smdCalib_st*) dbHandler->
getDbTable()->GetTable();
102 for(
int j = 0;j<18000;j++)
103 if (smdCalib->Status[j] == 1) nGood++;
104 else if(smdCalib->Status[j] == 0) nEmpty++;
107 if(!strcmp(
"bsmdeStatus",table.Data()) || !strcmp(
"bsmdpStatus",table.Data()))
109 smdStatus = (smdStatus_st*) dbHandler->
getDbTable()->GetTable();
110 for(
int j = 0;j<18000;j++)
111 if (smdStatus->Status[j] == 1) nGood++;
112 else if(smdStatus->Status[j] == 0) nEmpty++;
115 if(!strcmp(
"bsmdeGain",table.Data()) || !strcmp(
"bsmdpGain",table.Data()))
117 smdGain = (smdGain_st*) dbHandler->
getDbTable()->GetTable();
118 for(
int j = 0;j<18000;j++)
119 if (smdGain->Status[j] == 1) nGood++;
120 else if(smdGain->Status[j] == 0) nEmpty++;
124 sprintf(line,
" %4d %s Good channels = %4d Empty = %5d BAD = %5d\n",i,list[i].c_str(),nGood,nEmpty,nBad);
127 cout <<
"List size = "<<list.size()<<endl<<endl;
129 cout <<
" next() for the next plot in the list\n";
130 cout <<
" previous() for the previous plot in the list\n";
131 cout <<
" plot(i) for the i-entry in the list\n";
132 cout <<
" stats() for this statistics\n";
136 if(I>=list.size() || I <0)
return;
137 std::string a = list[I];
139 dbHandler->setTimeStamp(a.c_str());
141 if(!strcmp(
"bemcPed",table.Data()) || !strcmp(
"bprsPed",table.Data())) draw((emcPed_st*) dbHandler->
getDbTable()->GetTable());
142 if(!strcmp(
"bemcCalib",table.Data()) || !strcmp(
"bprsCalib",table.Data())) draw((emcCalib_st*) dbHandler->
getDbTable()->GetTable());
143 if(!strcmp(
"bemcStatus",table.Data()) || !strcmp(
"bprsStatus",table.Data())) draw((emcStatus_st*) dbHandler->
getDbTable()->GetTable());
144 if(!strcmp(
"bemcGain",table.Data()) || !strcmp(
"bprsGain",table.Data())) draw((emcGain_st*) dbHandler->
getDbTable()->GetTable());
146 if(!strcmp(
"bsmdePed",table.Data()) || !strcmp(
"bsmdpPed",table.Data())) draw((smdPed_st*) dbHandler->
getDbTable()->GetTable());
147 if(!strcmp(
"bsmdeCalib",table.Data()) || !strcmp(
"bsmdpCalib",table.Data())) draw((smdCalib_st*) dbHandler->
getDbTable()->GetTable());
148 if(!strcmp(
"bsmdeStatus",table.Data()) || !strcmp(
"bsmdpStatus",table.Data())) draw((smdStatus_st*) dbHandler->
getDbTable()->GetTable());
149 if(!strcmp(
"bsmdeGain",table.Data()) || !strcmp(
"bsmdpGain",table.Data())) draw((smdGain_st*) dbHandler->
getDbTable()->GetTable());
151 if(!strcmp(
"bemcTriggerPed",table.Data())) draw((emcTriggerPed_st*) dbHandler->
getDbTable()->GetTable());
152 if(!strcmp(
"bemcTriggerStatus",table.Data())) draw((emcTriggerStatus_st*) dbHandler->
getDbTable()->GetTable());
153 if(!strcmp(
"bemcTriggerLUT",table.Data())) draw((emcTriggerLUT_st*) dbHandler->
getDbTable()->GetTable());
156 cout <<
" next() for the next plot in the list\n";
157 cout <<
" previous() for the previous plot in the list\n";
158 cout <<
" plot(i) for the i-entry in the list\n";
159 cout <<
" stats() for statistics\n";
163 if(list.size()==0)
return;
165 if(index>=list.size()) index = 0;
171 if(list.size()==0)
return;
173 if(index<0) index = list.size()-1;
StEmcDbHandler()
Class ctor.
std::vector< std::string > getTimeStampList(const char *beginTime, const char *endTime)