15 std::string prefix_str = name.substr(0,(name.find(
":")));
17 std::string temp_str = name.substr(name.find(
":")+1);
18 split(temp_str, values,
",");
19 for (std::vector<std::string>::iterator it = values.begin();
20 it != values.end(); it++) (*it).insert(0,prefix_str);
28 dir_path = name.substr(0,(name.find(
":")));
30 std::string temp_str = name.substr(name.find(
":")+1);
31 split(temp_str, values,
",");
37 if (name.find(name) == std::string::npos)
return false;
38 std::string prefix_str = name.substr(0,(name.find(
":")));
40 std::string temp_str = name.substr(name.find(
":")+1);
41 std::vector<std::string>
values;
42 split(temp_str, values,
",");
43 for (std::vector<std::string>::iterator it = values.begin();
44 it != values.end(); it++) {
45 if ((*it).find(me_name) != std::string::npos) {
46 full_path = prefix_str + (*it);
56 void SiStripUtility::split(
const std::string& str, std::vector<std::string>& tokens,
const std::string& delimiters) {
63 while (std::string::npos != pos || std::string::npos != lastPos) {
65 tokens.push_back(str.substr(lastPos, pos - lastPos));
68 lastPos = str.find_first_not_of(delimiters, pos);
71 pos = str.find_first_of(delimiters, lastPos);
79 rval = 0; gval = 255; bval = 0;
81 rval = 255; gval = 255; bval = 0;
83 rval = 255; gval = 0; bval = 0;
85 rval = 255; gval = 150; bval = 0;
87 rval = 0; gval = 0; bval = 255;
117 rval = 0; gval = 255;bval = 0;
121 if (((status >> 0) & 0x1) > 0) {
122 rval = 150; gval = 0; bval = 0;
126 if (((status >> 3) & 0x1) > 0) {
127 rval = 100; gval = 100; bval = 255;
131 if (((status >> 4) & 0x1) > 0) {
132 rval = 200; gval = 20; bval = 255;
136 if (((status >> 1) & 0x1) > 0) {
137 rval = 255; bval = 0;
138 if (((status >> 2) & 0x1) > 0) gval = 0;
141 rval = 251; gval = 0; bval = 100;
167 std::string currDir = dqm_store->
pwd();
168 if (currDir.find(
"module_") != std::string::npos) {
170 mfolders.push_back(currDir);
172 std::vector<std::string> subdirs = dqm_store->
getSubdirs();
173 for (std::vector<std::string>::const_iterator it = subdirs.begin();
174 it != subdirs.end(); it++) {
190 std::vector<QReport *> qreports = me->
getQReports();
191 bad_channels =qreports[0]->getBadChannels().size();
211 val = val.substr(val.find(
"=")+1);
218 std::string currDir = dqm_store->
pwd();
219 std::string
dirName = currDir.substr(currDir.find_last_of(
"/")+1);
220 if (dirName.find(name) == 0) {
223 std::vector<std::string> subDirVec = dqm_store->
getSubdirs();
224 for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
225 ic != subDirVec.end(); ic++) {
226 std::string
fname = (*ic);
227 if ((fname.find(
"Reference") != std::string::npos) ||
228 (fname.find(
"AlCaReco") != std::string::npos) ||
229 (fname.find(
"HLT") != std::string::npos) )
continue;
230 dqm_store->
cd(fname);
252 if (tidId.
side() == 2) {
254 }
else if (tidId.
side() == 1) {
267 if (tecId.
side() == 2) {
269 }
else if (tecId.
side() == 1) {
281 if (hname.find(
"FractionOfBadChannels") != std::string::npos) flg |= (1<<0);
282 else if (hname.find(
"NumberOfDigi") != std::string::npos) flg |= (1<<1);
283 else if (hname.find(
"NumberOfCluster") != std::string::npos) flg |= (1<<2);
284 else if (hname.find(
"ExcludedFedChannel") != std::string::npos) flg |= (1<<3);
285 else if (hname.find(
"DCSError") != std::string::npos) flg |= (1<<4);
291 if (flag == 0) message +=
" No Error";
294 if (((flag >> 0) & 0x1) > 0) message +=
" Fed BadChannel : ";
295 if (((flag >> 1) & 0x1) > 0) message +=
" # of Digi : ";
296 if (((flag >> 2) & 0x1) > 0) message +=
" # of Clusters :";
297 if (((flag >> 3) & 0x1) > 0) message +=
" Excluded FED Channel ";
298 if (((flag >> 4) & 0x1) > 0) message +=
" DCSError ";
305 if (type !=
"SiStrip" && type !=
"Tracking")
return;
308 if (type ==
"SiStrip") {
311 path = dqm_store->
pwd();
314 std::string mdir =
"MechanicalView";
316 path = dqm_store->
pwd();
317 path = path.substr(0, path.find(mdir)-1);
321 }
else if (type ==
"Tracking") {
322 std::string top_dir =
"Tracking";
324 dqm_store->
cd(top_dir);
325 path = dqm_store->
pwd();
328 std::string tdir =
"TrackParameters";
330 path = dqm_store->
pwd();
331 path = path.substr(0, path.find(tdir)-1);
static void setBadModuleFlag(std::string &hname, uint16_t &flg)
std::vector< std::string > getSubdirs(void) const
static void getMEValue(MonitorElement *me, std::string &val)
void cd(void)
go to top directory (ie. root)
bool hasError(void) const
true if at least of one of the quality tests returned an error
static void getDetectorStatusColor(int status, int &rval, int &gval, int &bval)
static void getBadModuleStatus(uint16_t flag, std::string &message)
static void split(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters=" ")
static void getSubDetectorTag(uint32_t det_id, std::string &subdet_tag)
unsigned int side() const
positive or negative id
static bool checkME(std::string element, std::string name, std::string &full_path)
bool hasWarning(void) const
true if at least of one of the quality tests returned a warning
const std::string subdet_tag("SubDet")
Kind kind(void) const
Get the type of the monitor element.
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::string valueString(void) const
bool dirExists(const std::string &path) const
true if directory exists
unsigned long long int rval
static void getMEStatusColor(int status, int &rval, int &gval, int &bval)
std::vector< QReport * > getQReports(void) const
get map of QReports
static int getMEStatus(MonitorElement *me)
unsigned int side() const
positive or negative id
static int getMEList(std::string name, std::vector< std::string > &values)
bool hasOtherReport(void) const
true if at least of one of the tests returned some other (non-ok) status
void goUp(void)
equivalent to "cd .."
static const int STATUS_OK
static void getModuleFolderList(DQMStore *dqm_store, std::vector< std::string > &m_ids)
static bool goToDir(DQMStore *dqm_store, std::string name)
const std::string & pwd(void) const
static void getTopFolderPath(DQMStore *dqm_store, std::string type, std::string &path)