CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
ecaldqm::SummaryWriter Class Reference

#include <DBWriterWorkers.h>

Inheritance diagram for ecaldqm::SummaryWriter:
ecaldqm::DBWriterWorker ecaldqm::DQWorker

Public Member Functions

bool run (EcalCondDBInterface *, MonRunIOV &) override
 
void setOutcome (int _outcome)
 
void setProcessedEvents (unsigned _n)
 
void setTaskList (int _list)
 
 SummaryWriter (edm::ParameterSet const &_ps)
 
 ~SummaryWriter () override
 
- Public Member Functions inherited from ecaldqm::DBWriterWorker
 DBWriterWorker (std::string const &, edm::ParameterSet const &)
 
std::string const & getName () const
 
bool isActive () const
 
void retrieveSource (DQMStore::IGetter &)
 
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)
 

Private Attributes

int outcome_
 
unsigned processedEvents_
 
int taskList_
 

Additional Inherited Members

- Public Types inherited from ecaldqm::DBWriterWorker
typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- 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)
 
- Protected Attributes inherited from ecaldqm::DBWriterWorker
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_
 

Detailed Description

Definition at line 121 of file DBWriterWorkers.h.

Constructor & Destructor Documentation

◆ SummaryWriter()

ecaldqm::SummaryWriter::SummaryWriter ( edm::ParameterSet const &  _ps)
inline

Definition at line 123 of file DBWriterWorkers.h.

124  : DBWriterWorker("Summary", _ps), taskList_(0), outcome_(0), processedEvents_(0) {}
DBWriterWorker(std::string const &, edm::ParameterSet const &)

◆ ~SummaryWriter()

ecaldqm::SummaryWriter::~SummaryWriter ( )
inlineoverride

Definition at line 125 of file DBWriterWorkers.h.

125 {}

Member Function Documentation

◆ run()

bool ecaldqm::SummaryWriter::run ( EcalCondDBInterface _db,
MonRunIOV _iov 
)
overridevirtual

Implements ecaldqm::DBWriterWorker.

Definition at line 1340 of file DBWriterWorkers.cc.

References writedatasetfile::dataset, MillePedeFileConverter_cfg::e, ecaldqm::ecalID(), Exception, spr::find(), EcalCondDBInterface::insertDataSet(), outcome_, processedEvents_, MonRunDat::setMonRunOutcomeDef(), MonRunDat::setNumEvents(), MonRunOutcomeDef::setShortDesc(), MonRunDat::setTaskList(), MonRunDat::setTaskOutcome(), AlCaHLTBitMon_QueryRunRegistry::string, and taskList_.

Referenced by Types.EventID::cppID(), Types.LuminosityBlockID::cppID(), and EcalCondDBWriter::dqmEndJob().

1340  {
1341  std::map<EcalLogicID, MonRunDat> dataset;
1342  MonRunDat &runDat(dataset[ecalID()]);
1343 
1344  // CURRENTLY ONLY WRITING SUCCESS
1345  MonRunOutcomeDef outcomeDef;
1346  outcomeDef.setShortDesc("success");
1347 
1348  runDat.setNumEvents(processedEvents_);
1349  runDat.setMonRunOutcomeDef(outcomeDef);
1350  runDat.setTaskList(taskList_);
1351  runDat.setTaskOutcome(outcome_);
1352 
1353  try {
1354  _db->insertDataSet(&dataset, &_iov);
1355  } catch (std::runtime_error &e) {
1356  if (std::string(e.what()).find("unique constraint") != std::string::npos)
1357  edm::LogWarning("EcalDQM") << e.what();
1358  else
1359  throw cms::Exception("DBError") << e.what();
1360  }
1361 
1362  return true;
1363  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
void setShortDesc(std::string desc)
EcalLogicID ecalID()
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)

◆ setOutcome()

void ecaldqm::SummaryWriter::setOutcome ( int  _outcome)
inline

Definition at line 128 of file DBWriterWorkers.h.

References outcome_.

Referenced by EcalCondDBWriter::dqmEndJob().

128 { outcome_ = _outcome; }

◆ setProcessedEvents()

void ecaldqm::SummaryWriter::setProcessedEvents ( unsigned  _n)
inline

Definition at line 129 of file DBWriterWorkers.h.

References processedEvents_.

Referenced by EcalCondDBWriter::dqmEndJob().

129 { processedEvents_ = _n; }

◆ setTaskList()

void ecaldqm::SummaryWriter::setTaskList ( int  _list)
inline

Definition at line 127 of file DBWriterWorkers.h.

References taskList_.

Referenced by EcalCondDBWriter::dqmEndJob().

127 { taskList_ = _list; }

Member Data Documentation

◆ outcome_

int ecaldqm::SummaryWriter::outcome_
private

Definition at line 134 of file DBWriterWorkers.h.

Referenced by run(), and setOutcome().

◆ processedEvents_

unsigned ecaldqm::SummaryWriter::processedEvents_
private

Definition at line 135 of file DBWriterWorkers.h.

Referenced by run(), and setProcessedEvents().

◆ taskList_

int ecaldqm::SummaryWriter::taskList_
private

Definition at line 133 of file DBWriterWorkers.h.

Referenced by run(), and setTaskList().