CMS 3D CMS Logo

List of all members | 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 Member Functions

void fill (const ObjType &obj, const edm::Event &event, const edm::EventSetup &setup, const VarRangeCutColl< ObjType > &globalRangeCuts) override
 
 HLTDQMHist2D (TH2 *hist, 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

TH2 * hist_
 
VarRangeCutColl< ObjType > localRangeCuts_
 
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 68 of file HLTDQMHist.h.

Constructor & Destructor Documentation

template<typename ObjType , typename XValType , typename YValType = XValType>
HLTDQMHist2D< ObjType, XValType, YValType >::HLTDQMHist2D ( TH2 *  hist,
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 70 of file HLTDQMHist.h.

73  :
74  xVar_(std::move(xFunc)),yVar_(std::move(yFunc)),
75  xVarName_(std::move(xVarName)),yVarName_(std::move(yVarName)),
76  localRangeCuts_(std::move(rangeCuts)),hist_(hist){}
std::string yVarName_
Definition: HLTDQMHist.h:91
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:88
TH2 * hist_
Definition: HLTDQMHist.h:93
std::string xVarName_
Definition: HLTDQMHist.h:90
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:89
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:92
def move(src, dest)
Definition: eostools.py:510

Member Function Documentation

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 78 of file HLTDQMHist.h.

79  {
80  //local range cuts are specific to a histogram so dont ignore variables
81  //like global ones (all local cuts should be approprate to the histogram in question
82  if(globalRangeCuts(obj,std::vector<std::string>{xVarName_,yVarName_}) &&
84  hist_->Fill(xVar_(obj),yVar_(obj));
85  }
86  }
std::string yVarName_
Definition: HLTDQMHist.h:91
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:88
TH2 * hist_
Definition: HLTDQMHist.h:93
std::string xVarName_
Definition: HLTDQMHist.h:90
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:89
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:92

Member Data Documentation

template<typename ObjType , typename XValType , typename YValType = XValType>
TH2* HLTDQMHist2D< ObjType, XValType, YValType >::hist_
private

Definition at line 93 of file HLTDQMHist.h.

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

Definition at line 92 of file HLTDQMHist.h.

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

Definition at line 88 of file HLTDQMHist.h.

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

Definition at line 90 of file HLTDQMHist.h.

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

Definition at line 89 of file HLTDQMHist.h.

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

Definition at line 91 of file HLTDQMHist.h.