20 edm::LogInfo(
"SiStripActionExecutor") <<
" Creating SiStripActionExecutor " 25 edm::LogInfo(
"SiStripActionExecutor") <<
" Deleting SiStripActionExecutor " 34 "SummaryConfigPath",
"DQM/SiStripMonitorClient/data/sistrip_monitorelement_config.xml");
42 tkMapCreator_ = std::make_unique<SiStripTrackerMapCreator>(eSetup);
81 tkMapCreator_->create(tkmapPset, dqm_store, map_type, eSetup);
91 tkMapCreator_->createForOffline(tkmapPset, dqm_store, map_type, eSetup);
102 tkMapCreator_->createInfoFile(map_names, tkinfo_tree, dqm_store);
127 report_file <<
" Nothing to report!!" << std::endl;
133 std::string const localPath{
"DQM/SiStripMonitorClient/data/sistrip_plot_layout.xml"};
137 std::map<std::string, std::vector<std::string>> layout_map;
141 std::ostringstream shift_summary;
146 shift_summary <<
" Report Summary Content :\n" 147 <<
" =========================" << std::endl;
152 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECB";
153 me = dqm_store.
get(report_path);
156 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TECF";
157 me = dqm_store.
get(report_path);
160 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIB";
161 me = dqm_store.
get(report_path);
164 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDB";
165 me = dqm_store.
get(report_path);
168 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TIDF";
169 me = dqm_store.
get(report_path);
172 report_path =
"SiStrip/EventInfo/reportSummaryContents/SiStrip_DetFraction_TOB";
173 me = dqm_store.
get(report_path);
176 shift_summary << std::endl;
181 report_file << shift_summary.str() << std::endl;
188 str_val <<
" " << name <<
" : ";
191 configWriter_->createChildElement(
"MonitorElement", name,
"value", value);
192 float fvalue = atof(value.c_str());
194 str_val <<
" Dummy Value " << std::endl;
196 str_val << fvalue << std::endl;
201 std::ostringstream& str_val) {
202 str_val << std::endl;
203 for (
auto const& [set_name, path_names] : layout_map) {
204 if (set_name.find(
"Summary") != std::string::npos)
208 str_val <<
" " << set_name <<
" : " << std::endl;
209 str_val <<
" ====================================" << std::endl;
211 str_val << std::setprecision(2);
213 for (
auto const& path_name : path_names) {
214 if (path_name.empty())
217 std::ostringstream entry_str, mean_str, rms_str;
218 entry_str << std::setprecision(2);
220 mean_str << std::setprecision(2);
222 rms_str << std::setprecision(2);
224 entry_str << std::setw(7) << me->
getEntries();
225 mean_str << std::setw(7) << me->
getMean();
226 rms_str << std::setw(7) << me->
getRMS();
228 "MonitorElement", me->
getName(),
"entries", entry_str.str(),
"mean", mean_str.str(),
"rms", rms_str.str());
231 str_val <<
" " << me->
getName() <<
" : entries = " << std::setw(7) << me->
getEntries()
232 <<
" mean = " << me->
getMean() <<
" : rms = " << me->
getRMS() <<
'\n';
234 str_val << std::endl;
249 std::vector<std::string> subdet_folder;
250 subdet_folder.push_back(
"TIB");
251 subdet_folder.push_back(
"TOB");
252 subdet_folder.push_back(
"TEC/MINUS");
253 subdet_folder.push_back(
"TEC/PLUS");
254 subdet_folder.push_back(
"TID/MINUS");
255 subdet_folder.push_back(
"TID/PLUS");
258 int nDetsWithErrorTotal = 0;
259 for (
auto const&
sd : subdet_folder) {
263 str_val <<
"============\n" << sd <<
'\n' <<
"============\n" << std::endl;
266 std::vector<std::string> module_folders;
268 int nDets = module_folders.size();
271 int nDetsWithError = 0;
272 std::string bad_module_folder = dname +
"/" +
"BadModuleList";
273 if (dqm_store.
dirExists(bad_module_folder)) {
274 auto const meVec = dqm_store.
getContents(bad_module_folder);
275 for (
auto me : meVec) {
277 uint16_t
flag =
me->getIntValue();
280 str_val <<
me->getName() <<
" flag : " <<
me->getIntValue() <<
" " << message << std::endl;
283 str_val <<
"---------------------------------------------------------------" 285 <<
" Detectors : Total " << nDets <<
" with Error " << nDetsWithError <<
'\n' 286 <<
"---------------------------------------------------------------" 289 nDetsWithErrorTotal += nDetsWithError;
292 str_val <<
"--------------------------------------------------------------------\n" 293 <<
" Total Number of Connected Detectors : " << nDetsTotal <<
'\n' 294 <<
" Total Number of Detectors with Error : " << nDetsWithErrorTotal <<
'\n' 295 <<
"--------------------------------------------------------------------" << std::endl;
T getUntrackedParameter(std::string const &, T const &) const
static void getModuleFolderList(DQMStore &dqm_store, std::vector< std::string > &m_ids)
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)
std::vector< MonitorElement * > getContents(std::string const &path) const
SiStripActionExecutor(edm::ParameterSet const &ps)
const std::string & getName() const
get name of ME
std::string const & pwd() const
void createSummary(DQMStore &dqm_store)
bool readTkMapConfiguration(const edm::EventSetup &eSetup)
static void getBadModuleStatus(uint16_t flag, std::string &message)
void cd()
go to top directory (ie. root)
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)
MonitorElement * get(std::string const &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
std::unique_ptr< SiStripQualityChecker > qualityChecker_
virtual double getEntries() const
get # of entries
edm::ParameterSet const pSet_
std::unique_ptr< SiStripConfigWriter > configWriter_
void printFaultyModuleList(DQMStore &dqm_store, std::ostringstream &str_val)
virtual double getMean(int axis=1) const
get mean value of histogram along x, y or z axis (axis=1, 2, 3 respectively)
virtual double getRMS(int axis=1) const
get RMS of histogram along x, y or z axis (axis=1, 2, 3 respectively)
void createStatus(DQMStore &dqm_store)
virtual ~SiStripActionExecutor()
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)
bool dirExists(std::string const &path) const
true if directory exists