CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Friends
ecaldqm::DQWorker Class Reference

#include <DQWorker.h>

Inheritance diagram for ecaldqm::DQWorker:
ecaldqm::DQWorkerClient ecaldqm::DQWorkerTask EcalMEFormatter ecaldqm::CalibrationSummaryClient ecaldqm::CertificationClient ecaldqm::IntegrityClient ecaldqm::LaserClient ecaldqm::LedClient ecaldqm::OccupancyClient ecaldqm::PedestalClient ecaldqm::PNIntegrityClient ecaldqm::PresampleClient ecaldqm::RawDataClient ecaldqm::SelectiveReadoutClient ecaldqm::SummaryClient ecaldqm::TestPulseClient ecaldqm::TimingClient ecaldqm::TowerStatusTask ecaldqm::TrigPrimClient ecaldqm::ClusterTask ecaldqm::EnergyTask ecaldqm::IntegrityTask ecaldqm::LaserTask ecaldqm::LedTask ecaldqm::OccupancyTask ecaldqm::PedestalTask ecaldqm::PNDiodeTask ecaldqm::PresampleTask ecaldqm::RawDataTask ecaldqm::RecoSummaryTask ecaldqm::SelectiveReadoutTask ecaldqm::TestPulseTask ecaldqm::TimingTask ecaldqm::TrigPrimTask

Classes

struct  Timestamp
 

Public Member Functions

virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
std::string const & getName () const
 
bool onlineMode () const
 
virtual void releaseMEs ()
 
void setEventNumber (edm::EventNumber_t _e)
 
void setLumiNumber (edm::LuminosityBlockNumber_t _l)
 
void setRunNumber (edm::RunNumber_t _r)
 
void setTime (time_t _t)
 
virtual ~DQWorker ()(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &_desc)
 

Protected Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 

Protected Member Functions

void initialize (std::string const &_name, edm::ParameterSet const &)
 
void print_ (std::string const &, int=0) const
 
virtual void setME (edm::ParameterSet const &)
 
virtual void setParams (edm::ParameterSet const &)
 
virtual void setSource (edm::ParameterSet const &)
 
void setVerbosity (int _verbosity)
 

Protected Attributes

bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Friends

class WorkerFactoryStore
 

Detailed Description

Definition at line 28 of file DQWorker.h.

Member Typedef Documentation

Definition at line 41 of file DQWorker.h.

Definition at line 42 of file DQWorker.h.

Constructor & Destructor Documentation

ecaldqm::DQWorker::DQWorker ( )

Definition at line 13 of file DQWorker.cc.

14  : name_(""), MEs_(), booked_(false), timestamp_(), verbosity_(0), onlineMode_(false), willConvertToEDM_(true) {}
bool willConvertToEDM_
Definition: DQWorker.h:86
Timestamp timestamp_
Definition: DQWorker.h:81
MESetCollection MEs_
Definition: DQWorker.h:78
std::string name_
Definition: DQWorker.h:77
ecaldqm::DQWorker::~DQWorker ( )
virtual

Definition at line 16 of file DQWorker.cc.

16 {}

Member Function Documentation

virtual void ecaldqm::DQWorker::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinevirtual
virtual void ecaldqm::DQWorker::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinevirtual
void ecaldqm::DQWorker::bookMEs ( DQMStore::IBooker _booker)
virtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 66 of file DQWorker.cc.

References booked_, and MEs_.

Referenced by EcalDQMonitorTask::bookHistograms(), ecaldqm::DQWorkerClient::bookMEs(), and EcalDQMonitorClient::dqmEndJob().

66  {
67  if (booked_)
68  return;
69  for (MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr)
70  mItr->second->book(_booker);
71  booked_ = true;
72  }
MESetCollection MEs_
Definition: DQWorker.h:78
virtual void ecaldqm::DQWorker::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinevirtual
virtual void ecaldqm::DQWorker::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinevirtual

Definition at line 58 of file DQWorker.h.

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

58 {}
void ecaldqm::DQWorker::fillDescriptions ( edm::ParameterSetDescription _desc)
static

Definition at line 19 of file DQWorker.cc.

References edm::ParameterSetDescription::addUntracked(), ecaldqm::fillMESetDescriptions(), edm::RequireZeroOrMore, edm::ParameterSetDescription::setUnknown(), and EcalCalibMonitorClient_cfi::workerParameters.

Referenced by EcalMEFormatter::fillDescriptions(), ecaldqm::DQWorkerClient::fillDescriptions(), and ecaldqm::DQWorkerTask::fillDescriptions().

19  {
20  _desc.addUntracked<bool>("onlineMode", false);
21  _desc.addUntracked<bool>("willConvertToEDM", true);
22 
23  edm::ParameterSetDescription meParameters;
24  edm::ParameterSetDescription meNodeParameters;
25  fillMESetDescriptions(meNodeParameters);
26  meParameters.addNode(
28  _desc.addUntracked("MEs", meParameters);
29 
31  workerParameters.setUnknown();
32  _desc.addUntracked("params", workerParameters);
33  }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void fillMESetDescriptions(edm::ParameterSetDescription &)
Definition: MESetUtils.cc:144
std::string const& ecaldqm::DQWorker::getName ( ) const
inline
void ecaldqm::DQWorker::initialize ( std::string const &  _name,
edm::ParameterSet const &  _commonParams 
)
protected

Definition at line 35 of file DQWorker.cc.

References edm::ParameterSet::getUntrackedParameter(), name_, onlineMode_, and willConvertToEDM_.

Referenced by EcalMEFormatter::EcalMEFormatter(), and ecaldqm::WorkerFactoryStore::getWorker().

35  {
36  name_ = _name;
37  onlineMode_ = _commonParams.getUntrackedParameter<bool>("onlineMode");
38  willConvertToEDM_ = _commonParams.getUntrackedParameter<bool>("willConvertToEDM");
39  }
bool willConvertToEDM_
Definition: DQWorker.h:86
std::string name_
Definition: DQWorker.h:77
bool ecaldqm::DQWorker::onlineMode ( ) const
inline
void ecaldqm::DQWorker::print_ ( std::string const &  _message,
int  _threshold = 0 
) const
protected

Definition at line 74 of file DQWorker.cc.

References name_, and verbosity_.

74  {
75  if (verbosity_ > _threshold)
76  edm::LogInfo("EcalDQM") << name_ << ": " << _message;
77  }
std::string name_
Definition: DQWorker.h:77
void ecaldqm::DQWorker::releaseMEs ( )
virtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 60 of file DQWorker.cc.

References booked_, and MEs_.

Referenced by EcalDQMonitorClient::dqmEndJob(), EcalDQMonitorTask::dqmEndRun(), and ecaldqm::DQWorkerClient::releaseMEs().

60  {
61  for (MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr)
62  mItr->second->clear();
63  booked_ = false;
64  }
MESetCollection MEs_
Definition: DQWorker.h:78
void ecaldqm::DQWorker::setEventNumber ( edm::EventNumber_t  _e)
inline

Definition at line 69 of file DQWorker.h.

Referenced by EcalDQMonitorTask::analyze().

69 { timestamp_.iEvt = _e; }
Timestamp timestamp_
Definition: DQWorker.h:81
edm::EventNumber_t iEvt
Definition: DQWorker.h:36
void ecaldqm::DQWorker::setLumiNumber ( edm::LuminosityBlockNumber_t  _l)
inline

Definition at line 68 of file DQWorker.h.

Referenced by ecaldqm::EcalDQMonitor::ecaldqmBeginLuminosityBlock(), and ecaldqm::EcalDQMonitor::ecaldqmEndLuminosityBlock().

68 { timestamp_.iLumi = _l; }
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:35
Timestamp timestamp_
Definition: DQWorker.h:81
void ecaldqm::DQWorker::setME ( edm::ParameterSet const &  _meParams)
protectedvirtual

Reimplemented in ecaldqm::DQWorkerTask, and ecaldqm::DQWorkerClient.

Definition at line 41 of file DQWorker.cc.

References ecaldqm::createMESet(), cppFunctionSkipper::exception, edm::ParameterSet::getParameterNames(), edm::ParameterSet::getUntrackedParameterSet(), MEs_, Skims_PA_cff::name, onlineMode_, CalibrationSummaryClient_cfi::params, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalMEFormatter::EcalMEFormatter(), ecaldqm::WorkerFactoryStore::getWorker(), ecaldqm::DQWorkerClient::setME(), and ecaldqm::DQWorkerTask::setME().

41  {
42  std::vector<std::string> const &MENames(_meParams.getParameterNames());
43 
44  for (unsigned iME(0); iME != MENames.size(); iME++) {
45  std::string name(MENames[iME]);
46  edm::ParameterSet const &params(_meParams.getUntrackedParameterSet(name));
47 
48  if (!onlineMode_ && params.getUntrackedParameter<bool>("online"))
49  continue;
50 
51  try {
52  MEs_.insert(name, createMESet(params));
53  } catch (std::exception &) {
54  edm::LogError("EcalDQM") << "Exception caught while constructing MESet " << name;
55  throw;
56  }
57  }
58  }
MESetCollection MEs_
Definition: DQWorker.h:78
MESet * createMESet(edm::ParameterSet const &)
Definition: MESetUtils.cc:18
virtual void ecaldqm::DQWorker::setParams ( edm::ParameterSet const &  )
inlineprotectedvirtual
void ecaldqm::DQWorker::setRunNumber ( edm::RunNumber_t  _r)
inline

Definition at line 67 of file DQWorker.h.

Referenced by ecaldqm::EcalDQMonitor::ecaldqmBeginRun(), and ecaldqm::EcalDQMonitor::ecaldqmEndRun().

67 { timestamp_.iRun = _r; }
edm::RunNumber_t iRun
Definition: DQWorker.h:34
Timestamp timestamp_
Definition: DQWorker.h:81
virtual void ecaldqm::DQWorker::setSource ( edm::ParameterSet const &  )
inlineprotectedvirtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 48 of file DQWorker.h.

Referenced by ecaldqm::WorkerFactoryStore::getWorker().

48 {} // for clients
void ecaldqm::DQWorker::setTime ( time_t  _t)
inline
void ecaldqm::DQWorker::setVerbosity ( int  _verbosity)
inlineprotected

Definition at line 44 of file DQWorker.h.

References initialize(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ecaldqm::WorkerFactoryStore::getWorker().

44 { verbosity_ = _verbosity; }

Friends And Related Function Documentation

friend class WorkerFactoryStore
friend

Definition at line 29 of file DQWorker.h.

Member Data Documentation

bool ecaldqm::DQWorker::booked_
protected

Definition at line 79 of file DQWorker.h.

Referenced by bookMEs(), and releaseMEs().

MESetCollection ecaldqm::DQWorker::MEs_
protected

Definition at line 78 of file DQWorker.h.

Referenced by ecaldqm::TrigPrimTask::beginEvent(), ecaldqm::ClusterTask::beginEvent(), ecaldqm::EnergyTask::beginLuminosityBlock(), ecaldqm::IntegrityTask::beginLuminosityBlock(), ecaldqm::OccupancyTask::beginLuminosityBlock(), ecaldqm::RawDataTask::beginLuminosityBlock(), ecaldqm::TimingTask::beginLuminosityBlock(), ecaldqm::PresampleTask::beginLuminosityBlock(), ecaldqm::TrigPrimTask::beginLuminosityBlock(), bookMEs(), EcalMEFormatter::format_(), ecaldqm::PresampleClient::producePlots(), ecaldqm::TestPulseClient::producePlots(), ecaldqm::LaserClient::producePlots(), ecaldqm::LedClient::producePlots(), ecaldqm::TrigPrimClient::producePlots(), ecaldqm::PedestalClient::producePlots(), ecaldqm::PNIntegrityClient::producePlots(), ecaldqm::RawDataClient::producePlots(), ecaldqm::SelectiveReadoutClient::producePlots(), ecaldqm::TimingClient::producePlots(), ecaldqm::CalibrationSummaryClient::producePlots(), ecaldqm::CertificationClient::producePlots(), ecaldqm::OccupancyClient::producePlots(), ecaldqm::SummaryClient::producePlots(), ecaldqm::IntegrityClient::producePlots(), ecaldqm::TowerStatusTask::producePlotsTask_(), releaseMEs(), ecaldqm::SummaryClient::resetMEs(), ecaldqm::DQWorkerClient::resetMEs(), ecaldqm::DQWorkerClient::resetPerLumi(), ecaldqm::RecoSummaryTask::runOnBasicClusters(), ecaldqm::ClusterTask::runOnBasicClusters(), ecaldqm::IntegrityTask::runOnDetIdCollection(), ecaldqm::PresampleTask::runOnDigis(), ecaldqm::PedestalTask::runOnDigis(), ecaldqm::OccupancyTask::runOnDigis(), ecaldqm::TestPulseTask::runOnDigis(), ecaldqm::LedTask::runOnDigis(), ecaldqm::LaserTask::runOnDigis(), ecaldqm::SelectiveReadoutTask::runOnDigis(), ecaldqm::IntegrityTask::runOnElectronicsIdCollection(), ecaldqm::TrigPrimTask::runOnEmulTPs(), ecaldqm::PNDiodeTask::runOnErrors(), ecaldqm::PNDiodeTask::runOnPnDigis(), ecaldqm::PedestalTask::runOnPnDigis(), ecaldqm::TestPulseTask::runOnPnDigis(), ecaldqm::LedTask::runOnPnDigis(), ecaldqm::LaserTask::runOnPnDigis(), ecaldqm::OccupancyTask::runOnRawData(), ecaldqm::RawDataTask::runOnRawData(), ecaldqm::LaserTask::runOnRawData(), ecaldqm::LedTask::runOnRawData(), ecaldqm::TrigPrimTask::runOnRealTPs(), ecaldqm::TimingTask::runOnRecHits(), ecaldqm::EnergyTask::runOnRecHits(), ecaldqm::RecoSummaryTask::runOnRecHits(), ecaldqm::OccupancyTask::runOnRecHits(), ecaldqm::RecoSummaryTask::runOnReducedRecHits(), ecaldqm::RawDataTask::runOnSource(), ecaldqm::SelectiveReadoutTask::runOnSource(), ecaldqm::SelectiveReadoutTask::runOnSrFlags(), ecaldqm::ClusterTask::runOnSuperClusters(), ecaldqm::OccupancyTask::runOnTPDigis(), ecaldqm::TimingTask::runOnUncalibRecHits(), ecaldqm::TestPulseTask::runOnUncalibRecHits(), ecaldqm::LedTask::runOnUncalibRecHits(), ecaldqm::LaserTask::runOnUncalibRecHits(), ecaldqm::DQWorkerClient::setME(), setME(), ecaldqm::DQWorkerTask::setME(), ecaldqm::TowerStatusTask::setParams(), ecaldqm::PedestalTask::setParams(), ecaldqm::TestPulseTask::setParams(), ecaldqm::LedTask::setParams(), ecaldqm::LaserTask::setParams(), ecaldqm::TrigPrimTask::setParams(), and ecaldqm::ClusterTask::setParams().

std::string ecaldqm::DQWorker::name_
protected
bool ecaldqm::DQWorker::onlineMode_
protected
Timestamp ecaldqm::DQWorker::timestamp_
protected
int ecaldqm::DQWorker::verbosity_
protected
bool ecaldqm::DQWorker::willConvertToEDM_
protected

Definition at line 86 of file DQWorker.h.

Referenced by initialize(), and ecaldqm::DQWorkerTask::setME().