73 findingRecord<SiStripBadModuleFedErrRcd>();
102 std::vector<std::pair<uint16_t,uint16_t>> ret;
106 if ( ! entries ) entries = th2->GetBinContent(th2->GetMaximumBin());
107 for ( uint16_t
i = 1;
i < th2->GetNbinsY()+1; ++
i ) {
108 for ( uint16_t j = 1; j < th2->GetNbinsX()+1; ++j ) {
109 if ( th2->GetBinContent(j,
i) >
m_cutoff * entries ) {
110 edm::LogInfo(
"SiStripBadModuleFedErrService") <<
" [SiStripBadModuleFedErrService::getFedBadChannelList] :: FedId & Channel " << th2->GetYaxis()->GetBinLowEdge(
i) <<
" " << th2->GetXaxis()->GetBinLowEdge(j);
111 ret.push_back(std::pair<uint16_t, uint16_t>(th2->GetYaxis()->GetBinLowEdge(
i), th2->GetXaxis()->GetBinLowEdge(j)));
128 auto quality = std::make_unique<SiStripQuality>();
132 edm::LogInfo(
"SiStripBadModuleFedErrService") <<
"[SiStripBadModuleFedErrService::openRequestedFile] Accessing root File" <<
m_fileName;
133 if ( ! dqmStore->load(
m_fileName, DQMStore::OpenRunDirs::StripRunDirs,
true) ) {
134 edm::LogError(
"SiStripBadModuleFedErrService")<<
"[SiStripBadModuleFedErrService::openRequestedFile] Requested file " <<
m_fileName <<
"Can not be opened!! ";
143 if ( dqmStore->dirExists(
dname) ) {
146 std::map<uint32_t, std::set<int>> detectorMap;
148 const uint16_t fId = elm.first;
149 const uint16_t fChan = elm.second/2;
150 if ( ( fId == 9999 ) && ( fChan == 9999 ) )
continue;
156 for (
const auto& detElm : detectorMap ) {
158 unsigned short firstBadStrip{0};
159 unsigned short fNconsecutiveBadStrips{0};
161 for (
const auto pair : detElm.second ) {
162 if ( last_pair == -1 ) {
163 firstBadStrip = pair * 128*2;
164 fNconsecutiveBadStrips = 128*2;
165 }
else if ( pair - last_pair > 1 ) {
166 theSiStripVector.push_back(
quality->encode(firstBadStrip, fNconsecutiveBadStrips));
167 firstBadStrip = pair * 128*2;
168 fNconsecutiveBadStrips = 128*2;
170 fNconsecutiveBadStrips += 128*2;
174 unsigned int theBadStripRange =
quality->encode(firstBadStrip, fNconsecutiveBadStrips);
175 theSiStripVector.push_back(theBadStripRange);
178 <<
" SiStripBadModuleFedErrService::readBadComponentsFromFed " 179 <<
" detid " << detElm.first
180 <<
" firstBadStrip " << firstBadStrip
181 <<
" NconsecutiveBadStrips " << fNconsecutiveBadStrips
182 <<
" packed integer " << std::hex << theBadStripRange <<
std::dec;
185 edm::LogError(
"SiStripBadModuleFedErrService") <<
"[SiStripBadModuleFedErrService::readBadComponentsFromFed] detid already exists";
T getParameter(std::string const &) const
void setIntervalFor(const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &iov, edm::ValidityInterval &iValidity) override
SiStripBadModuleFedErrESSource(const edm::ParameterSet &)
FedChannelConnection fedConnection(uint16_t fed_id, uint16_t fed_ch) const
~SiStripBadModuleFedErrESSource() override
uint16_t apvPairNumber() const
static const IOVSyncValue & endOfTime()
std::unique_ptr< SiStripBadStrip > ReturnType
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
static const IOVSyncValue & beginOfTime()
const uint32_t & detId() const
Class containning control, module, detector and connection information, at the level of a FED channel...
const DepRecordT getRecord() const
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool dirExists(const std::string &path) const
true if directory exists
#define DEFINE_FWK_EVENTSETUP_SOURCE(type)
std::vector< std::pair< uint16_t, uint16_t > > getFedBadChannelList(DQMStore *dqmStore, const MonitorElement *me) const
double getEntries() const
get # of entries
void cd()
go to top directory (ie. root)
float getProcessedEvents(DQMStore *dqmStore) const
std::pair< ContainerIterator, ContainerIterator > Range
ReturnType produce(const SiStripBadModuleFedErrRcd &)
Kind kind() const
Get the type of the monitor element.