28 " Creating SiStripActionExecutor " <<
"\n" ;
39 " Deleting SiStripActionExecutor " <<
"\n" ;
147 ofstream report_file;
149 report_file <<
" Nothing to report!!" << std::endl;
162 std::map<std::string, std::vector<std::string> > layout_map;
166 std::ostringstream shift_summary;
173 shift_summary <<
" Report Summary Content :" << std::endl;
174 shift_summary <<
" =========================" << std::endl;
179 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECB";
180 me = dqm_store->
get(report_path);
183 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECF";
184 me = dqm_store->
get(report_path);
187 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIB";
188 me = dqm_store->
get(report_path);
191 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDB";
192 me = dqm_store->
get(report_path);
195 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDF";
196 me = dqm_store->
get(report_path);
199 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TOB";
200 me = dqm_store->
get(report_path);
203 shift_summary << std::endl;
206 ofstream report_file;
208 report_file << shift_summary.str() << std::endl;
219 str_val <<
" " << name <<
" : ";
223 float fvalue = atof(value.c_str());
224 if (fvalue == -1.0) str_val <<
" Dummy Value "<<std::endl;
225 else str_val << fvalue << std::endl;
232 str_val << std::endl;
233 for (
std::map<
std::string, std::vector< std::string > >::iterator it = layout_map.begin() ; it != layout_map.end(); it++) {
235 if (set_name.find(
"Summary") != std::string::npos)
continue;
238 str_val <<
" " << set_name <<
" : " << std::endl;
239 str_val <<
" ===================================="<< std::endl;
241 str_val << std::setprecision(2);
242 str_val << setiosflags(std::ios::fixed);
243 for (std::vector<std::string>::iterator im = it->second.begin();
244 im != it->second.end(); im++) {
246 if (path_name.size() == 0)
continue;
248 std::ostringstream entry_str, mean_str, rms_str;
249 entry_str << std::setprecision(2);
250 entry_str << setiosflags(std::ios::fixed);
251 mean_str << std::setprecision(2);
252 mean_str << setiosflags(std::ios::fixed);
253 rms_str << std::setprecision(2);
254 rms_str << setiosflags(std::ios::fixed);
255 entry_str << std::setw(7) << me->
getEntries();
256 mean_str << std::setw(7) << me->
getMean();
257 rms_str << std::setw(7) << me->
getRMS();
259 "entries",entry_str.str(),
"mean",mean_str.str(),
"rms",rms_str.str());
261 if (me) str_val <<
" "<< me->
getName() <<
" : entries = "<< std::setw(7)
263 <<
" : rms = "<< me->
getRMS()<< std::endl;
265 str_val << std::endl;
278 std::vector<std::string> subdet_folder;
279 subdet_folder.push_back(
"TIB");
280 subdet_folder.push_back(
"TOB");
281 subdet_folder.push_back(
"TEC/side_1");
282 subdet_folder.push_back(
"TEC/side_2");
283 subdet_folder.push_back(
"TID/side_1");
284 subdet_folder.push_back(
"TID/side_2");
287 int nDetsWithErrorTotal = 0;
288 for (std::vector<std::string>::const_iterator im = subdet_folder.begin(); im != subdet_folder.end(); im++) {
289 std::string dname = mechanicalview_dir +
"/" + (*im);
290 if (!dqm_store->
dirExists(dname))
continue;
291 str_val <<
"============"<< std::endl;
292 str_val << (*im) << std::endl;
293 str_val <<
"============"<< std::endl;
294 str_val << std::endl;
296 dqm_store->
cd(dname);
297 std::vector<std::string> module_folders;
299 int nDets = module_folders.size();
302 int nDetsWithError = 0;
303 std::string bad_module_folder = dname +
"/" +
"BadModuleList";
304 if (dqm_store->
dirExists(bad_module_folder)) {
305 std::vector<MonitorElement *> meVec = dqm_store->
getContents(bad_module_folder);
306 for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
307 it != meVec.end(); it++) {
309 uint16_t
flag = (*it)->getIntValue();
312 str_val << (*it)->getName() <<
" flag : " << (*it)->getIntValue() <<
" " << message << std::endl;
315 str_val <<
"--------------------------------------------------------------------"<< std::endl;
316 str_val <<
" Detectors : Total "<< nDets
317 <<
" with Error " << nDetsWithError<< std::endl;
318 str_val <<
"--------------------------------------------------------------------"<< std::endl;
320 nDetsWithErrorTotal += nDetsWithError;
323 str_val <<
"--------------------------------------------------------------------"<< std::endl;
324 str_val <<
" Total Number of Connected Detectors : " << nDetsTotal << std::endl;
325 str_val <<
" Total Number of Detectors with Error : " << nDetsWithErrorTotal << std::endl;
326 str_val <<
"--------------------------------------------------------------------"<< std::endl;
void fillStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &cabling, const edm::EventSetup &eSetup)
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
void createChildElement(std::string tag, std::string name)
void createOfflineTkMap(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &map_type, const edm::EventSetup &eSetup)
void createTkMap(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &map_type, const edm::EventSetup &eSetup)
void bookStatus(DQMStore *dqm_store)
static void getMEValue(MonitorElement *me, std::string &val)
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void cd(void)
go to top directory (ie. root)
void createSummary(DQMStore *dqm_store)
SiStripActionExecutor(edm::ParameterSet const &ps)
void fillStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &fedcabling, const edm::EventSetup &eSetup)
bool readTkMapConfiguration(const edm::EventSetup &eSetup)
void createStatus(DQMStore *dqm_store)
double getEntries(void) const
get # of entries
double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
static void getBadModuleStatus(uint16_t flag, std::string &message)
void createDummyShiftReport()
SiStripSummaryCreator * summaryCreator_
void createElement(std::string tag)
bool readConfiguration(std::string &file_path)
bool init(std::string main)
Write XML file.
void createSummary(DQMStore *dqm_store)
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::vector< MonitorElement * > getContents(const std::string &path) const
void createShiftReport(DQMStore *dqm_store)
SiStripConfigWriter * configWriter_
bool dirExists(const std::string &path) const
true if directory exists
SiStripTrackerMapCreator * tkMapCreator_
void fillStatusAtLumi(DQMStore *dqm_store)
void fillStatusAtLumi(DQMStore *dqm_store)
void printShiftHistoParameters(DQMStore *dqm_store, std::map< std::string, std::vector< std::string > > &layout_map, std::ostringstream &str_val)
virtual ~SiStripActionExecutor()
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void createForOffline(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
void write(std::string fname)
void createSummaryOffline(DQMStore *dqm_store)
bool getAllLayouts(std::map< std::string, std::vector< std::string > > &me_names)
void printReportSummary(MonitorElement *me, std::ostringstream &str_val, std::string name)
SiStripQualityChecker * qualityChecker_
static void getModuleFolderList(DQMStore *dqm_store, std::vector< std::string > &m_ids)
void printFaultyModuleList(DQMStore *dqm_store, std::ostringstream &str_val)
static bool goToDir(DQMStore *dqm_store, std::string name)
void create(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &htype, const edm::EventSetup &eSetup)
const std::string & pwd(void) const