CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
egPM::ParamBin1D< InputType, ParamType > Class Template Reference

#include <EgammaHLTPixelMatchParamObjects.h>

Inheritance diagram for egPM::ParamBin1D< InputType, ParamType >:
egPM::ParamBin< InputType >

Public Member Functions

float operator() (const InputType &input) const override
 
 ParamBin1D (const edm::ParameterSet &config)
 
bool pass (const InputType &input) const override
 
- Public Member Functions inherited from egPM::ParamBin< InputType >
 ParamBin ()
 
virtual ~ParamBin ()
 

Private Types

using XType = decltype(ParamType::x)
 

Private Attributes

std::function< float(const ParamType &)> func_
 
XType xMax_
 
XType xMin_
 

Additional Inherited Members

- Static Protected Member Functions inherited from egPM::ParamBin< InputType >
template<typename ParamType >
static std::function< float(const ParamType &)> makeFunc (const edm::ParameterSet &config)
 
static std::pair< std::string, std::string > readFuncStr (const std::string &inStr)
 

Detailed Description

template<typename InputType, typename ParamType>
class egPM::ParamBin1D< InputType, ParamType >

Definition at line 229 of file EgammaHLTPixelMatchParamObjects.h.

Member Typedef Documentation

◆ XType

template<typename InputType , typename ParamType >
using egPM::ParamBin1D< InputType, ParamType >::XType = decltype(ParamType::x)
private

Definition at line 231 of file EgammaHLTPixelMatchParamObjects.h.

Constructor & Destructor Documentation

◆ ParamBin1D()

template<typename InputType , typename ParamType >
egPM::ParamBin1D< InputType, ParamType >::ParamBin1D ( const edm::ParameterSet config)
inline

Definition at line 236 of file EgammaHLTPixelMatchParamObjects.h.

237  : xMin_(config.getParameter<typename ConfigType<XType>::type>("xMin")),
238  xMax_(config.getParameter<typename ConfigType<XType>::type>("xMax")),
239  func_(ParamBin<InputType>::template makeFunc<ParamType>(config)) {}

Member Function Documentation

◆ operator()()

template<typename InputType , typename ParamType >
float egPM::ParamBin1D< InputType, ParamType >::operator() ( const InputType &  input) const
inlineoverridevirtual

Implements egPM::ParamBin< InputType >.

Definition at line 241 of file EgammaHLTPixelMatchParamObjects.h.

241  {
242  if (!pass(input))
243  return 0;
244  else
245  return func_(ParamType(input));
246  }

References egPM::ParamBin1D< InputType, ParamType >::func_, input, and egPM::ParamBin1D< InputType, ParamType >::pass().

◆ pass()

template<typename InputType , typename ParamType >
bool egPM::ParamBin1D< InputType, ParamType >::pass ( const InputType &  input) const
inlineoverridevirtual

Member Data Documentation

◆ func_

template<typename InputType , typename ParamType >
std::function<float(const ParamType&)> egPM::ParamBin1D< InputType, ParamType >::func_
private

◆ xMax_

template<typename InputType , typename ParamType >
XType egPM::ParamBin1D< InputType, ParamType >::xMax_
private

◆ xMin_

template<typename InputType , typename ParamType >
XType egPM::ParamBin1D< InputType, ParamType >::xMin_
private
egPM::ParamBin1D::pass
bool pass(const InputType &input) const override
Definition: EgammaHLTPixelMatchParamObjects.h:240
input
static const std::string input
Definition: EdmProvDump.cc:48
egPM::ConfigType::type
T type
Definition: EgammaHLTPixelMatchParamObjects.h:155
egPM::ParamBin1D::func_
std::function< float(const ParamType &)> func_
Definition: EgammaHLTPixelMatchParamObjects.h:233
config
Definition: config.py:1
egPM::ParamBin1D::xMax_
XType xMax_
Definition: EgammaHLTPixelMatchParamObjects.h:232
svgfig.template
def template(fileName, svg, replaceme="REPLACEME")
Definition: svgfig.py:521
egPM::ParamBin1D::xMin_
XType xMin_
Definition: EgammaHLTPixelMatchParamObjects.h:232