73 std::vector<edm::ESGetToken<SiStripQuality, SiStripQualityRcd>>
_ssqTokens;
95 :
m_rhm(consumesCollector()),
96 _monitoredssq(iConfig.getParameter<std::
vector<edm::
ParameterSet>>(
"monitoredSiStripQuality")),
97 _mode(iConfig.getUntrackedParameter<unsigned int>(
"granularityMode", Module)),
98 m_run(iConfig.getParameter<bool>(
"runProcess")),
99 m_maxLS(iConfig.getUntrackedParameter<unsigned int>(
"maxLSBeforeRebin", 100)),
100 m_LSfrac(iConfig.getUntrackedParameter<unsigned int>(
"startingLSFraction", 4)),
118 sprintf(hrunname,
"badmodrun_%s", name.c_str());
120 sprintf(hruntitle,
"Number of bad modules %s", name.c_str());
138 for (std::size_t iMon = 0; iMon != _monitoredssq.size(); ++iMon) {
142 std::vector<SiStripQuality::BadComponent> bads = ssq.getBadComponentList();
144 LogDebug(
"BadComponents") << bads.size() <<
" bad components found";
149 for (
const auto& bc : bads) {
154 for (
int fiber = 1; fiber < 5; fiber *= 2) {
155 if ((bc.BadFibers & fiber) > 0)
159 for (
int apv = 1; apv < 33; apv *= 2) {
160 if ((bc.BadApvs & apv) > 0)
169 nbad += ssq.decode(*data).range;
183 for (std::size_t iMon = 0; iMon != _monitoredssq.size(); ++iMon) {
197 std::vector<SiStripQuality::BadComponent> bads = ssq.getBadComponentList();
199 LogDebug(
"BadComponents") << bads.size() <<
" bad components found";
204 for (
const auto& bc : bads) {
209 for (
int fiber = 1; fiber < 5; fiber *= 2) {
210 if ((bc.BadFibers & fiber) > 0)
214 for (
int apv = 1; apv < 33; apv *= 2) {
215 if ((bc.BadApvs & apv) > 0)
224 nbad += ssq.decode(*data).range;
230 sprintf(runname,
"%d", iRun.
run());
231 LogDebug(
"AnalyzedRun") << name <<
" " << runname <<
" " << nbad;
void analyze(const edm::Event &, const edm::EventSetup &) override
#define DEFINE_FWK_MODULE(type)
std::vector< unsigned int >::const_iterator ContainerIterator
SiStripQualityHistory(const edm::ParameterSet &)
T * make(const Args &...args) const
make new ROOT object
~SiStripQualityHistory() override
std::map< std::string, TProfile ** > m_badmodrun
bool getData(T &iHolder) const
const std::vector< edm::ParameterSet > _monitoredssq
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
m_rhm(consumesCollector())
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
std::vector< edm::ESGetToken< SiStripQuality, SiStripQualityRcd > > _ssqTokens
const unsigned int m_LSfrac
void beginRun(const edm::Run &iRun)
const unsigned int m_maxLS
void beginRun(const edm::Run &, const edm::EventSetup &) override
char data[epos_bytes_allocation]
RunHistogramManager m_rhm
std::map< std::string, TH1F * > _history