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

Constructor & Destructor Documentation

◆ HLTDQMHist2D()

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)),
92  hist_(hist) {}

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

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  }

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

Member Data Documentation

◆ hist_

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().

◆ localRangeCuts_

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().

◆ xVar_

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().

◆ xVarName_

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().

◆ yVar_

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().

◆ yVarName_

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().

HLTDQMHist2D::yVar_
std::function< YValType(const ObjType &)> yVar_
Definition: HLTDQMHist.h:107
HLTDQMHist2D::hist_
TH2 * hist_
Definition: HLTDQMHist.h:111
compare.hist
hist
Definition: compare.py:376
HLTDQMHist2D::localRangeCuts_
VarRangeCutColl< ObjType > localRangeCuts_
Definition: HLTDQMHist.h:110
getGTfromDQMFile.obj
obj
Definition: getGTfromDQMFile.py:32
HLTDQMHist2D::yVarName_
std::string yVarName_
Definition: HLTDQMHist.h:109
eostools.move
def move(src, dest)
Definition: eostools.py:511
B2GTnPMonitor_cfi.rangeCuts
rangeCuts
Definition: B2GTnPMonitor_cfi.py:64
HLTDQMHist2D::xVarName_
std::string xVarName_
Definition: HLTDQMHist.h:108
HLTDQMHist2D::xVar_
std::function< XValType(const ObjType &)> xVar_
Definition: HLTDQMHist.h:106