CMS 3D CMS Logo

DBWriterWorkers.h
Go to the documentation of this file.
1 #ifndef DBWriterWorkers_H
2 #define DBWriterWorkers_H
3 
6 
8 
11 
12 #include <map>
13 
14 namespace ecaldqm {
15 
17  public:
21  virtual ~DBWriterWorker() {}
22 
24  virtual bool run(EcalCondDBInterface *, MonRunIOV &) = 0;
25 
26  bool runsOn(std::string const &_runType) const { return runTypes_.find(_runType) != runTypes_.end(); }
27 
28  void setVerbosity(int _v) { verbosity_ = _v; }
29 
30  std::string const &getName() const { return name_; }
31  bool isActive() const { return active_; }
32 
33  protected:
35  std::set<std::string> runTypes_;
37  bool active_;
39  };
40 
42  public:
43  IntegrityWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Integrity", _ps) {}
44  ~IntegrityWriter() override {}
45 
46  bool run(EcalCondDBInterface *, MonRunIOV &) override;
47  };
48 
49  class LaserWriter : public DBWriterWorker {
50  public:
52  ~LaserWriter() override {}
53 
54  bool run(EcalCondDBInterface *, MonRunIOV &) override;
55 
56  private:
57  std::map<int, unsigned> wlToME_;
58  };
59 
60  class PedestalWriter : public DBWriterWorker {
61  public:
63  ~PedestalWriter() override {}
64 
65  bool run(EcalCondDBInterface *, MonRunIOV &) override;
66 
67  private:
68  std::map<int, unsigned> gainToME_;
69  std::map<int, unsigned> pnGainToME_;
70  };
71 
73  public:
74  PresampleWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Presample", _ps) {}
75  ~PresampleWriter() override {}
76 
77  bool run(EcalCondDBInterface *, MonRunIOV &) override;
78  };
79 
81  public:
83  ~TestPulseWriter() override {}
84 
85  bool run(EcalCondDBInterface *, MonRunIOV &) override;
86 
87  private:
88  std::map<int, unsigned> gainToME_;
89  std::map<int, unsigned> pnGainToME_;
90  };
91 
92  class TimingWriter : public DBWriterWorker {
93  public:
94  TimingWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Timing", _ps) {}
95  ~TimingWriter() override {}
96 
97  bool run(EcalCondDBInterface *, MonRunIOV &) override;
98  };
99 
100  class LedWriter : public DBWriterWorker {
101  public:
102  LedWriter(edm::ParameterSet const &);
103  ~LedWriter() override {}
104 
105  bool run(EcalCondDBInterface *, MonRunIOV &) override;
106 
107  private:
108  std::map<int, unsigned> wlToME_;
109  };
110 
112  public:
113  OccupancyWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Occupancy", _ps) {}
114  ~OccupancyWriter() override {}
115 
116  bool run(EcalCondDBInterface *, MonRunIOV &) override;
117  };
118 
119  class SummaryWriter : public DBWriterWorker {
120  public:
122  : DBWriterWorker("Summary", _ps), taskList_(0), outcome_(0), processedEvents_(0) {}
123  ~SummaryWriter() override {}
124 
125  void setTaskList(int _list) { taskList_ = _list; }
126  void setOutcome(int _outcome) { outcome_ = _outcome; }
127  void setProcessedEvents(unsigned _n) { processedEvents_ = _n; }
128  bool run(EcalCondDBInterface *, MonRunIOV &) override;
129 
130  private:
132  int outcome_;
134  };
135 } // namespace ecaldqm
136 
137 #endif
ecaldqm::SummaryWriter::SummaryWriter
SummaryWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:121
ecaldqm::PedestalWriter
Definition: DBWriterWorkers.h:60
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
ecaldqm::LaserWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:324
ecaldqm::SummaryWriter::outcome_
int outcome_
Definition: DBWriterWorkers.h:132
ecaldqm
Definition: DQWorker.h:24
ecaldqm::DBWriterWorker::runsOn
bool runsOn(std::string const &_runType) const
Definition: DBWriterWorkers.h:26
ecaldqm::LedWriter::~LedWriter
~LedWriter() override
Definition: DBWriterWorkers.h:103
ecaldqm::TestPulseWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:827
ecaldqm::DBWriterWorker::~DBWriterWorker
virtual ~DBWriterWorker()
Definition: DBWriterWorkers.h:21
ecaldqm::TestPulseWriter::pnGainToME_
std::map< int, unsigned > pnGainToME_
Definition: DBWriterWorkers.h:89
ecaldqm::OccupancyWriter::~OccupancyWriter
~OccupancyWriter() override
Definition: DBWriterWorkers.h:114
ecaldqm::LaserWriter
Definition: DBWriterWorkers.h:49
ecaldqm::LaserWriter::wlToME_
std::map< int, unsigned > wlToME_
Definition: DBWriterWorkers.h:57
ecaldqm::OccupancyWriter
Definition: DBWriterWorkers.h:111
MESet.h
ecaldqm::PedestalWriter::pnGainToME_
std::map< int, unsigned > pnGainToME_
Definition: DBWriterWorkers.h:69
DQMStore.h
ecaldqm::PresampleWriter::~PresampleWriter
~PresampleWriter() override
Definition: DBWriterWorkers.h:75
dqm::legacy::MonitorElement
Definition: MonitorElement.h:461
ecaldqm::DBWriterWorker::runTypes_
std::set< std::string > runTypes_
Definition: DBWriterWorkers.h:35
ecaldqm::PedestalWriter::PedestalWriter
PedestalWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:572
ecaldqm::IntegrityWriter
Definition: DBWriterWorkers.h:41
ecaldqm::DBWriterWorker::getName
const std::string & getName() const
Definition: DBWriterWorkers.h:30
ecaldqm::PedestalWriter::gainToME_
std::map< int, unsigned > gainToME_
Definition: DBWriterWorkers.h:68
ecaldqm::TimingWriter::~TimingWriter
~TimingWriter() override
Definition: DBWriterWorkers.h:95
MonRunDat.h
ecaldqm::LedWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1101
dqm::legacy::DQMStore
Definition: DQMStore.h:727
ecaldqm::DBWriterWorker::isActive
bool isActive() const
Definition: DBWriterWorkers.h:31
ecaldqm::PedestalWriter::~PedestalWriter
~PedestalWriter() override
Definition: DBWriterWorkers.h:63
ecaldqm::IntegrityWriter::~IntegrityWriter
~IntegrityWriter() override
Definition: DBWriterWorkers.h:44
ecaldqm::SummaryWriter::setProcessedEvents
void setProcessedEvents(unsigned _n)
Definition: DBWriterWorkers.h:127
ecaldqm::DBWriterWorker
Definition: DBWriterWorkers.h:16
ecaldqm::PedestalWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:602
ecaldqm::LedWriter::wlToME_
std::map< int, unsigned > wlToME_
Definition: DBWriterWorkers.h:108
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::TimingWriter::TimingWriter
TimingWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:94
ecaldqm::MESetCollection
boost::ptr_map< std::string, MESet > MESetCollection
Definition: MESet.h:349
ecaldqm::TestPulseWriter
Definition: DBWriterWorkers.h:80
ecaldqm::OccupancyWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1287
ecaldqm::PresampleWriter
Definition: DBWriterWorkers.h:72
ecaldqm::SummaryWriter::setTaskList
void setTaskList(int _list)
Definition: DBWriterWorkers.h:125
edm::ParameterSet
Definition: ParameterSet.h:36
ecaldqm::TestPulseWriter::~TestPulseWriter
~TestPulseWriter() override
Definition: DBWriterWorkers.h:83
ecaldqm::LedWriter
Definition: DBWriterWorkers.h:100
ecaldqm::DBWriterWorker::setVerbosity
void setVerbosity(int _v)
Definition: DBWriterWorkers.h:28
ecaldqm::DBWriterWorker::name_
const std::string name_
Definition: DBWriterWorkers.h:34
ecaldqm::DBWriterWorker::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: DBWriterWorkers.h:19
MonRunIOV
Definition: MonRunIOV.h:14
ecaldqm::DBWriterWorker::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: DBWriterWorkers.h:18
ecaldqm::TestPulseWriter::gainToME_
std::map< int, unsigned > gainToME_
Definition: DBWriterWorkers.h:88
ecaldqm::IntegrityWriter::IntegrityWriter
IntegrityWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:43
ecaldqm::OccupancyWriter::OccupancyWriter
OccupancyWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:113
ecaldqm::LaserWriter::~LaserWriter
~LaserWriter() override
Definition: DBWriterWorkers.h:52
ecaldqm::SummaryWriter::processedEvents_
unsigned processedEvents_
Definition: DBWriterWorkers.h:133
ecaldqm::DBWriterWorker::retrieveSource
void retrieveSource(DQMStore::IGetter &)
Definition: DBWriterWorkers.cc:79
ecaldqm::LaserWriter::LaserWriter
LaserWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:304
ecaldqm::DBWriterWorker::DBWriterWorker
DBWriterWorker(std::string const &, edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:59
ecaldqm::SummaryWriter::setOutcome
void setOutcome(int _outcome)
Definition: DBWriterWorkers.h:126
ecaldqm::IntegrityWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:90
ecaldqm::LedWriter::LedWriter
LedWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:1081
ecaldqm::SummaryWriter::taskList_
int taskList_
Definition: DBWriterWorkers.h:131
ecaldqm::SummaryWriter::~SummaryWriter
~SummaryWriter() override
Definition: DBWriterWorkers.h:123
ecaldqm::TestPulseWriter::TestPulseWriter
TestPulseWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:797
ecaldqm::PresampleWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:747
ecaldqm::DBWriterWorker::active_
bool active_
Definition: DBWriterWorkers.h:37
ecaldqm::DBWriterWorker::run
virtual bool run(EcalCondDBInterface *, MonRunIOV &)=0
ecaldqm::TimingWriter
Definition: DBWriterWorkers.h:92
ecaldqm::SummaryWriter
Definition: DBWriterWorkers.h:119
ParameterSet.h
dqm::legacy::DQMStore::IGetter
dqm::implementation::IGetter IGetter
Definition: DQMStore.h:730
ecaldqm::DBWriterWorker::source_
MESetCollection source_
Definition: DBWriterWorkers.h:36
EcalCondDBInterface.h
ecaldqm::PresampleWriter::PresampleWriter
PresampleWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:74
ecaldqm::DBWriterWorker::verbosity_
int verbosity_
Definition: DBWriterWorkers.h:38
ecaldqm::SummaryWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1332
ecaldqm::TimingWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1031