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 &)
 
const std::string & 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 () noexcept(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

◆ DQMStore

Definition at line 41 of file DQWorker.h.

◆ MonitorElement

Definition at line 42 of file DQWorker.h.

Constructor & Destructor Documentation

◆ DQWorker()

ecaldqm::DQWorker::DQWorker ( )

Definition at line 13 of file DQWorker.cc.

14  : name_(""), MEs_(), booked_(false), timestamp_(), verbosity_(0), onlineMode_(false), willConvertToEDM_(true) {}

◆ ~DQWorker()

ecaldqm::DQWorker::~DQWorker ( )
virtualnoexcept

Definition at line 16 of file DQWorker.cc.

16 {}

Member Function Documentation

◆ beginLuminosityBlock()

virtual void ecaldqm::DQWorker::beginLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinevirtual

◆ beginRun()

virtual void ecaldqm::DQWorker::beginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinevirtual

◆ bookMEs()

void ecaldqm::DQWorker::bookMEs ( DQMStore::IBooker _booker)
virtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 66 of file DQWorker.cc.

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  }

References booked_, and MEs_.

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

◆ endLuminosityBlock()

virtual void ecaldqm::DQWorker::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinevirtual

◆ endRun()

virtual void ecaldqm::DQWorker::endRun ( edm::Run const &  ,
edm::EventSetup const &   
)
inlinevirtual

Definition at line 58 of file DQWorker.h.

58 {}

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

◆ fillDescriptions()

void ecaldqm::DQWorker::fillDescriptions ( edm::ParameterSetDescription _desc)
static

Definition at line 19 of file DQWorker.cc.

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  }

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

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

◆ getName()

const std::string& ecaldqm::DQWorker::getName ( ) const
inline

◆ initialize()

void ecaldqm::DQWorker::initialize ( std::string const &  _name,
edm::ParameterSet const &  _commonParams 
)
protected

Definition at line 35 of file DQWorker.cc.

35  {
36  name_ = _name;
37  onlineMode_ = _commonParams.getUntrackedParameter<bool>("onlineMode");
38  willConvertToEDM_ = _commonParams.getUntrackedParameter<bool>("willConvertToEDM");
39  }

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

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

◆ onlineMode()

bool ecaldqm::DQWorker::onlineMode ( ) const
inline

◆ print_()

void ecaldqm::DQWorker::print_ ( std::string const &  _message,
int  _threshold = 0 
) const
protected

Definition at line 74 of file DQWorker.cc.

74  {
75  if (verbosity_ > _threshold)
76  edm::LogInfo("EcalDQM") << name_ << ": " << _message;
77  }

References name_, and verbosity_.

◆ releaseMEs()

void ecaldqm::DQWorker::releaseMEs ( )
virtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 60 of file DQWorker.cc.

60  {
61  for (MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr)
62  mItr->second->clear();
63  booked_ = false;
64  }

References booked_, and MEs_.

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

◆ setEventNumber()

void ecaldqm::DQWorker::setEventNumber ( edm::EventNumber_t  _e)
inline

Definition at line 69 of file DQWorker.h.

69 { timestamp_.iEvt = _e; }

References ecaldqm::DQWorker::Timestamp::iEvt, and timestamp_.

Referenced by EcalDQMonitorTask::analyze().

◆ setLumiNumber()

void ecaldqm::DQWorker::setLumiNumber ( edm::LuminosityBlockNumber_t  _l)
inline

◆ setME()

void ecaldqm::DQWorker::setME ( edm::ParameterSet const &  _meParams)
protectedvirtual

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

Definition at line 41 of file DQWorker.cc.

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  }

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().

◆ setParams()

virtual void ecaldqm::DQWorker::setParams ( edm::ParameterSet const &  )
inlineprotectedvirtual

◆ setRunNumber()

void ecaldqm::DQWorker::setRunNumber ( edm::RunNumber_t  _r)
inline

◆ setSource()

virtual void ecaldqm::DQWorker::setSource ( edm::ParameterSet const &  )
inlineprotectedvirtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 48 of file DQWorker.h.

48 {} // for clients

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

◆ setTime()

void ecaldqm::DQWorker::setTime ( time_t  _t)
inline

◆ setVerbosity()

void ecaldqm::DQWorker::setVerbosity ( int  _verbosity)
inlineprotected

Definition at line 44 of file DQWorker.h.

44 { verbosity_ = _verbosity; }

References verbosity_.

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

Friends And Related Function Documentation

◆ WorkerFactoryStore

friend class WorkerFactoryStore
friend

Definition at line 29 of file DQWorker.h.

Member Data Documentation

◆ booked_

bool ecaldqm::DQWorker::booked_
protected

Definition at line 79 of file DQWorker.h.

Referenced by bookMEs(), and releaseMEs().

◆ MEs_

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::TrigPrimClient::producePlots(), ecaldqm::PedestalClient::producePlots(), ecaldqm::LedClient::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::PedestalTask::runOnPnDigis(), ecaldqm::PNDiodeTask::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::TrigPrimClient::setParams(), ecaldqm::TowerStatusTask::setParams(), ecaldqm::PedestalTask::setParams(), ecaldqm::RecoSummaryTask::setParams(), ecaldqm::TestPulseTask::setParams(), ecaldqm::LedTask::setParams(), ecaldqm::LaserTask::setParams(), ecaldqm::TrigPrimTask::setParams(), and ecaldqm::ClusterTask::setParams().

◆ name_

std::string ecaldqm::DQWorker::name_
protected

◆ onlineMode_

bool ecaldqm::DQWorker::onlineMode_
protected

◆ timestamp_

Timestamp ecaldqm::DQWorker::timestamp_
protected

◆ verbosity_

int ecaldqm::DQWorker::verbosity_
protected

◆ willConvertToEDM_

bool ecaldqm::DQWorker::willConvertToEDM_
protected

Definition at line 86 of file DQWorker.h.

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

ecaldqm::DQWorker::name_
std::string name_
Definition: DQWorker.h:77
edm::ParameterWildcard
Definition: ParameterWildcard.h:23
ecaldqm::fillMESetDescriptions
void fillMESetDescriptions(edm::ParameterSetDescription &)
Definition: MESetUtils.cc:144
CalibrationSummaryClient_cfi.params
params
Definition: CalibrationSummaryClient_cfi.py:14
edm::LogInfo
Definition: MessageLogger.h:254
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ecaldqm::DQWorker::booked_
bool booked_
Definition: DQWorker.h:79
ecaldqm::DQWorker::MEs_
MESetCollection MEs_
Definition: DQWorker.h:78
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::DQWorker::onlineMode_
bool onlineMode_
Definition: DQWorker.h:85
cppFunctionSkipper.exception
exception
Definition: cppFunctionSkipper.py:10
EcalCalibMonitorClient_cfi.workerParameters
workerParameters
Definition: EcalCalibMonitorClient_cfi.py:28
edm::ParameterSetDescription::addUntracked
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:100
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
ecaldqm::DQWorker::Timestamp::iRun
edm::RunNumber_t iRun
Definition: DQWorker.h:34
ecaldqm::DQWorker::willConvertToEDM_
bool willConvertToEDM_
Definition: DQWorker.h:86
ecaldqm::DQWorker::Timestamp::iLumi
edm::LuminosityBlockNumber_t iLumi
Definition: DQWorker.h:35
ecaldqm::createMESet
MESet * createMESet(edm::ParameterSet const &)
Definition: MESetUtils.cc:18
ecaldqm::DQWorker::timestamp_
Timestamp timestamp_
Definition: DQWorker.h:81
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
ecaldqm::DQWorker::verbosity_
int verbosity_
Definition: DQWorker.h:82
ecaldqm::DQWorker::Timestamp::iEvt
edm::EventNumber_t iEvt
Definition: DQWorker.h:36
edm::RequireZeroOrMore
Definition: ParameterWildcardBase.h:17
ecaldqm::DQWorker::Timestamp::now
time_t now
Definition: DQWorker.h:33