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(); it != values.end(); it++)
18 (*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)
37 string prefix_str = name.substr(0, (name.find(
":")));
39 string temp_str = name.substr(name.find(
":") + 1);
41 split(temp_str, values,
",");
42 for (vector<string>::iterator it = values.begin(); 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);
147 vector<string> qtestNameList;
148 return qtestNameList;
169 int status = bei->getStatus(module_path);
197 int halfcylinder = 0;
206 int nbinHalfcylinder = 168;
211 vector<string> subDirVector;
214 for (vector<string>::const_iterator it = subDirVector.begin(); it != subDirVector.end(); it++) {
215 if ((*it).find(
"Collector") != string::npos ||
217 (*it).find(
"FU") != string::npos || (*it).find(
"Pixel") != string::npos ||
218 (*it).find(
"Barrel") != string::npos || (*it).find(
"Endcap") != string::npos)
221 if ((*it).find(
"Module") != string::npos) {
222 module = atoi((*it).substr((*it).find(
"_") + 1).c_str());
225 if ((*it).find(
"Shell") != string::npos) {
226 if ((*it).find(
"mI") != string::npos)
228 if ((*it).find(
"mO") != string::npos)
230 if ((*it).find(
"pI") != string::npos)
232 if ((*it).find(
"pO") != string::npos)
235 if ((*it).find(
"Layer") != string::npos) {
236 layer = atoi((*it).substr((*it).find(
"_") + 1).c_str());
247 if ((*it).find(
"Ladder") != string::npos) {
248 ladder = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
250 if ((*it).find(
"HalfCylinder") != string::npos) {
251 if ((*it).find(
"mI") != string::npos)
253 if ((*it).find(
"mO") != string::npos)
255 if ((*it).find(
"pI") != string::npos)
257 if ((*it).find(
"pO") != string::npos)
260 if ((*it).find(
"Disk") != string::npos) {
261 disk = atoi((*it).substr((*it).find(
"_") + 1).c_str());
263 if ((*it).find(
"Blade") != string::npos) {
264 blade = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
266 if ((*it).find(
"Panel") != string::npos) {
267 panel = atoi((*it).substr((*it).find(
"_") + 1).c_str());
274 if (module_path.find(
"Barrel") != string::npos) {
275 module_bin = module + (ladder - 1) * nbinLadder + nbinLayer + (shell - 1) * nbinShell;
277 if (module_path.find(
"Endcap") != string::npos) {
278 module_bin = module + (panel - 1) * nbinPanel + (blade - 1) * nbinBlade + (disk - 1) * nbinDisk +
279 (halfcylinder - 1) * nbinHalfcylinder;
288 TText *sourceCodeOnCanvas;
289 for (
map<
string, pair<int, double>>::const_iterator it = messages.begin(); it != messages.end(); it++) {
290 string message = it->first;
293 sourceCodeOnCanvas = pave->AddText(message.c_str());
294 sourceCodeOnCanvas->SetTextColor(color);
295 sourceCodeOnCanvas->SetTextSize(size);
296 sourceCodeOnCanvas->SetTextFont(112);
301 map<string, string> sourceCode;
302 for (
int iSource = 0; iSource < 5; iSource++) {
327 sourceCode[
type] = code;
333 for (
int iStatus = 1; iStatus < 5; iStatus++) {
334 pair<int, double> color_size;
339 color_size.second =
size;
362 string messageString = code +
": " +
type;
363 color_size.first =
color;
364 messages[messageString] = color_size;
376 TAxis *xa = hist->GetXaxis();
377 TAxis *ya = hist->GetYaxis();
379 xa->SetTitleOffset(0.7);
380 xa->SetTitleSize(0.06);
381 xa->SetLabelSize(0.04);
384 ya->SetTitleOffset(0.7);
385 ya->SetTitleSize(0.06);
387 if (xlow != -1 && xhigh != -1.0) {
388 xa->SetRangeUser(xlow, xhigh);
static int getMEList(std::string name, std::vector< std::string > &values)
bool hasError() 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)
bool hasOtherReport() const
true if at least of one of the tests returned some other (non-ok) status
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() const
true if at least of one of the quality tests returned a warning
static const int INSUF_STAT
static void fillPaveText(TPaveText *pave, const std::map< std::string, std::pair< int, double >> &messages)
static void getStatusColor(int status, int &rval, int &gval, int &bval)
unsigned long long int rval
std::vector< QReport * > getQReports() const
get map of QReports
static const int STATUS_OK
static int computeErrorCode(DQMStore *bei, std::string &module_path)
static void createStatusLegendMessages(std::map< std::string, std::pair< int, double >> &messages)
static std::vector< std::string > getQTestNameList(MonitorElement *me)