CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
DQMOfflineHLTEventInfoClient Class Reference

#include <DQMOfflineHLTEventInfoClient.h>

Inheritance diagram for DQMOfflineHLTEventInfoClient:
edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 DQMOfflineHLTEventInfoClient (const edm::ParameterSet &ps)
 Constructor. More...
 
 ~DQMOfflineHLTEventInfoClient () override
 Destructor. More...
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::SharedResources, edm::one::WatchRuns >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const *> *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const *> const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 Fake Analyze. More...
 
void beginJob () override
 BeginJob. More...
 
void beginRun (const edm::Run &r, const edm::EventSetup &c) override
 BeginRun. More...
 
void endRun (const edm::Run &r, const edm::EventSetup &c) override
 EndRun. More...
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Private Member Functions

void initialize ()
 

Private Attributes

MonitorElementCertificationSummary_
 
std::vector< MonitorElement * > CertificationSummaryContent_
 
MonitorElementCertificationSummaryMap_
 
int counterEvt_
 counter More...
 
int counterLS_
 
DQMStoredbe_
 
edm::ParameterSet parameters_
 
int prescaleEvt_
 units of lumi sections More...
 
int prescaleLS_
 counter More...
 
MonitorElementreportSummary_
 prescale on number of events More...
 
std::vector< MonitorElement * > reportSummaryContent_
 
MonitorElementreportSummaryMap_
 
bool verbose_
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Detailed Description

Definition at line 20 of file DQMOfflineHLTEventInfoClient.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 23 of file DQMOfflineHLTEventInfoClient.h.

◆ MonitorElement

Definition at line 22 of file DQMOfflineHLTEventInfoClient.h.

Constructor & Destructor Documentation

◆ DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::DQMOfflineHLTEventInfoClient ( const edm::ParameterSet ps)

Constructor.

Definition at line 82 of file DQMOfflineHLTEventInfoClient.cc.

References initialize().

82  {
83  usesResource("DQMStore");
84  parameters_ = ps;
85  initialize();
86 }

◆ ~DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 88 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

88  {
89  if (verbose_)
90  cout << "[TriggerDQM]: ending... " << endl;
91 }

Member Function Documentation

◆ analyze()

void DQMOfflineHLTEventInfoClient::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotectedvirtual

Fake Analyze.

Implements edm::one::EDAnalyzerBase.

Definition at line 173 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

173  {
174  counterEvt_++;
175  if (prescaleEvt_ < 1)
176  return;
177  if (prescaleEvt_ > 0 && counterEvt_ % prescaleEvt_ != 0)
178  return;
179 
180  if (verbose_)
181  cout << "DQMOfflineHLTEventInfoClient::analyze" << endl;
182 }
int prescaleEvt_
units of lumi sections

◆ beginJob()

void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 116 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout, and Utilities::operator.

116  {
117  if (verbose_)
118  cout << "[TriggerDQM]: Begin Job" << endl;
119  // get backendinterface
121 
122  dbe_->setCurrentFolder("HLT/EventInfo");
123 
124  reportSummary_ = dbe_->bookFloat("reportSummary");
125  //initialize reportSummary to 1
126  if (reportSummary_)
127  reportSummary_->Fill(1);
128 
129  // CertificationSummary
130  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
131  //initialize CertificationSummary to 1
134 
135  //initialize reportSummary to 1
136  if (reportSummary_)
137  reportSummary_->Fill(1);
138 
139  // OK HERE
140 
141  // reportSummaryMap
142  dbe_->setCurrentFolder("HLT/EventInfo");
143 
144  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
147  reportSummaryMap_->setBinLabel(1, "Muon", 2);
148  reportSummaryMap_->setBinLabel(2, "Electron", 2);
149  reportSummaryMap_->setBinLabel(3, "Photon", 2);
150  reportSummaryMap_->setBinLabel(4, "JetMET", 2);
151  reportSummaryMap_->setBinLabel(5, "BJet", 2);
152  reportSummaryMap_->setBinLabel(6, "Tau", 2);
153  reportSummaryMap_->setBinLabel(1, " ", 1);
154 
155  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
158  CertificationSummaryMap_->setBinLabel(1, "Muon", 2);
159  CertificationSummaryMap_->setBinLabel(2, "Electron", 2);
160  CertificationSummaryMap_->setBinLabel(3, "Photon", 2);
161  CertificationSummaryMap_->setBinLabel(4, "JetMET", 2);
162  CertificationSummaryMap_->setBinLabel(5, "BJet", 2);
165 }
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
Definition: DQMStore.h:80
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
void Fill(long long x)
virtual void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * reportSummary_
prescale on number of events
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
virtual void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

◆ beginRun()

void DQMOfflineHLTEventInfoClient::beginRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

BeginRun.

Definition at line 168 of file DQMOfflineHLTEventInfoClient.cc.

168 {}

◆ endRun()

void DQMOfflineHLTEventInfoClient::endRun ( const edm::Run r,
const edm::EventSetup c 
)
overrideprotected

EndRun.

Definition at line 185 of file DQMOfflineHLTEventInfoClient.cc.

References dqm::impl::MonitorElement::Fill(), dqm::impl::MonitorElement::getFloatValue(), and visualization-live-secondInstance_cfg::m.

185  {
186  float summarySum = 0;
187  float reportSummary = 0;
188 
189  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
190  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
191  if (HLT_Muon)
192  reportSummaryContent_.push_back(HLT_Muon);
193 
194  MonitorElement* HLT_Electron = dbe_->get("HLT_Electron");
195  if (HLT_Electron)
196  reportSummaryContent_.push_back(HLT_Electron);
197 
198  MonitorElement* HLT_Photon = dbe_->get("HLT_Photon");
199  if (HLT_Photon)
200  reportSummaryContent_.push_back(HLT_Photon);
201 
202  MonitorElement* HLT_Tau = dbe_->get("HLT_Tau");
203  if (HLT_Tau)
204  reportSummaryContent_.push_back(HLT_Tau);
205 
206  int nSubsystems = reportSummaryContent_.size();
207 
208  for (int m = 0; m < nSubsystems; m++) {
209  summarySum += (reportSummaryContent_[m])->getFloatValue();
210  }
211 
212  if (nSubsystems > 0) {
213  reportSummary = summarySum / nSubsystems;
214  ;
215  } else {
216  reportSummary = 1;
217  }
218 
219  reportSummary_->Fill(reportSummary);
220  CertificationSummary_->Fill(reportSummary);
221 
222  float muonValue = 1;
223  if (HLT_Muon)
224  muonValue = HLT_Muon->getFloatValue();
225 
226  float electronValue = 1;
227  if (HLT_Electron)
228  electronValue = HLT_Electron->getFloatValue();
229 
230  float photonValue = 1;
231  if (HLT_Photon)
232  photonValue = HLT_Photon->getFloatValue();
233 
234  float tauValue = 1;
235  if (HLT_Tau)
236  tauValue = HLT_Tau->getFloatValue();
237 
238  reportSummaryMap_->setBinContent(1, 1, muonValue); //Muon
239  reportSummaryMap_->setBinContent(1, 2, electronValue); //Electron
240  reportSummaryMap_->setBinContent(1, 3, photonValue); //Photon
241  reportSummaryMap_->setBinContent(1, 4, 1); //JetMET
242  reportSummaryMap_->setBinContent(1, 5, 1); //BJet
243  reportSummaryMap_->setBinContent(1, 6, tauValue); //Tau
244 
245  CertificationSummaryMap_->setBinContent(1, 1, muonValue); //Muon
246  CertificationSummaryMap_->setBinContent(1, 2, electronValue); //Electron
247  CertificationSummaryMap_->setBinContent(1, 3, photonValue); //Photon
248  CertificationSummaryMap_->setBinContent(1, 4, 1); //JetMET
249  CertificationSummaryMap_->setBinContent(1, 5, 1); //BJet
250  CertificationSummaryMap_->setBinContent(1, 6, tauValue); //Tau
251 }
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:646
void Fill(long long x)
std::vector< MonitorElement * > reportSummaryContent_
virtual double getFloatValue() const
virtual void setBinContent(int binx, double content)
set content of bin (1-D)
MonitorElement * reportSummary_
prescale on number of events
virtual MonitorElement * get(std::string const &fullpath) const
Definition: DQMStore.cc:697

◆ initialize()

void DQMOfflineHLTEventInfoClient::initialize ( )
private

Definition at line 94 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout, and Utilities::operator.

94  {
95  counterLS_ = 0;
96  counterEvt_ = 0;
97 
98  // get back-end interface
100 
101  // base folder for the contents of this job
102  verbose_ = parameters_.getUntrackedParameter<bool>("verbose", false);
103 
104  prescaleLS_ = parameters_.getUntrackedParameter<int>("prescaleLS", -1);
105  if (verbose_)
106  cout << "DQM lumi section prescale = " << prescaleLS_ << " lumi section(s)" << endl;
107 
108  prescaleEvt_ = parameters_.getUntrackedParameter<int>("prescaleEvt", -1);
109  if (verbose_)
110  cout << "DQM event prescale = " << prescaleEvt_ << " events(s)" << endl;
111  /*
112  */
113 }
int prescaleEvt_
units of lumi sections
T getUntrackedParameter(std::string const &, T const &) const

Member Data Documentation

◆ CertificationSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummary_
private

Definition at line 60 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryContent_

std::vector<MonitorElement*> DQMOfflineHLTEventInfoClient::CertificationSummaryContent_
private

Definition at line 61 of file DQMOfflineHLTEventInfoClient.h.

◆ CertificationSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::CertificationSummaryMap_
private

Definition at line 62 of file DQMOfflineHLTEventInfoClient.h.

◆ counterEvt_

int DQMOfflineHLTEventInfoClient::counterEvt_
private

counter

Definition at line 51 of file DQMOfflineHLTEventInfoClient.h.

◆ counterLS_

int DQMOfflineHLTEventInfoClient::counterLS_
private

Definition at line 50 of file DQMOfflineHLTEventInfoClient.h.

◆ dbe_

DQMStore* DQMOfflineHLTEventInfoClient::dbe_
private

Definition at line 48 of file DQMOfflineHLTEventInfoClient.h.

◆ parameters_

edm::ParameterSet DQMOfflineHLTEventInfoClient::parameters_
private

◆ prescaleEvt_

int DQMOfflineHLTEventInfoClient::prescaleEvt_
private

units of lumi sections

Definition at line 53 of file DQMOfflineHLTEventInfoClient.h.

◆ prescaleLS_

int DQMOfflineHLTEventInfoClient::prescaleLS_
private

counter

Definition at line 52 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummary_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummary_
private

prescale on number of events

Definition at line 56 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryContent_

std::vector<MonitorElement*> DQMOfflineHLTEventInfoClient::reportSummaryContent_
private

Definition at line 57 of file DQMOfflineHLTEventInfoClient.h.

◆ reportSummaryMap_

MonitorElement* DQMOfflineHLTEventInfoClient::reportSummaryMap_
private

Definition at line 58 of file DQMOfflineHLTEventInfoClient.h.

◆ verbose_

bool DQMOfflineHLTEventInfoClient::verbose_
private

Definition at line 49 of file DQMOfflineHLTEventInfoClient.h.