38 edm::LogInfo(
"SiStripBadComponentsDQMService") <<
"[SiStripBadComponentsDQMService::SiStripBadComponentsDQMService]";
43 edm::LogInfo(
"SiStripBadComponentsDQMService") <<
"[SiStripBadComponentsDQMService::~SiStripBadComponentsDQMService]";
56 ss << SiStripDQMPopConSourceHandler<SiStripBadStrip>::getMetaDataString();
64 if ( std::string::npos != pwd.find(
"module_") ) {
66 mfolders.push_back(pwd);
68 for (
const auto& subdir : getter.
getSubdirs() ) {
70 getModuleFolderList(getter, subdir, mfolders);
71 getter.
cd(); getter.
cd(pwd);
87 const std::string mechanicalview_dir =
"MechanicalView";
88 if ( ! getter.
dirExists(mechanicalview_dir) )
return;
90 const std::vector<std::string> subdet_folder = {
"TIB",
"TOB",
"TEC/side_1",
"TEC/side_2",
"TID/side_1",
"TID/side_2" };
93 int nDetsWithErrorTotal = 0;
94 for (
const auto& im : subdet_folder ) {
97 if ( ! getter.
dirExists(dname) )
continue;
100 std::vector<std::string> module_folders;
101 getModuleFolderList(getter, dname, module_folders);
102 int nDets = module_folders.size();
104 int nDetsWithError = 0;
105 const std::string bad_module_folder = dname +
"/" +
"BadModuleList";
107 if ( getter.
dirExists(bad_module_folder) ) {
110 std::cout << me->getName() <<
" " << me->getIntValue() << std::endl;
111 uint32_t detId = std::stoul(me->getName());
112 short flag = me->getIntValue();
114 std::vector<unsigned int> theSiStripVector;
116 unsigned short firstBadStrip=0, NconsecutiveBadStrips=0;
117 unsigned int theBadStripRange;
122 NconsecutiveBadStrips=
reader.getNumberOfApvsAndStripLength(detId).first*128;
124 theBadStripRange =
m_obj.
encode(firstBadStrip,NconsecutiveBadStrips,flag);
126 LogDebug(
"SiStripBadComponentsDQMService") <<
"detid " << detId <<
" \t" 130 theSiStripVector.push_back(theBadStripRange);
135 edm::LogError(
"SiStripBadFiberBuilder")<<
"[SiStripBadFiberBuilder::analyze] detid already exists"<<std::endl;
140 nDetsWithErrorTotal += nDetsWithError;
T getUntrackedParameter(std::string const &, T const &) const
void initES(const edm::EventSetup &) override
std::string getMetaDataString() const override
#define DEFINE_FWK_MODULE(type)
~SiStripPopConBadComponentsHandlerFromDQM() override
def setup(process, global_tag, zero_tesla=False)
void dqmEndJob(DQMStore::IBooker &booker, DQMStore::IGetter &getter) override
SiStripBadStrip * getObj() const override
std::vector< MonitorElement * > getContents(Args &&...args)
const TrackerTopology * trackerTopo_
bool dirExists(std::string const &path)
SiStripPopConBadComponentsHandlerFromDQM(const edm::ParameterSet &iConfig)
std::pair< ContainerIterator, ContainerIterator > Range
std::vector< std::string > getSubdirs()
std::string fullPath() const
bool put(const uint32_t &detID, const InputVector &vect)
T const * product() const
unsigned int encode(const unsigned short &first, const unsigned short &NconsecutiveBadStrips, const unsigned short &flag=0)
void printSummary(std::stringstream &ss, const TrackerTopology *trackerTopo) const