29 : castorDbServiceToken_{esConsumes<CastorDbService, CastorDbRecord>()} {
30 fVerbosity = ps.getUntrackedParameter<
int>(
"debug", 0);
31 subsystemname_ = ps.getUntrackedParameter<
std::string>(
"subSystemFolder",
"Castor");
32 inputTokenRaw_ = consumes<FEDRawDataCollection>(ps.getParameter<
edm::InputTag>(
"rawLabel"));
33 inputTokenReport_ = consumes<HcalUnpackerReport>(ps.getParameter<
edm::InputTag>(
"unpackerReportLabel"));
34 inputTokenDigi_ = consumes<CastorDigiCollection>(ps.getParameter<
edm::InputTag>(
"digiLabel"));
35 inputTokenRecHitCASTOR_ = consumes<CastorRecHitCollection>(ps.getParameter<
edm::InputTag>(
"CastorRecHitLabel"));
36 inputTokenCastorTowers_ = consumes<CastorTowerCollection>(ps.getParameter<
edm::InputTag>(
"CastorTowerLabel"));
37 JetAlgorithm = consumes<BasicJetCollection>(ps.getParameter<
edm::InputTag>(
"CastorBasicJetsLabel"));
38 tokenTriggerResults = consumes<edm::TriggerResults>(ps.getParameter<
edm::InputTag>(
"tagTriggerResults"));
40 showTiming_ = ps.getUntrackedParameter<
bool>(
"showTiming",
false);
42 if (ps.getUntrackedParameter<
bool>(
"DigiMonitor",
false))
43 DigiMon_ = std::make_unique<CastorDigiMonitor>(ps, consumesCollector());
45 if (ps.getUntrackedParameter<
bool>(
"RecHitMonitor",
false))
46 RecHitMon_ = std::make_unique<CastorRecHitMonitor>(ps);
48 if (ps.getUntrackedParameter<
bool>(
"LEDMonitor",
false))
49 LedMon_ = std::make_unique<CastorLEDMonitor>(ps);
58 LogPrint(
"CastorMonitorModule") <<
"dqmBeginRun(start)";
67 DigiMon_->bookHistograms(ibooker, iRun, iSetup);
73 LedMon_->bookHistograms(ibooker, iRun);
78 sprintf(
s,
"CastorEventProducts");
88 sprintf(
s,
"CASTORUnpackReport");
107 LogPrint(
"CastorMonitorModule") <<
"analyze (start)";
113 bool rechitOK_ =
true, towerOK_ =
true, jetsOK_ =
true;
124 float fedsUnpacked = 0.;
130 const std::vector<int>
feds = (*report).getFedsUnpacked();
143 nDigi = CastorDigi->
size();
150 nrecHits = CastorHits->
size();
157 nTowers = castorTowers->size();
169 LogPrint(
"CastorMonitorModule") <<
"CastorProductValid(size): RawDataValid=" <<
RawData.isValid()
170 <<
" Digi=" << digiOK_ <<
"(" << nDigi <<
") Hits=" << rechitOK_ <<
"(" << nrecHits
172 <<
" Towers=" << towerOK_ <<
"(" <<
nTowers <<
")" 173 <<
" Jets=" << jetsOK_ <<
"(" <<
nJets <<
")";
205 RecHitMon_->processEventTowers(*castorTowers);
210 LogPrint(
"CastorMonitorModule") <<
"processed " <<
ievt_ <<
" events";
edm::EDGetTokenT< edm::TriggerResults > tokenTriggerResults
std::unique_ptr< CastorLEDMonitor > LedMon_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
virtual void setCurrentFolder(std::string const &fullpath)
edm::EDGetTokenT< FEDRawDataCollection > inputTokenRaw_
static constexpr int nTowers
MonitorElement * hunpkrep
edm::ESGetToken< CastorDbService, CastorDbRecord > castorDbServiceToken_
static constexpr int nJets
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
edm::EDGetTokenT< CastorDigiCollection > inputTokenDigi_
edm::EDGetTokenT< CastorTowerCollection > inputTokenCastorTowers_
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
CastorMonitorModule(const edm::ParameterSet &ps)
std::unique_ptr< CastorDigiMonitor > DigiMon_
#define DEFINE_FWK_MODULE(type)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
Log< level::Warning, true > LogPrint
std::string subsystemname_
void analyze(const edm::Event &iEvent, const edm::EventSetup &) override
edm::EDGetTokenT< BasicJetCollection > JetAlgorithm
MonitorElement * CastorEventProduct
void bookHistograms(DQMStore::IBooker &, edm::Run const &, const edm::EventSetup &) override
void dqmEndRun(const edm::Run &run, const edm::EventSetup &) override
edm::EDGetTokenT< HcalUnpackerReport > inputTokenReport_
std::unique_ptr< CastorRecHitMonitor > RecHitMon_
UseScope< MonitorElementData::Scope::RUN > UseRunScope
edm::EDGetTokenT< CastorRecHitCollection > inputTokenRecHitCASTOR_
~CastorMonitorModule() override
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)