CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | 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 ()
 

Static Public Member Functions

static void fillDescriptions (edm::ParameterSetDescription &_desc)
 

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.

Constructor & Destructor Documentation

ecaldqm::DQWorker::DQWorker ( )

Definition at line 14 of file DQWorker.cc.

14  :
15  name_(""),
16  MEs_(),
17  booked_(false),
18  timestamp_(),
19  verbosity_(0),
20  onlineMode_(false),
21  willConvertToEDM_(true)
22  {
23  }
bool willConvertToEDM_
Definition: DQWorker.h:83
Timestamp timestamp_
Definition: DQWorker.h:78
MESetCollection MEs_
Definition: DQWorker.h:75
std::string name_
Definition: DQWorker.h:74
ecaldqm::DQWorker::~DQWorker ( )
virtual

Definition at line 25 of file DQWorker.cc.

26  {
27  }

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 85 of file DQWorker.cc.

References booked_, and MEs_.

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

86  {
87  if(booked_) return;
88  for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr)
89  mItr->second->book(_booker);
90  booked_ = true;
91  }
MESetCollection MEs_
Definition: DQWorker.h:75
virtual void ecaldqm::DQWorker::endLuminosityBlock ( edm::LuminosityBlock const &  ,
edm::EventSetup const &   
)
inlinevirtual

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

Definition at line 58 of file DQWorker.h.

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

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

Definition at line 55 of file DQWorker.h.

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

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

Definition at line 31 of file DQWorker.cc.

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

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

32  {
33  _desc.addUntracked<bool>("onlineMode", false);
34  _desc.addUntracked<bool>("willConvertToEDM", true);
35 
36  edm::ParameterSetDescription meParameters;
37  edm::ParameterSetDescription meNodeParameters;
38  fillMESetDescriptions(meNodeParameters);
39  meParameters.addNode(edm::ParameterWildcard<edm::ParameterSetDescription>("*", edm::RequireZeroOrMore, false, meNodeParameters));
40  _desc.addUntracked("MEs", meParameters);
41 
42  edm::ParameterSetDescription workerParameters;
43  workerParameters.setUnknown();
44  _desc.addUntracked("params", workerParameters);
45  }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
void fillMESetDescriptions(edm::ParameterSetDescription &)
Definition: MESetUtils.cc:129
std::string const& ecaldqm::DQWorker::getName ( ) const
inline

Definition at line 68 of file DQWorker.h.

References name_.

Referenced by EcalDQMonitorTask::analyze(), EcalDQMonitorClient::EcalDQMonitorClient(), and EcalDQMonitorTask::EcalDQMonitorTask().

68 { return name_; }
std::string name_
Definition: DQWorker.h:74
void ecaldqm::DQWorker::initialize ( std::string const &  _name,
edm::ParameterSet const &  _commonParams 
)
protected

Definition at line 48 of file DQWorker.cc.

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

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

49  {
50  name_ = _name;
51  onlineMode_ = _commonParams.getUntrackedParameter<bool>("onlineMode");
52  willConvertToEDM_ = _commonParams.getUntrackedParameter<bool>("willConvertToEDM");
53  }
bool willConvertToEDM_
Definition: DQWorker.h:83
std::string name_
Definition: DQWorker.h:74
bool ecaldqm::DQWorker::onlineMode ( ) const
inline
void ecaldqm::DQWorker::print_ ( std::string const &  _message,
int  _threshold = 0 
) const
protected

Definition at line 94 of file DQWorker.cc.

References name_, and verbosity_.

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

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 77 of file DQWorker.cc.

References booked_, and MEs_.

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

78  {
79  for(MESetCollection::iterator mItr(MEs_.begin()); mItr != MEs_.end(); ++mItr)
80  mItr->second->clear();
81  booked_ = false;
82  }
MESetCollection MEs_
Definition: DQWorker.h:75
void ecaldqm::DQWorker::setEventNumber ( edm::EventNumber_t  _e)
inline

Definition at line 66 of file DQWorker.h.

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

Referenced by EcalDQMonitorTask::analyze().

66 { timestamp_.iEvt = _e; }
Timestamp timestamp_
Definition: DQWorker.h:78
edm::EventNumber_t iEvt
Definition: DQWorker.h:36
void ecaldqm::DQWorker::setLumiNumber ( edm::LuminosityBlockNumber_t  _l)
inline
void ecaldqm::DQWorker::setME ( edm::ParameterSet const &  _meParams)
protectedvirtual

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

Definition at line 56 of file DQWorker.cc.

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

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

57  {
58  std::vector<std::string> const& MENames(_meParams.getParameterNames());
59 
60  for(unsigned iME(0); iME != MENames.size(); iME++){
61  std::string name(MENames[iME]);
62  edm::ParameterSet const& params(_meParams.getUntrackedParameterSet(name));
63 
64  if(!onlineMode_ && params.getUntrackedParameter<bool>("online")) continue;
65 
66  try{
67  MEs_.insert(name, createMESet(params));
68  }
69  catch(std::exception&){
70  edm::LogError("EcalDQM") << "Exception caught while constructing MESet " << name;
71  throw;
72  }
73  }
74  }
MESetCollection MEs_
Definition: DQWorker.h:75
MESet * createMESet(edm::ParameterSet const &)
Definition: MESetUtils.cc:19
virtual void ecaldqm::DQWorker::setParams ( edm::ParameterSet const &  )
inlineprotectedvirtual
void ecaldqm::DQWorker::setRunNumber ( edm::RunNumber_t  _r)
inline
virtual void ecaldqm::DQWorker::setSource ( edm::ParameterSet const &  )
inlineprotectedvirtual

Reimplemented in ecaldqm::DQWorkerClient.

Definition at line 45 of file DQWorker.h.

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

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

Definition at line 41 of file DQWorker.h.

References verbosity_.

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

41 { 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 76 of file DQWorker.h.

Referenced by bookMEs(), and releaseMEs().

MESetCollection ecaldqm::DQWorker::MEs_
protected

Definition at line 75 of file DQWorker.h.

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

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 83 of file DQWorker.h.

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