1 #include "../interface/EcalDQMonitorTask.h"
3 #include "../interface/DQWorkerTask.h"
29 ecaldqm::EcalDQMonitor(_ps),
31 allowMissingCollections_(_ps.getUntrackedParameter<bool>(
"allowMissingCollections")),
33 evaluateTime_(_ps.getUntrackedParameter<bool>(
"evaluateTime")),
36 resetInterval_(_ps.getUntrackedParameter<double>(
"resetInterval"))
39 std::bitset<ecaldqm::nCollections> hasTaskToRun;
45 throw cms::Exception(
"InvalidConfiguration") <<
"Non-task DQWorker " << worker->
getName() <<
" passed";
50 hasTaskToRun.set(iCol);
61 if(hasTaskToRun[iCol])
71 ss <<
moduleName_ <<
": Using collections" << std::endl;
72 for(
unsigned iCol(0); iCol <
schedule_.size(); iCol++)
78 if(commonParams.getUntrackedParameter<
bool>(
"onlineMode"))
99 desc.
addUntracked<
bool>(
"allowMissingCollections",
true);
136 std::stringstream ss;
138 ss <<
"************** " <<
moduleName_ <<
" **************" << std::endl;
139 ss <<
" Mean time consumption of the modules" << std::endl;
140 ss <<
"____________________________________" << std::endl;
176 std::set<ecaldqm::DQWorker*> enabledTasks;
181 std::stringstream ss;
187 if(
verbosity_ > 2) ss << dcchItr->getRunType() <<
" ";
188 runType[dcchItr->id() - 1] = dcchItr->getRunType();
195 if(static_cast<ecaldqm::DQWorkerTask*>(worker)->filterRunType(runType)){
197 enabledTasks.insert(worker);
202 if(!processEvent)
return;
205 edm::LogWarning(
"EcalDQM") <<
"EcalRawDataCollection does not exist. No event-type filtering will be applied";
207 enabledTasks.insert(worker);
215 if(enabledTasks.find(worker) != enabledTasks.end()){
223 for(
unsigned iSch(0); iSch <
schedule_.size(); iSch++){
230 if(enabledTasks.find(worker) != enabledTasks.end())
231 static_cast<ecaldqm::DQWorkerTask*>(worker)->endEvent(_evt, _es);
EventNumber_t event() const
void endRun(edm::Run const &, edm::EventSetup const &) override
static void fillDescriptions(edm::ParameterSetDescription &)
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void formSchedule(std::vector< ecaldqm::Collections > const &, edm::ParameterSet const &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual bool analyze(void const *, Collections)
dispatcher processEvent(e, inputTag, standby)
#define DEFINE_FWK_MODULE(type)
void ecaldqmEndRun(edm::Run const &, edm::EventSetup const &)
std::vector< EcalDCCHeaderBlock >::const_iterator const_iterator
edm::EDGetToken collectionTokens_[ecaldqm::nCollections]
ParameterDescriptionNode * addNode(ParameterDescriptionNode const &node)
ParameterSet getUntrackedParameterSet(std::string const &name, ParameterSet const &defaultValue) const
void ecaldqmGetSetupObjects(edm::EventSetup const &)
static void fillDescriptions(edm::ParameterSetDescription &)
LuminosityBlockNumber_t luminosityBlock() const
ParameterWildcardBase * addWildcardUntracked(U const &pattern)
void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
U second(std::pair< T, U > const &p)
void analyze(edm::Event const &, edm::EventSetup const &) override
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
void setEventNumber(edm::EventNumber_t _e)
void addDefault(ParameterSetDescription const &psetDescription)
std::string const collectionName[nCollections]
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void ecaldqmBeginRun(edm::Run const &, edm::EventSetup const &)
void ecaldqmReleaseHistograms()
virtual void addDependencies(DependencySet &)
void(EcalDQMonitorTask::* Processor)(edm::Event const &, ecaldqm::Collections, std::set< ecaldqm::DQWorker * > const &)
std::string const moduleName_
void executeOnWorkers_(FuncOnWorker, std::string const &, std::string const &="", int=1)
std::vector< Collections > formSequence() const
std::vector< std::pair< Processor, ecaldqm::Collections > > schedule_
std::map< ecaldqm::DQWorker *, double > taskTimes_
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
void ecaldqmBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
std::string const & getName() const
void ecaldqmBookHistograms(Booker &)
void ecaldqmEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &)
EcalDQMonitorTask(edm::ParameterSet const &)
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
virtual void setTokens(edm::ConsumesCollector &)
void push_back(Dependency const &_d)
static void fillDescriptions(edm::ConfigurationDescriptions &)