CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Attributes
ecaldqm::DBWriterWorker Class Referenceabstract

#include <DBWriterWorkers.h>

Inheritance diagram for ecaldqm::DBWriterWorker:
ecaldqm::DQWorker ecaldqm::IntegrityWriter ecaldqm::LaserWriter ecaldqm::LedWriter ecaldqm::OccupancyWriter ecaldqm::PedestalWriter ecaldqm::PresampleWriter ecaldqm::SummaryWriter ecaldqm::TestPulseWriter ecaldqm::TimingWriter

Public Types

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

Public Member Functions

 DBWriterWorker (std::string const &, edm::ParameterSet const &)
 
std::string const & getName () const
 
bool isActive () const
 
void retrieveSource (DQMStore::IGetter &)
 
virtual bool run (EcalCondDBInterface *, MonRunIOV &)=0
 
bool runsOn (std::string const &_runType) const
 
void setVerbosity (int _v)
 
 ~DBWriterWorker () override
 
- Public Member Functions inherited from ecaldqm::DQWorker
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void beginRun (edm::Run const &, edm::EventSetup const &)
 
virtual void bookMEs (DQMStore::IBooker &)
 
bool checkElectronicsMap (bool=true)
 
bool checkGeometry (bool=true)
 
bool checkTopology (bool=true)
 
bool checkTrigTowerMap (bool=true)
 
 DQWorker ()
 
virtual void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void endRun (edm::Run const &, edm::EventSetup const &)
 
EcalDQMSetupObjects const getEcalDQMSetupObjects ()
 
EcalElectronicsMapping const * GetElectronicsMap ()
 
CaloGeometry const * GetGeometry ()
 
std::string const & getName () const
 
CaloTopology const * GetTopology ()
 
EcalTrigTowerConstituentsMap const * GetTrigTowerMap ()
 
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 setSetupObjects (edm::EventSetup const &)
 
void setSetupObjectsEndLumi (edm::EventSetup const &)
 
void setTime (time_t _t)
 
void setTokens (edm::ConsumesCollector &)
 
virtual ~DQWorker () noexcept(false)
 

Protected Attributes

bool active_
 
std::string const name_
 
std::set< std::string > runTypes_
 
MESetCollection source_
 
int verbosity_
 
- Protected Attributes inherited from ecaldqm::DQWorker
bool booked_
 
MESetCollection MEs_
 
std::string name_
 
bool onlineMode_
 
Timestamp timestamp_
 
int verbosity_
 
bool willConvertToEDM_
 

Additional Inherited Members

- Static Public Member Functions inherited from ecaldqm::DQWorker
static void fillDescriptions (edm::ParameterSetDescription &_desc)
 
- Public Attributes inherited from ecaldqm::DQWorker
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandle
 
edm::ESGetToken< EcalElectronicsMapping, EcalMappingRcdelecMapHandleEndLumi
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandle
 
edm::ESGetToken< CaloGeometry, CaloGeometryRecordgeomHandleEndLumi
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandle
 
edm::ESGetToken< CaloTopology, CaloTopologyRecordtopoHandleEndLumi
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandle
 
edm::ESGetToken< EcalTrigTowerConstituentsMap, IdealGeometryRecordttMapHandleEndLumi
 
- Protected Types inherited from ecaldqm::DQWorker
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Protected Member Functions inherited from ecaldqm::DQWorker
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)
 

Detailed Description

Definition at line 18 of file DBWriterWorkers.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 20 of file DBWriterWorkers.h.

◆ MonitorElement

Definition at line 21 of file DBWriterWorkers.h.

Constructor & Destructor Documentation

◆ DBWriterWorker()

ecaldqm::DBWriterWorker::DBWriterWorker ( std::string const &  _name,
edm::ParameterSet const &  _ps 
)

Definition at line 59 of file DBWriterWorkers.cc.

References ecaldqm::createMESet(), edm::ParameterSet::getUntrackedParameterSet(), ecaldqm::MESetCollection::insert(), name_, submitPVValidationJobs::params, EcalCondDBWriter_cfi::runTypes, runTypes_, source_, and AlCaHLTBitMon_QueryRunRegistry::string.

60  : DQWorker(), name_(_name), runTypes_(), source_(), active_(false) {
61  edm::ParameterSet const &params(_ps.getUntrackedParameterSet(name_));
62 
63  std::vector<std::string> runTypes(params.getUntrackedParameter<std::vector<std::string>>("runTypes"));
64  for (unsigned iT(0); iT < runTypes.size(); ++iT)
65  runTypes_.insert(runTypes[iT]);
66 
67  if (!params.existsAs<edm::ParameterSet>("source", false))
68  return;
69 
70  edm::ParameterSet const &sourceParams(params.getUntrackedParameterSet("source"));
71  std::vector<std::string> const &meNames(sourceParams.getParameterNames());
72  for (unsigned iP(0); iP < meNames.size(); ++iP) {
73  std::string meName(meNames[iP]);
74  edm::ParameterSet const &meParam(sourceParams.getUntrackedParameterSet(meName));
75  source_.insert(meName, createMESet(meParam));
76  }
77  }
void insert(const std::string &key, MESet *ptr)
Definition: MESet.h:387
std::string const name_
MESetCollection source_
std::set< std::string > runTypes_
MESet * createMESet(edm::ParameterSet const &)
Definition: MESetUtils.cc:18

◆ ~DBWriterWorker()

ecaldqm::DBWriterWorker::~DBWriterWorker ( )
inlineoverride

Definition at line 23 of file DBWriterWorkers.h.

23 {}

Member Function Documentation

◆ getName()

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

Definition at line 32 of file DBWriterWorkers.h.

References name_.

Referenced by EcalCondDBWriter::dqmEndJob(), and plotting.Plot::draw().

32 { return name_; }
std::string const name_

◆ isActive()

bool ecaldqm::DBWriterWorker::isActive ( ) const
inline

Definition at line 33 of file DBWriterWorkers.h.

References active_.

33 { return active_; }

◆ retrieveSource()

void ecaldqm::DBWriterWorker::retrieveSource ( DQMStore::IGetter _igetter)

Definition at line 79 of file DBWriterWorkers.cc.

References active_, ecaldqm::MESetCollection::begin(), ecaldqm::MESetCollection::end(), ecaldqm::DQWorker::GetElectronicsMap(), name_, source_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalCondDBWriter::dqmEndJob().

79  {
80  std::string failedPath;
81  for (MESetCollection::iterator sItr(this->source_.begin()); sItr != this->source_.end(); ++sItr) {
82  if (!sItr->second->retrieve(GetElectronicsMap(), _igetter, &failedPath)) {
83  edm::LogError("EcalDQM") << name_ << ": MESet " << sItr->first << "@" << failedPath << " not found";
84  this->active_ = false;
85  return;
86  }
87  }
88  }
auto end() const
Definition: MESet.h:393
std::string const name_
Log< level::Error, false > LogError
MESetCollection source_
MESetColletionType::iterator iterator
Definition: MESet.h:384
EcalElectronicsMapping const * GetElectronicsMap()
Definition: DQWorker.cc:150

◆ run()

virtual bool ecaldqm::DBWriterWorker::run ( EcalCondDBInterface ,
MonRunIOV  
)
pure virtual

◆ runsOn()

bool ecaldqm::DBWriterWorker::runsOn ( std::string const &  _runType) const
inline

Definition at line 28 of file DBWriterWorkers.h.

References runTypes_.

28 { return runTypes_.find(_runType) != runTypes_.end(); }
std::set< std::string > runTypes_

◆ setVerbosity()

void ecaldqm::DBWriterWorker::setVerbosity ( int  _v)
inline

Definition at line 30 of file DBWriterWorkers.h.

References verbosity_.

Referenced by EcalCondDBWriter::EcalCondDBWriter().

Member Data Documentation

◆ active_

bool ecaldqm::DBWriterWorker::active_
protected

Definition at line 39 of file DBWriterWorkers.h.

Referenced by isActive(), and retrieveSource().

◆ name_

std::string const ecaldqm::DBWriterWorker::name_
protected

Definition at line 36 of file DBWriterWorkers.h.

Referenced by DBWriterWorker(), getName(), and retrieveSource().

◆ runTypes_

std::set<std::string> ecaldqm::DBWriterWorker::runTypes_
protected

Definition at line 37 of file DBWriterWorkers.h.

Referenced by DBWriterWorker(), and runsOn().

◆ source_

MESetCollection ecaldqm::DBWriterWorker::source_
protected

◆ verbosity_

int ecaldqm::DBWriterWorker::verbosity_
protected

Definition at line 40 of file DBWriterWorkers.h.

Referenced by ecaldqm::IntegrityWriter::run(), and setVerbosity().