12 string prefix_str = name.substr(0, (name.find(
":")));
14 string temp_str = name.substr(name.find(
":") + 1);
15 split(temp_str, values,
",");
16 for (vector<string>::iterator it = values.begin(); it != values.end(); it++)
17 (*it).insert(0, prefix_str);
25 dir_path = name.substr(0, (name.find(
":")));
27 string temp_str = name.substr(name.find(
":") + 1);
28 split(temp_str, values,
",");
34 if (name.find(name) == string::npos)
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(); it != values.end(); it++) {
42 if ((*it).find(me_name) != string::npos) {
43 full_path = prefix_str + (*it);
60 while (string::npos != pos || string::npos != lastPos) {
62 tokens.push_back(str.substr(lastPos, pos - lastPos));
65 lastPos = str.find_first_not_of(delimiters, pos);
68 pos = str.find_first_of(delimiters, lastPos);
146 vector<string> qtestNameList;
147 return qtestNameList;
168 int status = bei->
getStatus(module_path);
196 int halfcylinder = 0;
205 int nbinHalfcylinder = 168;
210 vector<string> subDirVector;
213 for (vector<string>::const_iterator it = subDirVector.begin(); it != subDirVector.end(); it++) {
214 if ((*it).find(
"Collector") != string::npos ||
216 (*it).find(
"FU") != string::npos || (*it).find(
"Pixel") != string::npos ||
217 (*it).find(
"Barrel") != string::npos || (*it).find(
"Endcap") != string::npos)
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)
227 if ((*it).find(
"mO") != string::npos)
229 if ((*it).find(
"pI") != string::npos)
231 if ((*it).find(
"pO") != string::npos)
234 if ((*it).find(
"Layer") != string::npos) {
235 layer = atoi((*it).substr((*it).find(
"_") + 1).c_str());
246 if ((*it).find(
"Ladder") != string::npos) {
247 ladder = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
249 if ((*it).find(
"HalfCylinder") != string::npos) {
250 if ((*it).find(
"mI") != string::npos)
252 if ((*it).find(
"mO") != string::npos)
254 if ((*it).find(
"pI") != string::npos)
256 if ((*it).find(
"pO") != string::npos)
259 if ((*it).find(
"Disk") != string::npos) {
260 disk = atoi((*it).substr((*it).find(
"_") + 1).c_str());
262 if ((*it).find(
"Blade") != string::npos) {
263 blade = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
265 if ((*it).find(
"Panel") != string::npos) {
266 panel = atoi((*it).substr((*it).find(
"_") + 1).c_str());
273 if (module_path.find(
"Barrel") != string::npos) {
274 module_bin = module + (ladder - 1) * nbinLadder + nbinLayer + (shell - 1) * nbinShell;
276 if (module_path.find(
"Endcap") != string::npos) {
277 module_bin = module + (panel - 1) * nbinPanel + (blade - 1) * nbinBlade + (disk - 1) * nbinDisk +
278 (halfcylinder - 1) * nbinHalfcylinder;
287 TText *sourceCodeOnCanvas;
288 for (
map<
string, pair<int, double>>::const_iterator it =
messages.begin(); it !=
messages.end(); it++) {
289 string message = it->first;
290 int color = (it->second).
first;
292 sourceCodeOnCanvas = pave->AddText(message.c_str());
293 sourceCodeOnCanvas->SetTextColor(color);
294 sourceCodeOnCanvas->SetTextSize(size);
295 sourceCodeOnCanvas->SetTextFont(112);
300 map<string, string> sourceCode;
301 for (
int iSource = 0; iSource < 5; iSource++) {
326 sourceCode[
type] = code;
332 for (
int iStatus = 1; iStatus < 5; iStatus++) {
333 pair<int, double> color_size;
338 color_size.second =
size;
361 string messageString = code +
": " +
type;
362 color_size.first = color;
363 messages[messageString] = color_size;
375 TAxis *xa = hist->GetXaxis();
376 TAxis *ya = hist->GetYaxis();
378 xa->SetTitleOffset(0.7);
379 xa->SetTitleSize(0.06);
380 xa->SetLabelSize(0.04);
383 ya->SetTitleOffset(0.7);
384 ya->SetTitleSize(0.06);
386 if (xlow != -1 && xhigh != -1.0) {
387 xa->SetRangeUser(xlow, xhigh);
std::vector< std::string_view > split(std::string_view, const char *)
static int getMEList(std::string name, std::vector< std::string > &values)
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)
int getStatus(std::string const &path="") const
U second(std::pair< T, U > const &p)
static void setDrawingOption(TH1 *hist, float xlow=-1., float xhigh=-1.)
bool hasWarning() const
true if at least of one of the quality tests returned a warning
static int getStatus(MonitorElement *me)
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)
std::vector< QReport * > getQReports() const
get map of QReports
unsigned long long int rval
bool hasError() const
true if at least of one of the quality tests returned an error
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)