31 " Creating SiStripActionExecutor " <<
"\n" ;
42 " Deleting SiStripActionExecutor " <<
"\n" ;
55 std::string fpath =
pSet_.
getUntrackedParameter<std::string>(
"SummaryConfigPath",
"DQM/SiStripMonitorClient/data/sistrip_monitorelement_config.xml");
75 std::string dname =
"SiStrip/MechanicalView";
88 std::string dname =
"MechanicalView";
106 DQMStore* dqm_store, std::string& map_type) {
139 ofstream report_file;
141 report_file <<
" Nothing to report!!" << std::endl;
150 std::string localPath = std::string(
"DQM/SiStripMonitorClient/data/sistrip_plot_layout.xml");
154 std::map<std::string, std::vector<std::string> > layout_map;
158 std::ostringstream shift_summary;
165 shift_summary <<
" Report Summary Content :" << std::endl;
166 shift_summary <<
" =========================" << std::endl;
170 std::string report_path;
171 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECB";
172 me = dqm_store->
get(report_path);
175 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECF";
176 me = dqm_store->
get(report_path);
179 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIB";
180 me = dqm_store->
get(report_path);
183 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDB";
184 me = dqm_store->
get(report_path);
187 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDF";
188 me = dqm_store->
get(report_path);
191 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TOB";
192 me = dqm_store->
get(report_path);
195 shift_summary << std::endl;
198 ofstream report_file;
200 report_file << shift_summary.str() << std::endl;
210 std::ostringstream& str_val, std::string
name) {
211 str_val <<
" " << name <<
" : ";
215 float fvalue = atof(value.c_str());
216 if (fvalue == -1.0) str_val <<
" Dummy Value "<<std::endl;
217 else str_val << fvalue << std::endl;
224 str_val << std::endl;
225 for (
std::map<std::string, std::vector< std::string > >::iterator it = layout_map.begin() ; it != layout_map.end(); it++) {
226 std::string set_name = it->first;
227 if (set_name.find(
"Summary") != std::string::npos)
continue;
230 str_val <<
" " << set_name <<
" : " << std::endl;
231 str_val <<
" ===================================="<< std::endl;
233 str_val << std::setprecision(2);
234 str_val << setiosflags(std::ios::fixed);
235 for (std::vector<std::string>::iterator im = it->second.begin();
236 im != it->second.end(); im++) {
237 std::string path_name = (*im);
238 if (path_name.size() == 0)
continue;
240 std::ostringstream entry_str, mean_str, rms_str;
241 entry_str << std::setprecision(2);
242 entry_str << setiosflags(std::ios::fixed);
243 mean_str << std::setprecision(2);
244 mean_str << setiosflags(std::ios::fixed);
245 rms_str << std::setprecision(2);
246 rms_str << setiosflags(std::ios::fixed);
247 entry_str << std::setw(7) << me->
getEntries();
248 mean_str << std::setw(7) << me->
getMean();
249 rms_str << std::setw(7) << me->
getRMS();
251 "entries",entry_str.str(),
"mean",mean_str.str(),
"rms",rms_str.str());
253 if (me) str_val <<
" "<< me->
getName() <<
" : entries = "<< std::setw(7)
255 <<
" : rms = "<< me->
getRMS()<< std::endl;
257 str_val << std::endl;
266 std::string mdir =
"MechanicalView";
268 std::string mechanicalview_dir = dqm_store->
pwd();
270 std::vector<std::string> subdet_folder;
271 subdet_folder.push_back(
"TIB");
272 subdet_folder.push_back(
"TOB");
273 subdet_folder.push_back(
"TEC/side_1");
274 subdet_folder.push_back(
"TEC/side_2");
275 subdet_folder.push_back(
"TID/side_1");
276 subdet_folder.push_back(
"TID/side_2");
279 int nDetsWithErrorTotal = 0;
280 for (std::vector<std::string>::const_iterator im = subdet_folder.begin(); im != subdet_folder.end(); im++) {
281 std::string dname = mechanicalview_dir +
"/" + (*im);
282 if (!dqm_store->
dirExists(dname))
continue;
283 str_val <<
"============"<< std::endl;
284 str_val << (*im) << std::endl;
285 str_val <<
"============"<< std::endl;
286 str_val << std::endl;
288 dqm_store->
cd(dname);
289 std::vector<std::string> module_folders;
291 int nDets = module_folders.size();
294 int nDetsWithError = 0;
295 std::string bad_module_folder = dname +
"/" +
"BadModuleList";
296 if (dqm_store->
dirExists(bad_module_folder)) {
297 std::vector<MonitorElement *> meVec = dqm_store->
getContents(bad_module_folder);
298 for (std::vector<MonitorElement *>::const_iterator it = meVec.begin();
299 it != meVec.end(); it++) {
301 uint16_t
flag = (*it)->getIntValue();
304 str_val << (*it)->getName() <<
" flag : " << (*it)->getIntValue() <<
" " << message << std::endl;
307 str_val <<
"--------------------------------------------------------------------"<< std::endl;
308 str_val <<
" Detectors : Total "<< nDets
309 <<
" with Error " << nDetsWithError<< std::endl;
310 str_val <<
"--------------------------------------------------------------------"<< std::endl;
312 nDetsWithErrorTotal += nDetsWithError;
315 str_val <<
"--------------------------------------------------------------------"<< std::endl;
316 str_val <<
" Total Number of Connected Detectors : " << nDetsTotal << std::endl;
317 str_val <<
" Total Number of Detectors with Error : " << nDetsWithErrorTotal << std::endl;
318 str_val <<
"--------------------------------------------------------------------"<< std::endl;
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 createTkMap(const edm::ParameterSet &tkmapPset, const edm::ESHandle< SiStripFedCabling > &fedcabling, DQMStore *dqm_store, std::string &map_type)
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 createOfflineTkMap(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &map_type)
void createSummary(DQMStore *dqm_store)
SiStripActionExecutor(edm::ParameterSet const &ps)
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 readTkMapConfiguration()
bool init(std::string main)
Write XML file.
void fillStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &cabling)
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 fillStatus(DQMStore *dqm_store, const edm::ESHandle< SiStripDetCabling > &fedcabling)
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()
void createForOffline(const edm::ParameterSet &tkmapPset, DQMStore *dqm_store, std::string &htype)
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
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_
void create(const edm::ParameterSet &tkmapPset, const edm::ESHandle< SiStripFedCabling > &fedcabling, DQMStore *dqm_store, std::string &htype)
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)
const std::string & pwd(void) const