test
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 
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) {}
45 
46  bool run(EcalCondDBInterface*, MonRunIOV&) override;
47  };
48 
49  class LaserWriter : public DBWriterWorker {
50  public:
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:
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) {}
76 
77  bool run(EcalCondDBInterface*, MonRunIOV&) override;
78  };
79 
81  public:
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) {}
96 
97  bool run(EcalCondDBInterface*, MonRunIOV&) override;
98  };
99 
100  class LedWriter : public DBWriterWorker {
101  public:
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) {}
115 
116  bool run(EcalCondDBInterface*, MonRunIOV&) override;
117  };
118 
119  class SummaryWriter : public DBWriterWorker {
120  public:
123 
124  void setTaskList(int _list) { taskList_ = _list; }
125  void setOutcome(int _outcome) { outcome_ = _outcome; }
126  void setProcessedEvents(unsigned _n) { processedEvents_ = _n; }
127  bool run(EcalCondDBInterface*, MonRunIOV&) override;
128 
129  private:
131  int outcome_;
133  };
134 }
135 
136 #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
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:326
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)