23 edm::LogInfo(
"SiStripActionExecutor") <<
" Creating SiStripActionExecutor " 29 edm::LogInfo(
"SiStripActionExecutor") <<
" Deleting SiStripActionExecutor " 41 "DQM/SiStripMonitorClient/data/sistrip_monitorelement_config.xml");
51 tkMapCreator_ = std::make_unique<SiStripTrackerMapCreator>(eSetup);
118 tkMapCreator_->createInfoFile(map_names, tkinfo_tree, dqm_store, detidList);
158 report_file <<
" Nothing to report!!" << std::endl;
167 "DQM/SiStripMonitorClient/data/sistrip_plot_layout.xml"};
171 std::map<std::string, std::vector<std::string>> layout_map;
174 std::ostringstream shift_summary;
179 shift_summary <<
" Report Summary Content :\n" 180 <<
" =========================" << std::endl;
185 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECB";
186 me = dqm_store.
get(report_path);
189 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECF";
190 me = dqm_store.
get(report_path);
193 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIB";
194 me = dqm_store.
get(report_path);
197 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDB";
198 me = dqm_store.
get(report_path);
201 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDF";
202 me = dqm_store.
get(report_path);
205 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TOB";
206 me = dqm_store.
get(report_path);
209 shift_summary << std::endl;
214 report_file << shift_summary.str() << std::endl;
222 std::ostringstream& str_val,
225 str_val <<
" " << name <<
" : ";
228 configWriter_->createChildElement(
"MonitorElement", name,
"value", value);
229 float fvalue = atof(value.c_str());
231 str_val <<
" Dummy Value " << std::endl;
233 str_val << fvalue << std::endl;
240 std::ostringstream& str_val)
242 str_val << std::endl;
243 for (
auto const& [set_name, path_names] : layout_map) {
244 if (set_name.find(
"Summary") != std::string::npos)
continue;
247 str_val <<
" " << set_name <<
" : " << std::endl;
248 str_val <<
" ===================================="<< std::endl;
250 str_val << std::setprecision(2);
252 for (
auto const&
path_name : path_names) {
255 std::ostringstream entry_str, mean_str, rms_str;
256 entry_str << std::setprecision(2);
258 mean_str << std::setprecision(2);
260 rms_str << std::setprecision(2);
262 entry_str << std::setw(7) << me->
getEntries();
263 mean_str << std::setw(7) << me->
getMean();
264 rms_str << std::setw(7) << me->
getRMS();
275 str_val <<
" " << me->
getName() <<
" : entries = " << std::setw(7)
277 <<
" : rms = " << me->
getRMS() <<
'\n';
279 str_val << std::endl;
288 std::ostringstream& str_val)
296 std::vector<std::string> subdet_folder;
297 subdet_folder.push_back(
"TIB");
298 subdet_folder.push_back(
"TOB");
299 subdet_folder.push_back(
"TEC/MINUS");
300 subdet_folder.push_back(
"TEC/PLUS");
301 subdet_folder.push_back(
"TID/MINUS");
302 subdet_folder.push_back(
"TID/PLUS");
305 int nDetsWithErrorTotal = 0;
306 for (
auto const&
sd : subdet_folder) {
308 if (!dqm_store.
dirExists(dname))
continue;
309 str_val <<
"============\n" << sd <<
'\n' <<
"============\n" << std::endl;
312 std::vector<std::string> module_folders;
314 int nDets = module_folders.size();
317 int nDetsWithError = 0;
318 std::string bad_module_folder = dname +
"/" +
"BadModuleList";
319 if (dqm_store.
dirExists(bad_module_folder)) {
320 auto const meVec = dqm_store.
getContents(bad_module_folder);
321 for (
auto me : meVec) {
323 uint16_t
flag = me->getIntValue();
326 str_val << me->getName() <<
" flag : " << me->getIntValue() <<
" " 327 << message << std::endl;
330 str_val <<
"---------------------------------------------------------------" 332 <<
" Detectors : Total " << nDets <<
" with Error " 333 << nDetsWithError <<
'\n' 334 <<
"---------------------------------------------------------------" 337 nDetsWithErrorTotal += nDetsWithError;
341 <<
"--------------------------------------------------------------------\n" 342 <<
" Total Number of Connected Detectors : " << nDetsTotal <<
'\n' 343 <<
" Total Number of Detectors with Error : " << nDetsWithErrorTotal <<
'\n' 344 <<
"--------------------------------------------------------------------"
T getUntrackedParameter(std::string const &, T const &) const
static void getModuleFolderList(DQMStore &dqm_store, std::vector< std::string > &m_ids)
std::vector< MonitorElement * > getContents(std::string const &path) const
std::unique_ptr< SiStripSummaryCreator > summaryCreator_
void createTkMap(const edm::ParameterSet &tkmapPset, DQMStore &dqm_store, std::string &map_type, const edm::EventSetup &eSetup)
void getDocument(std::string configFile, bool UseDB=false)
Methor that parses the xml file configFile.
void fillStatusAtLumi(DQMStore &dqm_store)
void createTkInfoFile(std::vector< std::string > tkhmap_names, TTree *tkinfo_tree, DQMStore &dqm_store)
SiStripActionExecutor(edm::ParameterSet const &ps)
const std::string & getName() const
get name of ME
void createSummary(DQMStore &dqm_store)
bool readTkMapConfiguration(const edm::EventSetup &eSetup)
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)
std::unique_ptr< SiStripTrackerMapCreator > tkMapCreator_
void fillStatus(DQMStore &dqm_store, edm::ESHandle< SiStripDetCabling > const &fedcabling, edm::EventSetup const &eSetup)
void createDummyShiftReport()
static void getMEValue(MonitorElement const *me, std::string &val)
std::unique_ptr< SiStripQualityChecker > qualityChecker_
const std::vector< uint32_t > & getAllDetIds() const
bool dirExists(std::string const &path) const
true if directory exists
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
edm::ParameterSet const pSet_
std::unique_ptr< SiStripConfigWriter > configWriter_
std::string const & pwd() const
void printFaultyModuleList(DQMStore &dqm_store, std::ostringstream &str_val)
double getEntries() const
get # of entries
void cd()
go to top directory (ie. root)
void createStatus(DQMStore &dqm_store)
virtual ~SiStripActionExecutor()
double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
static bool goToDir(DQMStore &dqm_store, std::string const &name)
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)
void createShiftReport(DQMStore &dqm_store)
void createOfflineTkMap(const edm::ParameterSet &tkmapPset, DQMStore &dqm_store, std::string &map_type, const edm::EventSetup &eSetup)
void printShiftHistoParameters(DQMStore &dqm_store, std::map< std::string, std::vector< std::string >> const &layout_map, std::ostringstream &str_val)