19 template <
typename CollectionClass>
22 std::set<ecaldqm::DQWorker*>
const& _enabledTasks) {
37 if (_enabledTasks.find(worker) != _enabledTasks.end())
38 static_cast<ecaldqm::DQWorkerTask*>(worker)->analyze(
collection, _col);
48 std::vector<ecaldqm::Collections> collectionsToSkip;
53 <<
moduleName_ <<
"::formSchedule: Collection name " << skipColName <<
" in skipCollections does not exist";
61 for (std::vector<ecaldqm::Collections>::const_iterator colItr(_preSchedule.begin()); colItr != _preSchedule.end();
63 std::pair<Processor, ecaldqm::Collections> sch;
67 auto skipItr =
std::find(collectionsToSkip.begin(), collectionsToSkip.end(), *colItr);
68 if (skipItr != collectionsToSkip.end()) {
71 <<
" and removing from schedule";
72 collectionsToSkip.erase(skipItr);
79 sch.first = &EcalDQMonitorTask::runOnCollection<FEDRawDataCollection>;
83 sch.first = &EcalDQMonitorTask::runOnCollection<EcalRawDataCollection>;
89 sch.first = &EcalDQMonitorTask::runOnCollection<EBDetIdCollection>;
95 sch.first = &EcalDQMonitorTask::runOnCollection<EEDetIdCollection>;
104 sch.first = &EcalDQMonitorTask::runOnCollection<EcalElectronicsIdCollection>;
108 sch.first = &EcalDQMonitorTask::runOnCollection<EBSrFlagCollection>;
112 sch.first = &EcalDQMonitorTask::runOnCollection<EESrFlagCollection>;
118 sch.first = &EcalDQMonitorTask::runOnCollection<EBDigiCollection>;
124 sch.first = &EcalDQMonitorTask::runOnCollection<EEDigiCollection>;
128 sch.first = &EcalDQMonitorTask::runOnCollection<EcalPnDiodeDigiCollection>;
133 sch.first = &EcalDQMonitorTask::runOnCollection<EcalTrigPrimDigiCollection>;
146 sch.first = &EcalDQMonitorTask::runOnCollection<EcalUncalibratedRecHitCollection>;
157 sch.first = &EcalDQMonitorTask::runOnCollection<EcalRecHitCollection>;
162 sch.first = &EcalDQMonitorTask::runOnCollection<edm::View<reco::CaloCluster> >;
167 sch.first = &EcalDQMonitorTask::runOnCollection<reco::SuperClusterCollection>;
170 throw cms::Exception(
"InvalidConfiguration") <<
"Undefined collection " << *colItr;
173 sch.second = *colItr;
177 for (
const auto& colNotSkipped : collectionsToSkip)
180 <<
" is not in the schedule but was listed to be skipped";
void formSchedule(std::vector< ecaldqm::Collections > const &, edm::ParameterSet const &)
void executeOnWorkers_(FuncOnWorker, std::string const &, std::string const &="", int=1) const
T const * product() const
edm::EDGetToken collectionTokens_[ecaldqm::nCollections]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
T getUntrackedParameter(std::string const &, T const &) const
std::string const collectionName[nCollections]
std::string const moduleName_
Log< level::Info, false > LogInfo
std::vector< std::pair< Processor, ecaldqm::Collections > > schedule_
bool allowMissingCollections_
void runOnCollection(edm::Event const &, ecaldqm::Collections, std::set< ecaldqm::DQWorker *> const &)
Log< level::Warning, false > LogWarning
std::vector< std::string > skipCollections_