CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Attributes
ecaldqm::WorkerFactoryStore Class Reference

#include <DQWorker.h>

Classes

struct  Registration
 

Public Member Functions

DQWorkergetWorker (std::string const &, int, edm::ParameterSet const &, edm::ParameterSet const &) const
 
void registerFactory (std::string const &_name, WorkerFactory _f)
 

Static Public Member Functions

static WorkerFactoryStoresingleton ()
 

Private Attributes

tbb::concurrent_unordered_map< std::string, WorkerFactoryworkerFactories_
 

Detailed Description

Definition at line 89 of file DQWorker.h.

Member Function Documentation

DQWorker * ecaldqm::WorkerFactoryStore::getWorker ( std::string const &  _name,
int  _verbosity,
edm::ParameterSet const &  _commonParams,
edm::ParameterSet const &  _workerParams 
) const

Definition at line 79 of file DQWorker.cc.

References edm::ParameterSet::existsAs(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::DQWorker::initialize(), ecaldqm::DQWorker::setME(), ecaldqm::DQWorker::setParams(), ecaldqm::DQWorker::setSource(), and ecaldqm::DQWorker::setVerbosity().

82  {
83  DQWorker *worker(workerFactories_.at(_name)());
84  worker->setVerbosity(_verbosity);
85  worker->initialize(_name, _commonParams);
86  worker->setME(_workerParams.getUntrackedParameterSet("MEs"));
87  if (_workerParams.existsAs<edm::ParameterSet>("sources", false))
88  worker->setSource(_workerParams.getUntrackedParameterSet("sources"));
89  if (_workerParams.existsAs<edm::ParameterSet>("params", false))
90  worker->setParams(_workerParams.getUntrackedParameterSet("params"));
91  return worker;
92  }
tbb::concurrent_unordered_map< std::string, WorkerFactory > workerFactories_
Definition: DQWorker.h:104
void ecaldqm::WorkerFactoryStore::registerFactory ( std::string const &  _name,
WorkerFactory  _f 
)
inline

Definition at line 98 of file DQWorker.h.

References boostedTaus_cff::singleton, and AlCaHLTBitMon_QueryRunRegistry::string.

98 { workerFactories_[_name] = _f; }
tbb::concurrent_unordered_map< std::string, WorkerFactory > workerFactories_
Definition: DQWorker.h:104
WorkerFactoryStore * ecaldqm::WorkerFactoryStore::singleton ( )
static

Definition at line 95 of file DQWorker.cc.

Referenced by ecaldqm::EcalDQMonitor::EcalDQMonitor().

95  {
96  static WorkerFactoryStore workerFactoryStore;
97  return &workerFactoryStore;
98  }

Member Data Documentation

tbb::concurrent_unordered_map<std::string, WorkerFactory> ecaldqm::WorkerFactoryStore::workerFactories_
private

Definition at line 104 of file DQWorker.h.