CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 ()
 
- Public Member Functions inherited from ecaldqm::DBWriterWorker
 DBWriterWorker (std::string const &, edm::ParameterSet const &)
 
std::string const & getName () const
 
bool isActive () const
 
virtual void retrieveSource (DQMStore const &)
 
bool runsOn (std::string const &_runType) const
 
void setVerbosity (int _v)
 
virtual ~DBWriterWorker ()
 

Private Attributes

int outcome_
 
unsigned processedEvents_
 
int taskList_
 

Additional Inherited Members

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

Detailed Description

Definition at line 117 of file DBWriterWorkers.h.

Constructor & Destructor Documentation

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

Definition at line 119 of file DBWriterWorkers.h.

119 : DBWriterWorker("Summary", _ps), taskList_(0), outcome_(0), processedEvents_(0) {}
DBWriterWorker(std::string const &, edm::ParameterSet const &)
ecaldqm::SummaryWriter::~SummaryWriter ( )
inline

Definition at line 120 of file DBWriterWorkers.h.

120 {}

Member Function Documentation

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

Implements ecaldqm::DBWriterWorker.

Definition at line 1373 of file DBWriterWorkers.cc.

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

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

1374  {
1375  std::map<EcalLogicID, MonRunDat> dataset;
1376  MonRunDat& runDat(dataset[ecalID()]);
1377 
1378  // CURRENTLY ONLY WRITING SUCCESS
1379  MonRunOutcomeDef outcomeDef;
1380  outcomeDef.setShortDesc("success");
1381 
1382  runDat.setNumEvents(processedEvents_);
1383  runDat.setMonRunOutcomeDef(outcomeDef);
1384  runDat.setTaskList(taskList_);
1385  runDat.setTaskOutcome(outcome_);
1386 
1387  try{
1388  _db->insertDataSet(&dataset, &_iov);
1389  }
1390  catch(std::runtime_error& e){
1391  if(std::string(e.what()).find("unique constraint") != std::string::npos)
1392  edm::LogWarning("EcalDQM") << e.what();
1393  else
1394  throw cms::Exception("DBError") << e.what();
1395  }
1396 
1397  return true;
1398  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void setShortDesc(std::string desc)
EcalLogicID ecalID()
tuple dataset
Definition: dataset.py:393
void insertDataSet(const std::map< EcalLogicID, DATT > *data, IOVT *iov)
void ecaldqm::SummaryWriter::setOutcome ( int  _outcome)
inline

Definition at line 123 of file DBWriterWorkers.h.

References outcome_.

Referenced by EcalCondDBWriter::analyze().

123 { outcome_ = _outcome; }
void ecaldqm::SummaryWriter::setProcessedEvents ( unsigned  _n)
inline

Definition at line 124 of file DBWriterWorkers.h.

References processedEvents_.

Referenced by EcalCondDBWriter::analyze().

124 { processedEvents_ = _n; }
void ecaldqm::SummaryWriter::setTaskList ( int  _list)
inline

Definition at line 122 of file DBWriterWorkers.h.

References taskList_.

Referenced by EcalCondDBWriter::analyze().

122 { taskList_ = _list; }

Member Data Documentation

int ecaldqm::SummaryWriter::outcome_
private

Definition at line 129 of file DBWriterWorkers.h.

Referenced by run(), and setOutcome().

unsigned ecaldqm::SummaryWriter::processedEvents_
private

Definition at line 130 of file DBWriterWorkers.h.

Referenced by run(), and setProcessedEvents().

int ecaldqm::SummaryWriter::taskList_
private

Definition at line 128 of file DBWriterWorkers.h.

Referenced by run(), and setTaskList().