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 
13 
14 #include <map>
15 
16 namespace ecaldqm {
17 
18  class DBWriterWorker : public DQWorker {
19  public:
23  ~DBWriterWorker() override {}
24 
26  virtual bool run(EcalCondDBInterface *, MonRunIOV &) = 0;
27 
28  bool runsOn(std::string const &_runType) const { return runTypes_.find(_runType) != runTypes_.end(); }
29 
30  void setVerbosity(int _v) { verbosity_ = _v; }
31 
32  std::string const &getName() const { return name_; }
33  bool isActive() const { return active_; }
34 
35  protected:
37  std::set<std::string> runTypes_;
39  bool active_;
41  };
42 
44  public:
45  IntegrityWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Integrity", _ps) {}
46  ~IntegrityWriter() override {}
47 
48  bool run(EcalCondDBInterface *, MonRunIOV &) override;
49  };
50 
51  class LaserWriter : public DBWriterWorker {
52  public:
54  ~LaserWriter() override {}
55 
56  bool run(EcalCondDBInterface *, MonRunIOV &) override;
57 
58  private:
59  std::map<int, unsigned> wlToME_;
60  };
61 
62  class PedestalWriter : public DBWriterWorker {
63  public:
65  ~PedestalWriter() override {}
66 
67  bool run(EcalCondDBInterface *, MonRunIOV &) override;
68 
69  private:
70  std::map<int, unsigned> gainToME_;
71  std::map<int, unsigned> pnGainToME_;
72  };
73 
75  public:
76  PresampleWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Presample", _ps) {}
77  ~PresampleWriter() override {}
78 
79  bool run(EcalCondDBInterface *, MonRunIOV &) override;
80  };
81 
83  public:
85  ~TestPulseWriter() override {}
86 
87  bool run(EcalCondDBInterface *, MonRunIOV &) override;
88 
89  private:
90  std::map<int, unsigned> gainToME_;
91  std::map<int, unsigned> pnGainToME_;
92  };
93 
94  class TimingWriter : public DBWriterWorker {
95  public:
96  TimingWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Timing", _ps) {}
97  ~TimingWriter() override {}
98 
99  bool run(EcalCondDBInterface *, MonRunIOV &) override;
100  };
101 
102  class LedWriter : public DBWriterWorker {
103  public:
104  LedWriter(edm::ParameterSet const &);
105  ~LedWriter() override {}
106 
107  bool run(EcalCondDBInterface *, MonRunIOV &) override;
108 
109  private:
110  std::map<int, unsigned> wlToME_;
111  };
112 
114  public:
115  OccupancyWriter(edm::ParameterSet const &_ps) : DBWriterWorker("Occupancy", _ps) {}
116  ~OccupancyWriter() override {}
117 
118  bool run(EcalCondDBInterface *, MonRunIOV &) override;
119  };
120 
121  class SummaryWriter : public DBWriterWorker {
122  public:
124  : DBWriterWorker("Summary", _ps), taskList_(0), outcome_(0), processedEvents_(0) {}
125  ~SummaryWriter() override {}
126 
127  void setTaskList(int _list) { taskList_ = _list; }
128  void setOutcome(int _outcome) { outcome_ = _outcome; }
129  void setProcessedEvents(unsigned _n) { processedEvents_ = _n; }
130  bool run(EcalCondDBInterface *, MonRunIOV &) override;
131 
132  private:
134  int outcome_;
136  };
137 } // namespace ecaldqm
138 
139 #endif
ecaldqm::SummaryWriter::SummaryWriter
SummaryWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:123
ecaldqm::PedestalWriter
Definition: DBWriterWorkers.h:62
EcalCondDBInterface
Definition: EcalCondDBInterface.h:37
ecaldqm::LaserWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:325
ecaldqm::SummaryWriter::outcome_
int outcome_
Definition: DBWriterWorkers.h:134
ecaldqm
Definition: DQWorker.h:29
ecaldqm::DBWriterWorker::runsOn
bool runsOn(std::string const &_runType) const
Definition: DBWriterWorkers.h:28
ecaldqm::LedWriter::~LedWriter
~LedWriter() override
Definition: DBWriterWorkers.h:105
ecaldqm::TestPulseWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:831
ecaldqm::TestPulseWriter::pnGainToME_
std::map< int, unsigned > pnGainToME_
Definition: DBWriterWorkers.h:91
ecaldqm::OccupancyWriter::~OccupancyWriter
~OccupancyWriter() override
Definition: DBWriterWorkers.h:116
ecaldqm::LaserWriter
Definition: DBWriterWorkers.h:51
ecaldqm::LaserWriter::wlToME_
std::map< int, unsigned > wlToME_
Definition: DBWriterWorkers.h:59
ecaldqm::OccupancyWriter
Definition: DBWriterWorkers.h:113
MESet.h
ecaldqm::PedestalWriter::pnGainToME_
std::map< int, unsigned > pnGainToME_
Definition: DBWriterWorkers.h:71
DQMStore.h
ecaldqm::PresampleWriter::~PresampleWriter
~PresampleWriter() override
Definition: DBWriterWorkers.h:77
dqm::legacy::MonitorElement
Definition: MonitorElement.h:462
ecaldqm::DBWriterWorker::runTypes_
std::set< std::string > runTypes_
Definition: DBWriterWorkers.h:37
ecaldqm::PedestalWriter::PedestalWriter
PedestalWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:574
ecaldqm::IntegrityWriter
Definition: DBWriterWorkers.h:43
ecaldqm::DBWriterWorker::getName
const std::string & getName() const
Definition: DBWriterWorkers.h:32
ecaldqm::PedestalWriter::gainToME_
std::map< int, unsigned > gainToME_
Definition: DBWriterWorkers.h:70
ecaldqm::DQWorker
Definition: DQWorker.h:33
ecaldqm::TimingWriter::~TimingWriter
~TimingWriter() override
Definition: DBWriterWorkers.h:97
MonRunDat.h
ecaldqm::LedWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1107
dqm::legacy::DQMStore
Definition: DQMStore.h:727
ecaldqm::DBWriterWorker::isActive
bool isActive() const
Definition: DBWriterWorkers.h:33
ecaldqm::PedestalWriter::~PedestalWriter
~PedestalWriter() override
Definition: DBWriterWorkers.h:65
ecaldqm::IntegrityWriter::~IntegrityWriter
~IntegrityWriter() override
Definition: DBWriterWorkers.h:46
ecaldqm::SummaryWriter::setProcessedEvents
void setProcessedEvents(unsigned _n)
Definition: DBWriterWorkers.h:129
ecaldqm::DBWriterWorker
Definition: DBWriterWorkers.h:18
ecaldqm::PedestalWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:604
ecaldqm::LedWriter::wlToME_
std::map< int, unsigned > wlToME_
Definition: DBWriterWorkers.h:110
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::TimingWriter::TimingWriter
TimingWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:96
ecaldqm::TestPulseWriter
Definition: DBWriterWorkers.h:82
ecaldqm::OccupancyWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1294
ecaldqm::PresampleWriter
Definition: DBWriterWorkers.h:74
ecaldqm::SummaryWriter::setTaskList
void setTaskList(int _list)
Definition: DBWriterWorkers.h:127
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::TestPulseWriter::~TestPulseWriter
~TestPulseWriter() override
Definition: DBWriterWorkers.h:85
ecaldqm::LedWriter
Definition: DBWriterWorkers.h:102
ecaldqm::MESetCollection
Definition: MESet.h:380
ecaldqm::DBWriterWorker::setVerbosity
void setVerbosity(int _v)
Definition: DBWriterWorkers.h:30
ecaldqm::DBWriterWorker::name_
const std::string name_
Definition: DBWriterWorkers.h:36
ecaldqm::DBWriterWorker::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition: DBWriterWorkers.h:21
DQWorker.h
MonRunIOV
Definition: MonRunIOV.h:14
ecaldqm::DBWriterWorker::DQMStore
dqm::legacy::DQMStore DQMStore
Definition: DBWriterWorkers.h:20
ecaldqm::TestPulseWriter::gainToME_
std::map< int, unsigned > gainToME_
Definition: DBWriterWorkers.h:90
ecaldqm::IntegrityWriter::IntegrityWriter
IntegrityWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:45
ecaldqm::OccupancyWriter::OccupancyWriter
OccupancyWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:115
ecaldqm::LaserWriter::~LaserWriter
~LaserWriter() override
Definition: DBWriterWorkers.h:54
ecaldqm::SummaryWriter::processedEvents_
unsigned processedEvents_
Definition: DBWriterWorkers.h:135
ecaldqm::DBWriterWorker::retrieveSource
void retrieveSource(DQMStore::IGetter &)
Definition: DBWriterWorkers.cc:79
ecaldqm::DBWriterWorker::~DBWriterWorker
~DBWriterWorker() override
Definition: DBWriterWorkers.h:23
ecaldqm::LaserWriter::LaserWriter
LaserWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:305
ecaldqm::DBWriterWorker::DBWriterWorker
DBWriterWorker(std::string const &, edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:59
ecaldqm::SummaryWriter::setOutcome
void setOutcome(int _outcome)
Definition: DBWriterWorkers.h:128
ecaldqm::IntegrityWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:90
ecaldqm::LedWriter::LedWriter
LedWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:1087
ecaldqm::SummaryWriter::taskList_
int taskList_
Definition: DBWriterWorkers.h:133
ecaldqm::SummaryWriter::~SummaryWriter
~SummaryWriter() override
Definition: DBWriterWorkers.h:125
ecaldqm::TestPulseWriter::TestPulseWriter
TestPulseWriter(edm::ParameterSet const &)
Definition: DBWriterWorkers.cc:801
dqm::implementation::IGetter
Definition: DQMStore.h:484
ecaldqm::PresampleWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:750
ecaldqm::DBWriterWorker::active_
bool active_
Definition: DBWriterWorkers.h:39
ecaldqm::DBWriterWorker::run
virtual bool run(EcalCondDBInterface *, MonRunIOV &)=0
ecaldqm::TimingWriter
Definition: DBWriterWorkers.h:94
ecaldqm::SummaryWriter
Definition: DBWriterWorkers.h:121
ParameterSet.h
ecaldqm::DBWriterWorker::source_
MESetCollection source_
Definition: DBWriterWorkers.h:38
EcalCondDBInterface.h
ecaldqm::PresampleWriter::PresampleWriter
PresampleWriter(edm::ParameterSet const &_ps)
Definition: DBWriterWorkers.h:76
ecaldqm::DBWriterWorker::verbosity_
int verbosity_
Definition: DBWriterWorkers.h:40
ecaldqm::SummaryWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1340
ecaldqm::TimingWriter::run
bool run(EcalCondDBInterface *, MonRunIOV &) override
Definition: DBWriterWorkers.cc:1036