13 string prefix_str = name.substr(0,(name.find(
":")));
15 string temp_str = name.substr(name.find(
":")+1);
16 split(temp_str, values,
",");
17 for (vector<string>::iterator it = values.begin();
18 it != values.end(); it++) (*it).insert(0,prefix_str);
26 dir_path = name.substr(0,(name.find(
":")));
28 string temp_str = name.substr(name.find(
":")+1);
29 split(temp_str, values,
",");
35 if (name.find(name) == string::npos)
return false;
36 string prefix_str = name.substr(0,(name.find(
":")));
38 string temp_str = name.substr(name.find(
":")+1);
40 split(temp_str, values,
",");
41 for (vector<string>::iterator it = values.begin();
42 it != values.end(); it++) {
43 if ((*it).find(me_name) != string::npos) {
44 full_path = prefix_str + (*it);
61 while (string::npos != pos || string::npos != lastPos) {
63 tokens.push_back(str.substr(lastPos, pos - lastPos));
66 lastPos = str.find_first_not_of(delimiters, pos);
69 pos = str.find_first_of(delimiters, lastPos);
77 rval = 0; gval = 255; bval = 0;
79 rval = 255; gval = 255; bval = 0;
81 rval = 255; gval = 0; bval = 0;
83 rval = 255; gval = 150; bval = 0;
85 rval = 0; gval = 0; bval = 255;
138 vector<string> qtestNameList;
139 return qtestNameList;
161 string & module_path){
162 int status = bei->
getStatus(module_path);
194 int halfcylinder = 0;
203 int nbinHalfcylinder = 168;
208 vector<string> subDirVector;
211 for (vector<string>::const_iterator it = subDirVector.begin();
212 it != subDirVector.end(); it++) {
213 if((*it).find(
"Collector") != string::npos ||
215 (*it).find(
"FU") != string::npos ||
216 (*it).find(
"Pixel") != string::npos ||
217 (*it).find(
"Barrel") != string::npos ||
218 (*it).find(
"Endcap") != string::npos)
continue;
220 if((*it).find(
"Module") != string::npos){
221 module = atoi((*it).substr((*it).find(
"_")+1).c_str());
224 if((*it).find(
"Shell") != string::npos){
225 if((*it).find(
"mI") != string::npos) shell = 1;
226 if((*it).find(
"mO") != string::npos) shell = 2;
227 if((*it).find(
"pI") != string::npos) shell = 3;
228 if((*it).find(
"pO") != string::npos) shell = 4;
230 if((*it).find(
"Layer") != string::npos){
231 layer = atoi((*it).substr((*it).find(
"_")+1).c_str());
242 if((*it).find(
"Ladder") != string::npos){
243 ladder = atoi((*it).substr((*it).find(
"_")+1,2).c_str());
245 if((*it).find(
"HalfCylinder") != string::npos){
246 if((*it).find(
"mI") != string::npos) halfcylinder = 1;
247 if((*it).find(
"mO") != string::npos) halfcylinder = 2;
248 if((*it).find(
"pI") != string::npos) halfcylinder = 3;
249 if((*it).find(
"pO") != string::npos) halfcylinder = 4;
251 if((*it).find(
"Disk") != string::npos){
252 disk = atoi((*it).substr((*it).find(
"_")+1).c_str());
254 if((*it).find(
"Blade") != string::npos){
255 blade = atoi((*it).substr((*it).find(
"_")+1,2).c_str());
257 if((*it).find(
"Panel") != string::npos){
258 panel = atoi((*it).substr((*it).find(
"_")+1).c_str());
259 if(panel==1) nbinPanel = 0;
260 if(panel==2) nbinPanel = 4;
263 if(module_path.find(
"Barrel") != string::npos){
264 module_bin = module +
265 (ladder-1)*nbinLadder +
267 (shell -1)*nbinShell;
269 if(module_path.find(
"Endcap") != string::npos){
270 module_bin = module +
271 (panel -1)*nbinPanel +
272 (blade -1)*nbinBlade +
274 (halfcylinder-1)*nbinHalfcylinder;
286 TText* sourceCodeOnCanvas;
287 for(
map<
string, pair<int,double> >::const_iterator it =
messages.begin();
293 sourceCodeOnCanvas = pave->AddText(message.c_str());
294 sourceCodeOnCanvas->SetTextColor(color);
295 sourceCodeOnCanvas->SetTextSize(size);
296 sourceCodeOnCanvas->SetTextFont(112);
303 map<string,string> sourceCode;
304 for(
int iSource=0; iSource<5;iSource++){
308 case 0: type =
"RAW"; code =
"1 ";
310 case 1: type =
"DIG"; code =
"10 ";
312 case 2: type =
"CLU"; code =
"100 ";
314 case 3: type =
"TRK"; code =
"1000 ";
316 case 4: type =
"REC"; code =
"10000";
319 sourceCode[
type]=code;
326 for(
int iStatus=1; iStatus<5;iStatus++){
327 pair<int,double> color_size;
332 color_size.second =
size;
334 case 1: code =
"1"; type =
"INSUF_STAT"; color = kBlue;
336 case 2: code =
"2"; type =
"WARNING(S)"; color = kYellow;
338 case 3: code =
"3"; type =
"ERROR(S) "; color = kRed;
340 case 4: code =
"4"; type =
"ERRORS "; color = kMagenta;
343 string messageString = code +
": " +
type;
344 color_size.first =
color;
345 messages[messageString] = color_size;
358 TAxis* xa = hist->GetXaxis();
359 TAxis* ya = hist->GetYaxis();
361 xa->SetTitleOffset(0.7);
362 xa->SetTitleSize(0.06);
363 xa->SetLabelSize(0.04);
366 ya->SetTitleOffset(0.7);
367 ya->SetTitleSize(0.06);
370 if (xlow != -1 && xhigh != -1.0) {
371 xa->SetRangeUser(xlow, xhigh);
int getStatus(const std::string &path="") const
static int getMEList(std::string name, std::vector< std::string > &values)
bool hasError(void) const
true if at least of one of the quality tests returned an error
static bool checkME(std::string element, std::string name, std::string &full_path)
static std::map< std::string, std::string > sourceCodeMap()
static void split(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
static int computeHistoBin(std::string &module_path)
U second(std::pair< T, U > const &p)
static void setDrawingOption(TH1 *hist, float xlow=-1., float xhigh=-1.)
static int getStatus(MonitorElement *me)
bool hasWarning(void) const
true if at least of one of the quality tests returned a warning
static const int INSUF_STAT
static void getStatusColor(int status, int &rval, int &gval, int &bval)
static void createStatusLegendMessages(std::map< std::string, std::pair< int, double > > &messages)
static void fillPaveText(TPaveText *pave, const std::map< std::string, std::pair< int, double > > &messages)
unsigned long long int rval
std::vector< QReport * > getQReports(void) const
get map of QReports
bool hasOtherReport(void) const
true if at least of one of the tests returned some other (non-ok) status
static const int STATUS_OK
static int computeErrorCode(DQMStore *bei, std::string &module_path)
tuple size
Write out results.
static std::vector< std::string > getQTestNameList(MonitorElement *me)