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

79  :
80  xVar_(std::move(xFunc)),yVar_(std::move(yFunc)),
81  xVarName_(std::move(xVarName)),yVarName_(std::move(yVarName)),
82  localRangeCuts_(std::move(rangeCuts)),hist_(hist){}
std::string yVarName_
Definition: HLTDQMHist.h:97
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:94
TH2 * hist_
Definition: HLTDQMHist.h:99
std::string xVarName_
Definition: HLTDQMHist.h:96
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:95
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:98
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 84 of file HLTDQMHist.h.

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

Member Data Documentation

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

Definition at line 99 of file HLTDQMHist.h.

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

Definition at line 98 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 94 of file HLTDQMHist.h.

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

Definition at line 96 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 95 of file HLTDQMHist.h.

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

Definition at line 97 of file HLTDQMHist.h.