1 #ifndef DQMOnline_Trigger_HLTDQMHist_h 2 #define DQMOnline_Trigger_HLTDQMHist_h 30 template <
typename ObjType>
44 template <
typename ObjType,
typename ValType>
50 var_(
func),varName_(varName),localRangeCuts_(rangeCuts),hist_(hist){}
56 if(globalRangeCuts(obj,varName_) && localRangeCuts_(obj)){
57 hist_->Fill(var_(obj));
61 std::function<ValType(const ObjType&)>
var_;
67 template <
typename ObjType,
typename XValType,
typename YValType=XValType>
74 xVar_(xFunc),yVar_(yFunc),
75 xVarName_(xVarName),yVarName_(yVarName),
76 localRangeCuts_(rangeCuts),hist_(hist){}
82 if(globalRangeCuts(obj,std::vector<std::string>{xVarName_,yVarName_}) &&
83 localRangeCuts_(obj)){
84 hist_->Fill(xVar_(obj),yVar_(obj));
88 std::function<XValType(const ObjType&)>
xVar_;
89 std::function<YValType(const ObjType&)>
yVar_;
virtual void fill(const ObjType &objType, const edm::Event &event, const edm::EventSetup &setup, const VarRangeCutColl< ObjType > &rangeCuts)=0
def setup(process, global_tag, zero_tesla=False)
virtual ~HLTDQMHist()=default
std::function< XValType(const ObjType &)> xVar_
std::function< ValType(const ObjType &)> var_
VarRangeCutColl< ObjType > localRangeCuts_
void fill(const ObjType &obj, const edm::Event &event, const edm::EventSetup &setup, const VarRangeCutColl< ObjType > &globalRangeCuts) override
HLTDQMHist2D(TH2 *hist, const std::string &xVarName, const std::string &yVarName, std::function< XValType(const ObjType &)> xFunc, std::function< YValType(const ObjType &)> yFunc, const VarRangeCutColl< ObjType > &rangeCuts)
HLTDQMHist1D(TH1 *hist, const std::string &varName, std::function< ValType(const ObjType &)> func, const VarRangeCutColl< ObjType > &rangeCuts)
void fill(const ObjType &obj, const edm::Event &event, const edm::EventSetup &setup, const VarRangeCutColl< ObjType > &globalRangeCuts) override
std::function< YValType(const ObjType &)> yVar_
VarRangeCutColl< ObjType > localRangeCuts_