CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
HLTDQMHist2D< ObjType, XValType, YValType > Class Template Reference

#include <HLTDQMHist.h>

Inheritance diagram for HLTDQMHist2D< ObjType, XValType, YValType >:
HLTDQMHist< ObjType >

Public Types

typedef dqm::legacy::MonitorElement MonitorElement
 

Public Member Functions

void fill (const ObjType &obj, const edm::Event &event, const edm::EventSetup &setup, const VarRangeCutColl< ObjType > &globalRangeCuts) override
 
 HLTDQMHist2D (MonitorElement *me_ptr, std::string xVarName, std::string yVarName, std::function< XValType(const ObjType &)> xFunc, std::function< YValType(const ObjType &)> yFunc, VarRangeCutColl< ObjType > rangeCuts)
 
- Public Member Functions inherited from HLTDQMHist< ObjType >
 HLTDQMHist ()=default
 
virtual ~HLTDQMHist ()=default
 

Private Attributes

VarRangeCutColl< ObjType > localRangeCuts_
 
MonitorElement *const me_ptr_
 
std::function< XValType(const ObjType &)> xVar_
 
std::string xVarName_
 
std::function< YValType(const ObjType &)> yVar_
 
std::string yVarName_
 

Detailed Description

template<typename ObjType, typename XValType, typename YValType = XValType>
class HLTDQMHist2D< ObjType, XValType, YValType >

Definition at line 80 of file HLTDQMHist.h.

Member Typedef Documentation

◆ MonitorElement

template<typename ObjType , typename XValType , typename YValType = XValType>
typedef dqm::legacy::MonitorElement HLTDQMHist2D< ObjType, XValType, YValType >::MonitorElement

Definition at line 82 of file HLTDQMHist.h.

Constructor & Destructor Documentation

◆ HLTDQMHist2D()

template<typename ObjType , typename XValType , typename YValType = XValType>
HLTDQMHist2D< ObjType, XValType, YValType >::HLTDQMHist2D ( MonitorElement me_ptr,
std::string  xVarName,
std::string  yVarName,
std::function< XValType(const ObjType &)>  xFunc,
std::function< YValType(const ObjType &)>  yFunc,
VarRangeCutColl< ObjType >  rangeCuts 
)
inline

Definition at line 84 of file HLTDQMHist.h.

90  : xVar_(std::move(xFunc)),
91  yVar_(std::move(yFunc)),
92  xVarName_(std::move(xVarName)),
93  yVarName_(std::move(yVarName)),
95  me_ptr_(me_ptr) {}
std::string yVarName_
Definition: HLTDQMHist.h:114
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:111
MonitorElement *const me_ptr_
Definition: HLTDQMHist.h:116
std::string xVarName_
Definition: HLTDQMHist.h:113
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:112
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:115
def move(src, dest)
Definition: eostools.py:511

Member Function Documentation

◆ fill()

template<typename ObjType , typename XValType , typename YValType = XValType>
void HLTDQMHist2D< ObjType, XValType, YValType >::fill ( const ObjType &  obj,
const edm::Event event,
const edm::EventSetup setup,
const VarRangeCutColl< ObjType > &  globalRangeCuts 
)
inlineoverridevirtual

Implements HLTDQMHist< ObjType >.

Definition at line 97 of file HLTDQMHist.h.

References dqm::impl::MonitorElement::Fill(), HLTDQMHist2D< ObjType, XValType, YValType >::localRangeCuts_, HLTDQMHist2D< ObjType, XValType, YValType >::me_ptr_, getGTfromDQMFile::obj, HLTDQMHist2D< ObjType, XValType, YValType >::xVar_, HLTDQMHist2D< ObjType, XValType, YValType >::xVarName_, HLTDQMHist2D< ObjType, XValType, YValType >::yVar_, and HLTDQMHist2D< ObjType, XValType, YValType >::yVarName_.

100  {
101  if (me_ptr_ == nullptr)
102  return;
103  //local range cuts are specific to a MonitorElement so dont ignore variables
104  //like global ones (all local cuts should be appropriate to the MonitorElement in question
105  if (globalRangeCuts(obj, std::vector<std::string>{xVarName_, yVarName_}) && localRangeCuts_(obj)) {
106  me_ptr_->Fill(xVar_(obj), yVar_(obj));
107  }
108  }
std::string yVarName_
Definition: HLTDQMHist.h:114
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:111
void Fill(long long x)
MonitorElement *const me_ptr_
Definition: HLTDQMHist.h:116
std::string xVarName_
Definition: HLTDQMHist.h:113
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:112
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:115

Member Data Documentation

◆ localRangeCuts_

template<typename ObjType , typename XValType , typename YValType = XValType>
VarRangeCutColl<ObjType> HLTDQMHist2D< ObjType, XValType, YValType >::localRangeCuts_
private

Definition at line 115 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().

◆ me_ptr_

template<typename ObjType , typename XValType , typename YValType = XValType>
MonitorElement* const HLTDQMHist2D< ObjType, XValType, YValType >::me_ptr_
private

Definition at line 116 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().

◆ xVar_

template<typename ObjType , typename XValType , typename YValType = XValType>
std::function<XValType(const ObjType&)> HLTDQMHist2D< ObjType, XValType, YValType >::xVar_
private

Definition at line 111 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().

◆ xVarName_

template<typename ObjType , typename XValType , typename YValType = XValType>
std::string HLTDQMHist2D< ObjType, XValType, YValType >::xVarName_
private

Definition at line 113 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().

◆ yVar_

template<typename ObjType , typename XValType , typename YValType = XValType>
std::function<YValType(const ObjType&)> HLTDQMHist2D< ObjType, XValType, YValType >::yVar_
private

Definition at line 112 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().

◆ yVarName_

template<typename ObjType , typename XValType , typename YValType = XValType>
std::string HLTDQMHist2D< ObjType, XValType, YValType >::yVarName_
private

Definition at line 114 of file HLTDQMHist.h.

Referenced by HLTDQMHist2D< ObjType, XValType, YValType >::fill().