CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Protected Attributes
ecaldqm::DBWriterWorker Class Referenceabstract

#include <DBWriterWorkers.h>

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

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)
 
virtual ~DBWriterWorker ()
 

Protected Attributes

bool active_
 
std::string const name_
 
std::set< std::string > runTypes_
 
MESetCollection source_
 
int verbosity_
 

Detailed Description

Definition at line 18 of file DBWriterWorkers.h.

Constructor & Destructor Documentation

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

Definition at line 70 of file DBWriterWorkers.cc.

References ecaldqm::createMESet(), edm::ParameterSet::getUntrackedParameterSet(), name_, runTypes_, source_, and AlCaHLTBitMon_QueryRunRegistry::string.

70  :
71  name_(_name),
72  runTypes_(),
73  source_(),
74  active_(false)
75  {
76  edm::ParameterSet const& params(_ps.getUntrackedParameterSet(name_));
77 
78  std::vector<std::string> runTypes(params.getUntrackedParameter<std::vector<std::string> >("runTypes"));
79  for(unsigned iT(0); iT < runTypes.size(); ++iT)
80  runTypes_.insert(runTypes[iT]);
81 
82  if(!params.existsAs<edm::ParameterSet>("source", false)) return;
83 
84  edm::ParameterSet const& sourceParams(params.getUntrackedParameterSet("source"));
85  std::vector<std::string> const& meNames(sourceParams.getParameterNames());
86  for(unsigned iP(0); iP < meNames.size(); ++iP){
87  std::string meName(meNames[iP]);
88  edm::ParameterSet const& meParam(sourceParams.getUntrackedParameterSet(meName));
89  source_.insert(meName, createMESet(meParam));
90  }
91  }
std::string const name_
MESetCollection source_
std::set< std::string > runTypes_
MESet * createMESet(edm::ParameterSet const &)
Definition: MESetUtils.cc:19
virtual ecaldqm::DBWriterWorker::~DBWriterWorker ( )
inlinevirtual

Definition at line 21 of file DBWriterWorkers.h.

21 {}

Member Function Documentation

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

Definition at line 30 of file DBWriterWorkers.h.

References name_.

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

30 { return name_; }
std::string const name_
bool ecaldqm::DBWriterWorker::isActive ( ) const
inline

Definition at line 31 of file DBWriterWorkers.h.

References active_.

31 { return active_; }
void ecaldqm::DBWriterWorker::retrieveSource ( DQMStore::IGetter _igetter)

Definition at line 94 of file DBWriterWorkers.cc.

References active_, name_, source_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EcalCondDBWriter::dqmEndJob().

95  {
96  std::string failedPath;
97  for(MESetCollection::iterator sItr(this->source_.begin()); sItr != this->source_.end(); ++sItr){
98  if(!sItr->second->retrieve(_igetter, &failedPath)){
99  edm::LogError("EcalDQM") << name_ << ": MESet " << sItr->first << "@" << failedPath << " not found";
100  this->active_ = false;
101  return;
102  }
103  }
104  }
std::string const name_
MESetCollection source_
virtual bool ecaldqm::DBWriterWorker::run ( EcalCondDBInterface ,
MonRunIOV  
)
pure virtual
bool ecaldqm::DBWriterWorker::runsOn ( std::string const &  _runType) const
inline

Definition at line 26 of file DBWriterWorkers.h.

References runTypes_.

26 { return runTypes_.find(_runType) != runTypes_.end(); }
std::set< std::string > runTypes_
void ecaldqm::DBWriterWorker::setVerbosity ( int  _v)
inline

Definition at line 28 of file DBWriterWorkers.h.

References verbosity_.

Member Data Documentation

bool ecaldqm::DBWriterWorker::active_
protected

Definition at line 37 of file DBWriterWorkers.h.

Referenced by isActive(), and retrieveSource().

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

Definition at line 34 of file DBWriterWorkers.h.

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

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

Definition at line 35 of file DBWriterWorkers.h.

Referenced by DBWriterWorker(), and runsOn().

MESetCollection ecaldqm::DBWriterWorker::source_
protected
int ecaldqm::DBWriterWorker::verbosity_
protected

Definition at line 38 of file DBWriterWorkers.h.

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