test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
PFMETDQMAnalyzer Class Reference

#include <PFMETDQMAnalyzer.h>

Inheritance diagram for PFMETDQMAnalyzer:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 PFMETDQMAnalyzer (const edm::ParameterSet &parameterSet)
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

void analyze (edm::Event const &, edm::EventSetup const &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

std::string benchmarkLabel_
 
std::string eventInfoFolder_
 
edm::InputTag inputLabel_
 
edm::InputTag matchLabel_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
myMatchedMET_
 
edm::EDGetTokenT< edm::View
< reco::MET > > 
myMET_
 
int nBadEvents_
 
PFMETMonitor pfMETMonitor_
 
edm::ParameterSet pSet_
 
std::string subsystemname_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
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 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)
 

Detailed Description

Definition at line 15 of file PFMETDQMAnalyzer.h.

Constructor & Destructor Documentation

PFMETDQMAnalyzer::PFMETDQMAnalyzer ( const edm::ParameterSet parameterSet)

Definition at line 22 of file PFMETDQMAnalyzer.cc.

References benchmarkLabel_, eventInfoFolder_, hlt_dqm_clientPB-live_cfg::folder, edm::ParameterSet::getParameter(), inputLabel_, matchLabel_, myMatchedMET_, myMET_, nBadEvents_, edm::parameterSet(), pfMETMonitor_, pSet_, PFMETMonitor::setParameters(), AlCaHLTBitMon_QueryRunRegistry::string, and subsystemname_.

24 {
26  inputLabel_ = pSet_.getParameter<edm::InputTag>("InputCollection");
27  matchLabel_ = pSet_.getParameter<edm::InputTag>("MatchCollection");
28  benchmarkLabel_ = pSet_.getParameter<std::string>("BenchmarkLabel");
29 
30  pfMETMonitor_.setParameters(parameterSet);
31 
32  myMET_ = consumes< edm::View<reco::MET> >(inputLabel_);
33  myMatchedMET_ = consumes< edm::View<reco::MET> >(matchLabel_);
34 
35 
37 
38  subsystemname_ = "ParticleFlow" ;
40 
41  nBadEvents_ = 0;
42 
43 }
T getParameter(std::string const &) const
void setParameters(Benchmark::Mode mode, float ptmin, float ptmax, float etamin, float etamax, float phimin, float phimax, bool metSpHistos)
set the parameters locally
Definition: PFMETMonitor.cc:73
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
edm::EDGetTokenT< edm::View< reco::MET > > myMatchedMET_
edm::InputTag inputLabel_
edm::InputTag matchLabel_
PFMETMonitor pfMETMonitor_
std::string subsystemname_
std::string benchmarkLabel_
edm::ParameterSet pSet_
std::string eventInfoFolder_
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
tuple folder
Histograms Source for live online DQM in P5

Member Function Documentation

void PFMETDQMAnalyzer::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
privatevirtual

Implements edm::stream::EDAnalyzerBase.

Definition at line 64 of file PFMETDQMAnalyzer.cc.

References PFMETMonitor::fillOne(), edm::Event::getByToken(), edm::HandleBase::isValid(), MT2Analyzer::metCollection, myMatchedMET_, myMET_, and pfMETMonitor_.

65  {
67  iEvent.getByToken(myMET_, metCollection);
68 
69  edm::Handle< edm::View<reco::MET> > matchedMetCollection;
70  iEvent.getByToken(myMatchedMET_, matchedMetCollection);
71 
72  if (metCollection.isValid() && matchedMetCollection.isValid()) {
73  float maxRes = 0.0;
74  float minRes = 99.99;
75  pfMETMonitor_.fillOne( (*metCollection)[0], (*matchedMetCollection)[0], minRes, maxRes);
76 
77  }
78 }
edm::EDGetTokenT< edm::View< reco::MET > > myMET_
edm::EDGetTokenT< edm::View< reco::MET > > myMatchedMET_
PFMETMonitor pfMETMonitor_
int iEvent
Definition: GenABIO.cc:230
bool isValid() const
Definition: HandleBase.h:75
void fillOne(const reco::MET &met, const reco::MET &matchedMet, float &minVal, float &maxVal)
string metCollection
Definition: MT2Analyzer.py:466
void PFMETDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 49 of file PFMETDQMAnalyzer.cc.

References eventInfoFolder_, pfMETMonitor_, pSet_, DQMStore::IBooker::setCurrentFolder(), and PFMETMonitor::setup().

52 {
54 
55  edm::LogInfo("PFMETDQMAnalyzer") << " PFMETDQMAnalyzer::bookHistograms " << "Histogram Folder path set to " << eventInfoFolder_;
56 
57  pfMETMonitor_.setup(ibooker, pSet_);
58 }
PFMETMonitor pfMETMonitor_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:276
edm::ParameterSet pSet_
void setup(DQMStore::IBooker &b)
book histograms
std::string eventInfoFolder_

Member Data Documentation

std::string PFMETDQMAnalyzer::benchmarkLabel_
private

Definition at line 29 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

std::string PFMETDQMAnalyzer::eventInfoFolder_
private

Definition at line 34 of file PFMETDQMAnalyzer.h.

Referenced by bookHistograms(), and PFMETDQMAnalyzer().

edm::InputTag PFMETDQMAnalyzer::inputLabel_
private

Definition at line 28 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

edm::InputTag PFMETDQMAnalyzer::matchLabel_
private

Definition at line 27 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

edm::EDGetTokenT< edm::View<reco::MET> > PFMETDQMAnalyzer::myMatchedMET_
private

Definition at line 26 of file PFMETDQMAnalyzer.h.

Referenced by analyze(), and PFMETDQMAnalyzer().

edm::EDGetTokenT< edm::View<reco::MET> > PFMETDQMAnalyzer::myMET_
private

Definition at line 25 of file PFMETDQMAnalyzer.h.

Referenced by analyze(), and PFMETDQMAnalyzer().

int PFMETDQMAnalyzer::nBadEvents_
private

Definition at line 37 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().

PFMETMonitor PFMETDQMAnalyzer::pfMETMonitor_
private

Definition at line 31 of file PFMETDQMAnalyzer.h.

Referenced by analyze(), bookHistograms(), and PFMETDQMAnalyzer().

edm::ParameterSet PFMETDQMAnalyzer::pSet_
private

Definition at line 33 of file PFMETDQMAnalyzer.h.

Referenced by bookHistograms(), and PFMETDQMAnalyzer().

std::string PFMETDQMAnalyzer::subsystemname_
private

Definition at line 35 of file PFMETDQMAnalyzer.h.

Referenced by PFMETDQMAnalyzer().