CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
TimingWriter(edm::ParameterSet const &_ps)
bool run(EcalCondDBInterface *, MonRunIOV &) override
PedestalWriter(edm::ParameterSet const &)
dqm::legacy::DQMStore DQMStore
DBWriterWorker(std::string const &, edm::ParameterSet const &)
virtual bool run(EcalCondDBInterface *, MonRunIOV &)=0
std::map< int, unsigned > wlToME_
void setProcessedEvents(unsigned _n)
std::map< int, unsigned > gainToME_
bool run(EcalCondDBInterface *, MonRunIOV &) override
std::string const name_
bool run(EcalCondDBInterface *, MonRunIOV &) override
bool run(EcalCondDBInterface *, MonRunIOV &) override
dqm::legacy::MonitorElement MonitorElement
LedWriter(edm::ParameterSet const &)
LaserWriter(edm::ParameterSet const &)
MESetCollection source_
bool run(EcalCondDBInterface *, MonRunIOV &) override
void setTaskList(int _list)
bool run(EcalCondDBInterface *, MonRunIOV &) override
std::map< int, unsigned > pnGainToME_
SummaryWriter(edm::ParameterSet const &_ps)
std::map< int, unsigned > pnGainToME_
bool run(EcalCondDBInterface *, MonRunIOV &) override
bool run(EcalCondDBInterface *, MonRunIOV &) override
void retrieveSource(DQMStore::IGetter &)
std::map< int, unsigned > gainToME_
std::string const & getName() const
bool runsOn(std::string const &_runType) const
PresampleWriter(edm::ParameterSet const &_ps)
TestPulseWriter(edm::ParameterSet const &)
IntegrityWriter(edm::ParameterSet const &_ps)
std::map< int, unsigned > wlToME_
std::set< std::string > runTypes_
bool run(EcalCondDBInterface *, MonRunIOV &) override
OccupancyWriter(edm::ParameterSet const &_ps)
void setOutcome(int _outcome)