31 skipCollections_(_ps.getUntrackedParameter<
std::
vector<
std::
string>>(
"skipCollections")),
32 allowMissingCollections_(_ps.getUntrackedParameter<
bool>(
"allowMissingCollections")),
35 resetInterval_(_ps.getUntrackedParameter<double>(
"resetInterval")) {
37 std::bitset<ecaldqm::nCollections> hasTaskToRun;
44 throw cms::Exception(
"InvalidConfiguration") <<
"Non-task DQWorker " << worker->
getName() <<
" passed";
49 hasTaskToRun.set(iCol);
52 task->setTokens(collector);
59 if (hasTaskToRun[iCol])
70 for (
unsigned iCol(0); iCol <
schedule_.size(); iCol++)
76 if (commonParams.getUntrackedParameter<
bool>(
"onlineMode"))
90 desc.addUntracked(
"workerParameters", allWorkers);
96 desc.addUntracked<std::vector<std::string>>(
"skipCollections", std::vector<std::string>());
97 desc.addUntracked<
bool>(
"allowMissingCollections",
true);
98 desc.addUntracked<
double>(
"resetInterval", 0.);
105 "ecaldqmGetSetupObjects",
106 "Getting EventSetup Objects");
128 std::shared_ptr<ecaldqm::EcalLSCache> tmpCache = std::make_shared<ecaldqm::EcalLSCache>();
131 "globalBeginLuminosityBlock");
136 tmpCache->lhcStatusSet_ =
false;
161 std::set<ecaldqm::DQWorker*> enabledTasks;
163 bool eventTypeFiltering(
false);
168 edm::LogInfo(
"EcalDQM") <<
"EcalRawDataCollection is being skipped. No event-type filtering will be applied";
171 eventTypeFiltering =
true;
173 std::stringstream
ss;
181 ss << dcchItr->getRunType() <<
" ";
182 runType[dcchItr->id() - 1] = dcchItr->getRunType();
191 if (static_cast<ecaldqm::DQWorkerTask*>(worker)->filterRunType(
runType)) {
194 enabledTasks.insert(worker);
203 edm::LogWarning(
"EcalDQM") <<
"EcalRawDataCollection does not exist. No event-type filtering will be applied";
206 if (!eventTypeFiltering)
215 if (enabledTasks.find(worker) != enabledTasks.end()) {
219 bool ByLumiResetSwitch = (lumiCache->ByLumiPlotsResetSwitches).at(worker->
getName());
220 bool lhcStatusSet = lumiCache->lhcStatusSet_;
222 (lumiCache->ByLumiPlotsResetSwitches)[worker->
getName()] =
false;
223 lumiCache->lhcStatusSet_ = lhcStatusSet;
229 for (
unsigned iSch(0); iSch <
schedule_.size(); iSch++) {
237 if (enabledTasks.find(worker) != enabledTasks.end())
238 static_cast<ecaldqm::DQWorkerTask*>(worker)->endEvent(_evt, _es);
static void fillDescriptions(edm::ParameterSetDescription &)
std::shared_ptr< ecaldqm::EcalLSCache > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const override
void formSchedule(std::vector< ecaldqm::Collections > const &, edm::ParameterSet const &)
dispatcher processEvent(e, inputTag, standby)
std::string const & getName() const
void executeOnWorkers_(FuncOnWorker, std::string const &, std::string const &="", int=1) const
void ecaldqmEndRun(edm::Run const &, edm::EventSetup const &)
ParameterSet const & getParameterSet(std::string const &) const
std::vector< T >::const_iterator const_iterator
edm::EDGetToken collectionTokens_[ecaldqm::nCollections]
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
virtual void releaseMEs()
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static void fillDescriptions(edm::ParameterSetDescription &)
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
LuminosityBlockNumber_t luminosityBlock() const
U second(std::pair< T, U > const &p)
void analyze(edm::Event const &, edm::EventSetup const &) override
void setEventNumber(edm::EventNumber_t _e)
void addDefault(ParameterSetDescription const &psetDescription)
std::string const collectionName[nCollections]
void(EcalDQMonitorTask::* Processor)(edm::Event const &, ecaldqm::Collections, std::set< ecaldqm::DQWorker *> const &)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void ecaldqmBeginRun(edm::Run const &, edm::EventSetup const &)
#define DEFINE_FWK_MODULE(type)
void dqmEndRun(edm::Run const &, edm::EventSetup const &) override
const_iterator begin() const
LuminosityBlock const & getLuminosityBlock() const
virtual void bookMEs(DQMStore::IBooker &)
std::string const moduleName_
const_iterator end() const
void ecaldqmBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const
Log< level::Info, false > LogInfo
std::vector< std::pair< Processor, ecaldqm::Collections > > schedule_
static constexpr int nDCC
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
LuminosityBlockIndex index() const
void setTokens(edm::ConsumesCollector &)
void ecaldqmEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
EcalDQMonitorTask(edm::ParameterSet const &)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
void setSetupObjects(edm::EventSetup const &)
Log< level::Warning, false > LogWarning
static void fillDescriptions(edm::ConfigurationDescriptions &)
std::vector< std::string > skipCollections_
EventNumber_t event() const
void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override