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::EDAnalyzer edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer 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::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
 ~EDAnalyzer () 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::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsInputProcessBlocks ()
 
static bool wantsProcessBlocks ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 

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().

◆ ~DQMOfflineHLTEventInfoClient()

DQMOfflineHLTEventInfoClient::~DQMOfflineHLTEventInfoClient ( )
override

Destructor.

Definition at line 87 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

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

Member Function Documentation

◆ analyze()

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

Fake Analyze.

Implements edm::EDAnalyzer.

Definition at line 172 of file DQMOfflineHLTEventInfoClient.cc.

References gather_cfg::cout.

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

◆ beginJob()

void DQMOfflineHLTEventInfoClient::beginJob ( void  )
overrideprotectedvirtual

BeginJob.

Reimplemented from edm::EDAnalyzer.

Definition at line 115 of file DQMOfflineHLTEventInfoClient.cc.

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

115  {
116  if (verbose_)
117  cout << "[TriggerDQM]: Begin Job" << endl;
118  // get backendinterface
120 
121  dbe_->setCurrentFolder("HLT/EventInfo");
122 
123  reportSummary_ = dbe_->bookFloat("reportSummary");
124  //initialize reportSummary to 1
125  if (reportSummary_)
126  reportSummary_->Fill(1);
127 
128  // CertificationSummary
129  CertificationSummary_ = dbe_->bookFloat("CertificationSummary");
130  //initialize CertificationSummary to 1
133 
134  //initialize reportSummary to 1
135  if (reportSummary_)
136  reportSummary_->Fill(1);
137 
138  // OK HERE
139 
140  // reportSummaryMap
141  dbe_->setCurrentFolder("HLT/EventInfo");
142 
143  reportSummaryMap_ = dbe_->book2D("reportSummaryMap", "reportSummaryMap", 1, 1, 2, 6, 1, 7);
146  reportSummaryMap_->setBinLabel(1, "Muon", 2);
147  reportSummaryMap_->setBinLabel(2, "Electron", 2);
148  reportSummaryMap_->setBinLabel(3, "Photon", 2);
149  reportSummaryMap_->setBinLabel(4, "JetMET", 2);
150  reportSummaryMap_->setBinLabel(5, "BJet", 2);
151  reportSummaryMap_->setBinLabel(6, "Tau", 2);
152  reportSummaryMap_->setBinLabel(1, " ", 1);
153 
154  CertificationSummaryMap_ = dbe_->book2D("CertificationSummaryMap", "CertificationSummaryMap", 1, 1, 2, 6, 1, 7);
157  CertificationSummaryMap_->setBinLabel(1, "Muon", 2);
158  CertificationSummaryMap_->setBinLabel(2, "Electron", 2);
159  CertificationSummaryMap_->setBinLabel(3, "Photon", 2);
160  CertificationSummaryMap_->setBinLabel(4, "JetMET", 2);
161  CertificationSummaryMap_->setBinLabel(5, "BJet", 2);
164 }
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 
)
overrideprotectedvirtual

BeginRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 167 of file DQMOfflineHLTEventInfoClient.cc.

167 {}

◆ endRun()

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

EndRun.

Reimplemented from edm::EDAnalyzer.

Definition at line 184 of file DQMOfflineHLTEventInfoClient.cc.

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

184  {
185  float summarySum = 0;
186  float reportSummary = 0;
187 
188  dbe_->setCurrentFolder("HLT/EventInfo/reportSummaryContents");
189  MonitorElement* HLT_Muon = dbe_->get("HLT_Muon");
190  if (HLT_Muon)
191  reportSummaryContent_.push_back(HLT_Muon);
192 
193  MonitorElement* HLT_Electron = dbe_->get("HLT_Electron");
194  if (HLT_Electron)
195  reportSummaryContent_.push_back(HLT_Electron);
196 
197  MonitorElement* HLT_Photon = dbe_->get("HLT_Photon");
198  if (HLT_Photon)
199  reportSummaryContent_.push_back(HLT_Photon);
200 
201  MonitorElement* HLT_Tau = dbe_->get("HLT_Tau");
202  if (HLT_Tau)
203  reportSummaryContent_.push_back(HLT_Tau);
204 
205  int nSubsystems = reportSummaryContent_.size();
206 
207  for (int m = 0; m < nSubsystems; m++) {
208  summarySum += (reportSummaryContent_[m])->getFloatValue();
209  }
210 
211  if (nSubsystems > 0) {
212  reportSummary = summarySum / nSubsystems;
213  ;
214  } else {
215  reportSummary = 1;
216  }
217 
218  reportSummary_->Fill(reportSummary);
219  CertificationSummary_->Fill(reportSummary);
220 
221  float muonValue = 1;
222  if (HLT_Muon)
223  muonValue = HLT_Muon->getFloatValue();
224 
225  float electronValue = 1;
226  if (HLT_Electron)
227  electronValue = HLT_Electron->getFloatValue();
228 
229  float photonValue = 1;
230  if (HLT_Photon)
231  photonValue = HLT_Photon->getFloatValue();
232 
233  float tauValue = 1;
234  if (HLT_Tau)
235  tauValue = HLT_Tau->getFloatValue();
236 
237  reportSummaryMap_->setBinContent(1, 1, muonValue); //Muon
238  reportSummaryMap_->setBinContent(1, 2, electronValue); //Electron
239  reportSummaryMap_->setBinContent(1, 3, photonValue); //Photon
240  reportSummaryMap_->setBinContent(1, 4, 1); //JetMET
241  reportSummaryMap_->setBinContent(1, 5, 1); //BJet
242  reportSummaryMap_->setBinContent(1, 6, tauValue); //Tau
243 
244  CertificationSummaryMap_->setBinContent(1, 1, muonValue); //Muon
245  CertificationSummaryMap_->setBinContent(1, 2, electronValue); //Electron
246  CertificationSummaryMap_->setBinContent(1, 3, photonValue); //Photon
247  CertificationSummaryMap_->setBinContent(1, 4, 1); //JetMET
248  CertificationSummaryMap_->setBinContent(1, 5, 1); //BJet
249  CertificationSummaryMap_->setBinContent(1, 6, tauValue); //Tau
250 }
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:690

◆ initialize()

void DQMOfflineHLTEventInfoClient::initialize ( )
private

Definition at line 93 of file DQMOfflineHLTEventInfoClient.cc.

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

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