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

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 &)
 
const std::string & getName () const
 
bool isActive () const
 
void retrieveSource (DQMStore::IGetter &)
 
bool runsOn (std::string const &_runType) const
 
void setVerbosity (int _v)
 
virtual ~DBWriterWorker ()
 

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
 
- Protected Attributes inherited from ecaldqm::DBWriterWorker
bool active_
 
const std::string name_
 
std::set< std::string > runTypes_
 
MESetCollection source_
 
int verbosity_
 

Detailed Description

Definition at line 119 of file DBWriterWorkers.h.

Constructor & Destructor Documentation

◆ SummaryWriter()

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

Definition at line 121 of file DBWriterWorkers.h.

122  : DBWriterWorker("Summary", _ps), taskList_(0), outcome_(0), processedEvents_(0) {}

◆ ~SummaryWriter()

ecaldqm::SummaryWriter::~SummaryWriter ( )
inlineoverride

Definition at line 123 of file DBWriterWorkers.h.

123 {}

Member Function Documentation

◆ run()

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

Implements ecaldqm::DBWriterWorker.

Definition at line 1332 of file DBWriterWorkers.cc.

1332  {
1333  std::map<EcalLogicID, MonRunDat> dataset;
1334  MonRunDat &runDat(dataset[ecalID()]);
1335 
1336  // CURRENTLY ONLY WRITING SUCCESS
1337  MonRunOutcomeDef outcomeDef;
1338  outcomeDef.setShortDesc("success");
1339 
1340  runDat.setNumEvents(processedEvents_);
1341  runDat.setMonRunOutcomeDef(outcomeDef);
1342  runDat.setTaskList(taskList_);
1343  runDat.setTaskOutcome(outcome_);
1344 
1345  try {
1346  _db->insertDataSet(&dataset, &_iov);
1347  } catch (std::runtime_error &e) {
1348  if (std::string(e.what()).find("unique constraint") != std::string::npos)
1349  edm::LogWarning("EcalDQM") << e.what();
1350  else
1351  throw cms::Exception("DBError") << e.what();
1352  }
1353 
1354  return true;
1355  }

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

◆ setOutcome()

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

Definition at line 126 of file DBWriterWorkers.h.

126 { outcome_ = _outcome; }

References outcome_.

Referenced by EcalCondDBWriter::dqmEndJob().

◆ setProcessedEvents()

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

Definition at line 127 of file DBWriterWorkers.h.

127 { processedEvents_ = _n; }

References processedEvents_.

Referenced by EcalCondDBWriter::dqmEndJob().

◆ setTaskList()

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

Definition at line 125 of file DBWriterWorkers.h.

125 { taskList_ = _list; }

References taskList_.

Referenced by EcalCondDBWriter::dqmEndJob().

Member Data Documentation

◆ outcome_

int ecaldqm::SummaryWriter::outcome_
private

Definition at line 132 of file DBWriterWorkers.h.

Referenced by run(), and setOutcome().

◆ processedEvents_

unsigned ecaldqm::SummaryWriter::processedEvents_
private

Definition at line 133 of file DBWriterWorkers.h.

Referenced by run(), and setProcessedEvents().

◆ taskList_

int ecaldqm::SummaryWriter::taskList_
private

Definition at line 131 of file DBWriterWorkers.h.

Referenced by run(), and setTaskList().

ecaldqm::SummaryWriter::outcome_
int outcome_
Definition: DBWriterWorkers.h:132
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
MonRunDat
Definition: MonRunDat.h:12
EcalCondDBInterface::insertDataSet
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov) noexcept(false)
Definition: EcalCondDBInterface.h:260
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::ecalID
EcalLogicID ecalID()
Definition: LogicIDTranslation.cc:8
ecaldqm::SummaryWriter::processedEvents_
unsigned processedEvents_
Definition: DBWriterWorkers.h:133
ecaldqm::DBWriterWorker::DBWriterWorker
DBWriterWorker(std::string const &, edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:59
writedatasetfile.dataset
dataset
Definition: writedatasetfile.py:19
ecaldqm::SummaryWriter::taskList_
int taskList_
Definition: DBWriterWorkers.h:131
Exception
Definition: hltDiff.cc:246
dataset
Definition: dataset.py:1
MonRunOutcomeDef
Definition: MonRunOutcomeDef.h:12
edm::Log
Definition: MessageLogger.h:70
MonRunOutcomeDef::setShortDesc
void setShortDesc(std::string desc)
Definition: MonRunOutcomeDef.cc:21
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37