CMS 3D CMS Logo

DQWorkerClient.h
Go to the documentation of this file.
1 #ifndef DQWorkerClient_H
2 #define DQWorkerClient_H
3 
4 #include <utility>
5 
8 
9 class DetId;
10 namespace edm {
11  class ConsumesCollector;
12 } // namespace edm
13 
14 namespace ecaldqm {
15  class StatusManager;
16 
17  class DQWorkerClient : public DQWorker {
18  public:
20 
22  ~DQWorkerClient() override {}
23 
25 
26  void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) override;
27  void resetPerLumi();
28 
29  void bookMEs(DQMStore::IBooker&) override;
30  void releaseMEs() override;
31 
32  void releaseSource();
34 
35  bool runsOn(ProcessType _type) const { return _type == kJob || hasLumiPlots_; }
36  virtual void resetMEs();
37  virtual void producePlots(ProcessType) = 0;
38 
39  // mechanisms to register EDGetTokens for any additional objects used internally
41 
42  void setStatusManager(StatusManager const& _manager) { statusManager_ = &_manager; }
43 
44  enum Quality { kBad = 0, kGood = 1, kUnknown = 2, kMBad = 3, kMGood = 4, kMUnknown = 5 };
45 
46  protected:
47  void setME(edm::ParameterSet const& _ps) final;
48  void setSource(edm::ParameterSet const&) override;
49 
50  bool using_(std::string const& _name, ProcessType _type = kJob) const {
52  if (itr == sources_.end())
53  return false;
54  if (_type == kJob)
55  return true;
56  else
57  return itr->second->getLumiFlag();
58  }
59 
60  void towerAverage_(MESet&, MESet const&, float);
61 
63  std::set<std::string> qualitySummaries_;
64 
66 
68  };
69 } // namespace ecaldqm
70 #endif
ecaldqm::DQWorkerClient::Quality
Quality
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::using_
bool using_(std::string const &_name, ProcessType _type=kJob) const
Definition: DQWorkerClient.h:50
ecaldqm::DQWorkerClient::setSource
void setSource(edm::ParameterSet const &) override
Definition: DQWorkerClient.cc:47
ecaldqm::DQWorkerClient::setME
void setME(edm::ParameterSet const &_ps) final
Definition: DQWorkerClient.cc:33
ecaldqm::DQWorkerClient::retrieveSource
bool retrieveSource(DQMStore::IGetter &, ProcessType)
Definition: DQWorkerClient.cc:96
ecaldqm
Definition: DQWorker.h:37
ecaldqm::DQWorkerClient::fillDescriptions
static void fillDescriptions(edm::ParameterSetDescription &)
Definition: DQWorkerClient.cc:21
ecaldqm::MESetCollection::const_iterator
MESetColletionType::const_iterator const_iterator
Definition: MESet.h:385
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm
HLT enums.
Definition: AlignableModifier.h:19
ecaldqm::MESetCollection::find
const_iterator find(const std::string &key) const
Definition: MESet.h:395
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
ecaldqm::DQWorkerClient::statusManager_
StatusManager const * statusManager_
Definition: DQWorkerClient.h:67
ecaldqm::DQWorkerClient::producePlots
virtual void producePlots(ProcessType)=0
ecaldqm::DQWorkerClient::endLuminosityBlock
void endLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
Definition: DQWorkerClient.cc:70
ecaldqm::DQWorkerClient::bookMEs
void bookMEs(DQMStore::IBooker &) override
Definition: DQWorkerClient.cc:81
ecaldqm::DQWorkerClient::hasLumiPlots_
bool hasLumiPlots_
Definition: DQWorkerClient.h:65
ecaldqm::DQWorkerClient::~DQWorkerClient
~DQWorkerClient() override
Definition: DQWorkerClient.h:22
ecaldqm::DQWorkerClient::setStatusManager
void setStatusManager(StatusManager const &_manager)
Definition: DQWorkerClient.h:42
ecaldqm::DQWorker
Definition: DQWorker.h:41
DetId
Definition: DetId.h:17
ecaldqm::MESetCollection::end
auto end() const
Definition: MESet.h:393
ecaldqm::DQWorkerClient::qualitySummaries_
std::set< std::string > qualitySummaries_
Definition: DQWorkerClient.h:63
ecaldqm::DQWorkerClient::kJob
Definition: DQWorkerClient.h:19
ecaldqm::DQWorkerClient::ProcessType
ProcessType
Definition: DQWorkerClient.h:19
ecaldqm::DQWorkerClient::kLumi
Definition: DQWorkerClient.h:19
ecaldqm::DQWorkerClient::resetMEs
virtual void resetMEs()
Definition: DQWorkerClient.cc:113
ecaldqm::DQWorkerClient::kMBad
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::kUnknown
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::kBad
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::setTokens
virtual void setTokens(edm::ConsumesCollector &)
Definition: DQWorkerClient.h:40
ecaldqm::DQWorkerClient::sources_
MESetCollection sources_
Definition: DQWorkerClient.h:62
ecaldqm::DQWorkerClient::kMGood
Definition: DQWorkerClient.h:44
edm::ParameterSet
Definition: ParameterSet.h:47
ecaldqm::MESetCollection
Definition: MESet.h:380
ecaldqm::DQWorkerClient::runsOn
bool runsOn(ProcessType _type) const
Definition: DQWorkerClient.h:35
ecaldqm::DQWorkerClient::nProcessType
Definition: DQWorkerClient.h:19
ecaldqm::DQWorkerClient::kMUnknown
Definition: DQWorkerClient.h:44
DQWorker.h
ecaldqm::DQWorkerClient::DQWorkerClient
DQWorkerClient()
Definition: DQWorkerClient.cc:17
edm::EventSetup
Definition: EventSetup.h:58
ecaldqm::DQWorkerClient
Definition: DQWorkerClient.h:17
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ecaldqm::StatusManager
Definition: StatusManager.h:16
dqm::implementation::IGetter
Definition: DQMStore.h:484
ecaldqm::DQWorkerClient::towerAverage_
void towerAverage_(MESet &, MESet const &, float)
Definition: DQWorkerClient.cc:159
ecaldqm::DQWorkerClient::kGood
Definition: DQWorkerClient.h:44
ecaldqm::DQWorkerClient::releaseMEs
void releaseMEs() override
Definition: DQWorkerClient.cc:86
dqm::implementation::IBooker
Definition: DQMStore.h:43
ecaldqm::DQWorkerClient::resetPerLumi
void resetPerLumi()
Definition: DQWorkerClient.cc:145
ConsumesCollector.h
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
ecaldqm::DQWorkerClient::releaseSource
void releaseSource()
Definition: DQWorkerClient.cc:91
ecaldqm::MESet
Definition: MESet.h:42