CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
npstat::FcnFunctor1< Result, Arg1 > Struct Template Reference

#include <SimpleFunctors.h>

Inheritance diagram for npstat::FcnFunctor1< Result, Arg1 >:
npstat::Functor1< Result, Arg1 >

Public Member Functions

 FcnFunctor1 (Result(*fcn)(Arg1))
 
Result operator() (const Arg1 &a) const
 
- Public Member Functions inherited from npstat::Functor1< Result, Arg1 >
virtual ~Functor1 ()
 

Private Member Functions

 FcnFunctor1 ()=delete
 

Private Attributes

Result(* fcn_ )(Arg1)
 

Additional Inherited Members

- Public Types inherited from npstat::Functor1< Result, Arg1 >
typedef Arg1 first_argument_type
 
typedef Result result_type
 

Detailed Description

template<typename Result, typename Arg1>
struct npstat::FcnFunctor1< Result, Arg1 >

Adaptation for using single-argument functors with simple cmath-style functions. Do not use this struct as a base class.

Definition at line 135 of file SimpleFunctors.h.

Constructor & Destructor Documentation

◆ FcnFunctor1() [1/2]

template<typename Result , typename Arg1 >
npstat::FcnFunctor1< Result, Arg1 >::FcnFunctor1 ( Result(*)(Arg1)  fcn)
inlineexplicit

Definition at line 136 of file SimpleFunctors.h.

136 : fcn_(fcn) {}

◆ FcnFunctor1() [2/2]

template<typename Result , typename Arg1 >
npstat::FcnFunctor1< Result, Arg1 >::FcnFunctor1 ( )
privatedelete

Member Function Documentation

◆ operator()()

template<typename Result , typename Arg1 >
Result npstat::FcnFunctor1< Result, Arg1 >::operator() ( const Arg1 &  a) const
inlinevirtual

Implements npstat::Functor1< Result, Arg1 >.

Definition at line 138 of file SimpleFunctors.h.

138 { return fcn_(a); }

References a, and npstat::FcnFunctor1< Result, Arg1 >::fcn_.

Member Data Documentation

◆ fcn_

template<typename Result , typename Arg1 >
Result(* npstat::FcnFunctor1< Result, Arg1 >::fcn_) (Arg1)
private

Definition at line 142 of file SimpleFunctors.h.

Referenced by npstat::FcnFunctor1< Result, Arg1 >::operator()().

npstat::FcnFunctor1::fcn_
Result(* fcn_)(Arg1)
Definition: SimpleFunctors.h:142
fcn
void fcn(int &, double *, double &, double *, int)
Definition: LASBarrelAlgorithm.cc:388
a
double a
Definition: hdecay.h:119