12 string prefix_str =
name.substr(0, (
name.find(
':')));
14 string temp_str =
name.substr(
name.find(
':') + 1);
17 (*it).insert(0, prefix_str);
25 dir_path =
name.substr(0, (
name.find(
':')));
27 string temp_str =
name.substr(
name.find(
':') + 1);
36 string prefix_str =
name.substr(0, (
name.find(
':')));
38 string temp_str =
name.substr(
name.find(
':') + 1);
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);
131 if (
me->getQReports().empty()) {
133 }
else if (
me->hasError()) {
135 }
else if (
me->hasWarning()) {
137 }
else if (
me->hasOtherReport()) {
146 vector<string> qtestNameList;
147 return qtestNameList;
174 int halfcylinder = 0;
183 int nbinHalfcylinder = 168;
188 vector<string> subDirVector;
191 for (vector<string>::const_iterator
it = subDirVector.begin();
it != subDirVector.end();
it++) {
192 if ((*it).find(
"Collector") != string::npos ||
194 (*it).find(
"FU") != string::npos || (*it).find(
"Pixel") != string::npos ||
195 (*it).find(
"Barrel") != string::npos || (*it).find(
"Endcap") != string::npos)
198 if ((*it).find(
"Module") != string::npos) {
199 module = atoi((*it).substr((*it).find(
"_") + 1).c_str());
202 if ((*it).find(
"Shell") != string::npos) {
203 if ((*it).find(
"mI") != string::npos)
205 if ((*it).find(
"mO") != string::npos)
207 if ((*it).find(
"pI") != string::npos)
209 if ((*it).find(
"pO") != string::npos)
212 if ((*it).find(
"Layer") != string::npos) {
213 layer = atoi((*it).substr((*it).find(
"_") + 1).c_str());
224 if ((*it).find(
"Ladder") != string::npos) {
225 ladder = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
227 if ((*it).find(
"HalfCylinder") != string::npos) {
228 if ((*it).find(
"mI") != string::npos)
230 if ((*it).find(
"mO") != string::npos)
232 if ((*it).find(
"pI") != string::npos)
234 if ((*it).find(
"pO") != string::npos)
237 if ((*it).find(
"Disk") != string::npos) {
238 disk = atoi((*it).substr((*it).find(
"_") + 1).c_str());
240 if ((*it).find(
"Blade") != string::npos) {
241 blade = atoi((*it).substr((*it).find(
"_") + 1, 2).c_str());
243 if ((*it).find(
"Panel") != string::npos) {
244 panel = atoi((*it).substr((*it).find(
"_") + 1).c_str());
251 if (module_path.find(
"Barrel") != string::npos) {
252 module_bin =
module + (
ladder - 1) * nbinLadder + nbinLayer + (
shell - 1) * nbinShell;
254 if (module_path.find(
"Endcap") != string::npos) {
255 module_bin =
module + (panel - 1) * nbinPanel + (blade - 1) * nbinBlade + (disk - 1) * nbinDisk +
256 (halfcylinder - 1) * nbinHalfcylinder;
265 TText *sourceCodeOnCanvas;
267 string message =
it->first;
268 int color = (
it->second).
first;
270 sourceCodeOnCanvas = pave->AddText(message.c_str());
271 sourceCodeOnCanvas->SetTextColor(color);
272 sourceCodeOnCanvas->SetTextSize(size);
273 sourceCodeOnCanvas->SetTextFont(112);
278 map<string, string> sourceCode;
279 for (
int iSource = 0; iSource < 5; iSource++) {
304 sourceCode[
type] = code;
310 for (
int iStatus = 1; iStatus < 5; iStatus++) {
311 pair<int, double> color_size;
316 color_size.second = size;
339 string messageString = code +
": " +
type;
340 color_size.first = color;
341 messages[messageString] = color_size;
353 TAxis *xa =
hist->GetXaxis();
354 TAxis *ya =
hist->GetYaxis();
356 xa->SetTitleOffset(0.7);
357 xa->SetTitleSize(0.06);
358 xa->SetLabelSize(0.04);
361 ya->SetTitleOffset(0.7);
362 ya->SetTitleSize(0.06);
364 if (xlow != -1 && xhigh != -1.0) {
365 xa->SetRangeUser(xlow, xhigh);
static int getMEList(std::string name, std::vector< std::string > &values)
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)
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)
static int computeErrorCode(int status)
def split(sequence, size)
static const int STATUS_OK
static void createStatusLegendMessages(std::map< std::string, std::pair< int, double >> &messages)
static std::vector< std::string > getQTestNameList(MonitorElement *me)