CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 79 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 81 of file HLTDQMHist.h.

87  : xVar_(std::move(xFunc)),
88  yVar_(std::move(yFunc)),
89  xVarName_(std::move(xVarName)),
90  yVarName_(std::move(yVarName)),
91  localRangeCuts_(std::move(rangeCuts)),
92  hist_(hist) {}
std::string yVarName_
Definition: HLTDQMHist.h:109
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:106
def move
Definition: eostools.py:511
__shared__ Hist hist
std::string xVarName_
Definition: HLTDQMHist.h:108
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:107
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:110

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

References HLTDQMHist2D< ObjType, XValType, YValType >::hist_, HLTDQMHist2D< ObjType, XValType, YValType >::localRangeCuts_, HLTDQMHist2D< ObjType, XValType, YValType >::xVar_, HLTDQMHist2D< ObjType, XValType, YValType >::xVarName_, HLTDQMHist2D< ObjType, XValType, YValType >::yVar_, and HLTDQMHist2D< ObjType, XValType, YValType >::yVarName_.

97  {
98  //local range cuts are specific to a histogram so dont ignore variables
99  //like global ones (all local cuts should be approprate to the histogram in question
100  if (globalRangeCuts(obj, std::vector<std::string>{xVarName_, yVarName_}) && localRangeCuts_(obj)) {
101  hist_->Fill(xVar_(obj), yVar_(obj));
102  }
103  }
std::string yVarName_
Definition: HLTDQMHist.h:109
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:106
std::string xVarName_
Definition: HLTDQMHist.h:108
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:107
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:110

Member Data Documentation

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

Definition at line 111 of file HLTDQMHist.h.

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

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

Definition at line 110 of file HLTDQMHist.h.

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

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

Definition at line 106 of file HLTDQMHist.h.

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

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

Definition at line 108 of file HLTDQMHist.h.

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

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

Definition at line 107 of file HLTDQMHist.h.

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

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

Definition at line 109 of file HLTDQMHist.h.

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