74 std::vector<edm::ESGetToken<SiStripQuality, SiStripQualityRcd>>
_ssqTokens;
96 : m_rhm(consumesCollector()),
98 _mode(iConfig.getUntrackedParameter<unsigned
int>(
"granularityMode",
Module)),
99 m_run(iConfig.getParameter<
bool>(
"runProcess")),
100 m_maxLS(iConfig.getUntrackedParameter<unsigned
int>(
"maxLSBeforeRebin", 100)),
101 m_LSfrac(iConfig.getUntrackedParameter<unsigned
int>(
"startingLSFraction", 4)),
120 sprintf(hrunname,
"badmodrun_%s",
name.c_str());
122 sprintf(hruntitle,
"Number of bad modules %s",
name.c_str());
140 for (std::size_t iMon = 0; iMon !=
_monitoredssq.size(); ++iMon) {
144 std::vector<SiStripQuality::BadComponent> bads = ssq.getBadComponentList();
146 LogDebug(
"BadComponents") << bads.size() <<
" bad components found";
151 for (
const auto& bc : bads) {
156 for (
int fiber = 1; fiber < 5; fiber *= 2) {
157 if ((bc.BadFibers & fiber) > 0)
161 for (
int apv = 1; apv < 33; apv *= 2) {
162 if ((bc.BadApvs & apv) > 0)
171 nbad += ssq.decode(*data).range;
185 for (std::size_t iMon = 0; iMon !=
_monitoredssq.size(); ++iMon) {
199 std::vector<SiStripQuality::BadComponent> bads = ssq.getBadComponentList();
201 LogDebug(
"BadComponents") << bads.size() <<
" bad components found";
206 for (
const auto& bc : bads) {
211 for (
int fiber = 1; fiber < 5; fiber *= 2) {
212 if ((bc.BadFibers & fiber) > 0)
216 for (
int apv = 1; apv < 33; apv *= 2) {
217 if ((bc.BadApvs & apv) > 0)
226 nbad += ssq.decode(*data).range;
232 sprintf(runname,
"%d", iRun.
run());
233 LogDebug(
"AnalyzedRun") <<
name <<
" " << runname <<
" " << nbad;
static const std::string kSharedResource
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 &)
void endRun(const edm::Run &, const edm::EventSetup &) override
~SiStripQualityHistory() override
std::map< std::string, TProfile ** > m_badmodrun
const std::vector< edm::ParameterSet > _monitoredssq
void Fill(HcalDetId &id, double val, std::vector< TH2F > &depth)
TProfile ** makeTProfile(const char *name, const char *title, const unsigned int nbinx, const double xmin, const double xmax)
bool getData(T &iHolder) const
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]
T * make(const Args &...args) const
make new ROOT object
RunHistogramManager m_rhm
std::map< std::string, TH1F * > _history