32 edm::LogInfo(
"SiStripBadComponentsDQMService") <<
"[SiStripBadComponentsDQMService::SiStripBadComponentsDQMService]";
37 edm::LogInfo(
"SiStripBadComponentsDQMService") <<
"[SiStripBadComponentsDQMService::~SiStripBadComponentsDQMService]";
43 ss << SiStripDQMPopConSourceHandler<SiStripBadStrip>::getMetaDataString();
51 if ( std::string::npos != pwd.find(
"module_") ) {
53 mfolders.push_back(pwd);
55 for (
const auto& subdir : getter.
getSubdirs() ) {
57 getModuleFolderList(getter, subdir, mfolders);
58 getter.
cd(); getter.
cd(pwd);
74 const std::string mechanicalview_dir =
"MechanicalView";
75 if ( ! getter.
dirExists(mechanicalview_dir) )
return;
77 const std::vector<std::string> subdet_folder = {
"TIB",
"TOB",
"TEC/side_1",
"TEC/side_2",
"TID/side_1",
"TID/side_2" };
80 int nDetsWithErrorTotal = 0;
81 for (
const auto& im : subdet_folder ) {
84 if ( ! getter.
dirExists(dname) )
continue;
87 std::vector<std::string> module_folders;
88 getModuleFolderList(getter, dname, module_folders);
89 int nDets = module_folders.size();
91 int nDetsWithError = 0;
92 const std::string bad_module_folder = dname +
"/" +
"BadModuleList";
94 if ( getter.
dirExists(bad_module_folder) ) {
97 std::cout << me->getName() <<
" " << me->getIntValue() << std::endl;
98 uint32_t detId = std::stoul(me->getName());
99 short flag = me->getIntValue();
101 std::vector<unsigned int> theSiStripVector;
103 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
104 unsigned int theBadStripRange;
109 NconsecutiveBadStrips=
reader.getNumberOfApvsAndStripLength(detId).first*128;
111 theBadStripRange =
m_obj.
encode(firstBadStrip,NconsecutiveBadStrips,flag);
113 LogDebug(
"SiStripBadComponentsDQMService") <<
"detid " << detId <<
" \t" 117 theSiStripVector.push_back(theBadStripRange);
122 edm::LogError(
"SiStripBadFiberBuilder")<<
"[SiStripBadFiberBuilder::analyze] detid already exists"<<std::endl;
127 nDetsWithErrorTotal += nDetsWithError;
std::vector< MonitorElement * > getContents(Args &&...args)
T getUntrackedParameter(std::string const &, T const &) const
std::string getMetaDataString() const override
void printSummary(std::stringstream &ss) const
#define DEFINE_FWK_MODULE(type)
~SiStripPopConBadComponentsHandlerFromDQM() override
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
SiStripBadStrip * getObj() const override
bool dirExists(const std::string &path)
SiStripPopConBadComponentsHandlerFromDQM(const edm::ParameterSet &iConfig)
std::vector< std::string > getSubdirs(void)
std::pair< ContainerIterator, ContainerIterator > Range
std::string fullPath() const
bool put(const uint32_t &detID, const InputVector &vect)
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)