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 class DQMStore;
15 
16 namespace ecaldqm {
17 
19  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
TimingWriter(edm::ParameterSet const &_ps)
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_
std::string const name_
MESetCollection source_
void setTaskList(int _list)
boost::ptr_map< std::string, MESet > MESetCollection
Definition: MESet.h:350
std::map< int, unsigned > pnGainToME_
SummaryWriter(edm::ParameterSet const &_ps)
std::map< int, unsigned > pnGainToME_
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)
IntegrityWriter(edm::ParameterSet const &_ps)
std::map< int, unsigned > wlToME_
std::set< std::string > runTypes_
OccupancyWriter(edm::ParameterSet const &_ps)
void setOutcome(int _outcome)