CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
DBWriterWorkers.h
Go to the documentation of this file.
1 #ifndef DBWriterWorkers_H
2 #define DBWriterWorkers_H
3 
6 
9 
10 #include <map>
11 
12 class DQMStore;
13 
14 namespace ecaldqm {
15 
17  public:
19  virtual ~DBWriterWorker() {}
20 
21  virtual void retrieveSource(DQMStore const&);
22  virtual bool run(EcalCondDBInterface*, MonRunIOV&) = 0;
23 
24  bool runsOn(std::string const& _runType) const { return runTypes_.find(_runType) != runTypes_.end(); }
25 
26  void setVerbosity(int _v) { verbosity_ = _v; }
27 
28  std::string const& getName() const { return name_; }
29  bool isActive() const { return active_; }
30 
31  protected:
33  std::set<std::string> runTypes_;
35  bool active_;
37  };
38 
40  public:
41  IntegrityWriter(edm::ParameterSet const& _ps) : DBWriterWorker("Integrity", _ps) {}
43 
44  bool run(EcalCondDBInterface*, MonRunIOV&) override;
45  };
46 
47  class LaserWriter : public DBWriterWorker {
48  public:
51 
52  bool run(EcalCondDBInterface*, MonRunIOV&) override;
53 
54  private:
55  std::map<int, unsigned> wlToME_;
56  };
57 
58  class PedestalWriter : public DBWriterWorker {
59  public:
62 
63  bool run(EcalCondDBInterface*, MonRunIOV&) override;
64 
65  private:
66  std::map<int, unsigned> gainToME_;
67  std::map<int, unsigned> pnGainToME_;
68  };
69 
71  public:
72  PresampleWriter(edm::ParameterSet const& _ps) : DBWriterWorker("Presample", _ps) {}
74 
75  bool run(EcalCondDBInterface*, MonRunIOV&) override;
76  };
77 
79  public:
82 
83  bool run(EcalCondDBInterface*, MonRunIOV&) override;
84 
85  private:
86  std::map<int, unsigned> gainToME_;
87  std::map<int, unsigned> pnGainToME_;
88  };
89 
90  class TimingWriter : public DBWriterWorker {
91  public:
92  TimingWriter(edm::ParameterSet const& _ps) : DBWriterWorker("Timing", _ps) {}
94 
95  bool run(EcalCondDBInterface*, MonRunIOV&) override;
96  };
97 
98  class LedWriter : public DBWriterWorker {
99  public:
102 
103  bool run(EcalCondDBInterface*, MonRunIOV&) override;
104 
105  private:
106  std::map<int, unsigned> wlToME_;
107  };
108 
110  public:
111  OccupancyWriter(edm::ParameterSet const& _ps) : DBWriterWorker("Occupancy", _ps) {}
113 
114  bool run(EcalCondDBInterface*, MonRunIOV&) override;
115  };
116 
117  class SummaryWriter : public DBWriterWorker {
118  public:
121 
122  void setTaskList(int _list) { taskList_ = _list; }
123  void setOutcome(int _outcome) { outcome_ = _outcome; }
124  void setProcessedEvents(unsigned _n) { processedEvents_ = _n; }
125  bool run(EcalCondDBInterface*, MonRunIOV&) override;
126 
127  private:
129  int outcome_;
131  };
132 }
133 
134 #endif
TimingWriter(edm::ParameterSet const &_ps)
bool run(EcalCondDBInterface *, MonRunIOV &) override
PedestalWriter(edm::ParameterSet const &)
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
virtual void retrieveSource(DQMStore const &)
LedWriter(edm::ParameterSet const &)
LaserWriter(edm::ParameterSet const &)
MESetCollection source_
bool run(EcalCondDBInterface *, MonRunIOV &) override
void setTaskList(int _list)
bool run(EcalCondDBInterface *, MonRunIOV &) override
boost::ptr_map< std::string, MESet > MESetCollection
Definition: MESet.h:327
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
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)