CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
funct::Master< F > Struct Template Reference

#include <FunctClone.h>

Public Member Functions

void add () const
 
double get (size_t i) const
 
double get (size_t i, double x) const
 
 Master (const F &f)
 
double operator() () const
 
double operator() (double x) const
 
size_t size () const
 

Private Member Functions

void clear () const
 
void reset () const
 
void update () const
 
void update (double x) const
 

Private Attributes

const std::shared_ptr< Ff_
 
std::vector< bool > toBeUpdated_
 
double value_
 

Detailed Description

template<typename F>
struct funct::Master< F >

Definition at line 12 of file FunctClone.h.

Constructor & Destructor Documentation

◆ Master()

template<typename F>
funct::Master< F >::Master ( const F f)
inline

Definition at line 13 of file FunctClone.h.

13 : f_(new F(f)), toBeUpdated_(1, true) {}

Member Function Documentation

◆ add()

template<typename F>
void funct::Master< F >::add ( ) const
inline

Definition at line 16 of file FunctClone.h.

16 { toBeUpdated_.resize(size() + 1, true); }

References funct::Master< F >::size(), and funct::Master< F >::toBeUpdated_.

Referenced by counter.Counter::register().

◆ clear()

template<typename F>
void funct::Master< F >::clear ( void  ) const
inlineprivate

Definition at line 33 of file FunctClone.h.

33 { std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), false); }

References ntuplemaker::fill, and funct::Master< F >::toBeUpdated_.

Referenced by funct::Master< F >::update().

◆ get() [1/2]

template<typename F>
double funct::Master< F >::get ( size_t  i) const
inline

◆ get() [2/2]

template<typename F>
double funct::Master< F >::get ( size_t  i,
double  x 
) const
inline

◆ operator()() [1/2]

template<typename F>
double funct::Master< F >::operator() ( ) const
inline

Definition at line 14 of file FunctClone.h.

14 { return get(0); }

References funct::Master< F >::get().

◆ operator()() [2/2]

template<typename F>
double funct::Master< F >::operator() ( double  x) const
inline

Definition at line 15 of file FunctClone.h.

15 { return get(0, x); }

References funct::Master< F >::get().

◆ reset()

template<typename F>
void funct::Master< F >::reset ( void  ) const
inlineprivate

Definition at line 32 of file FunctClone.h.

32 { std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), true); }

References ntuplemaker::fill, and funct::Master< F >::toBeUpdated_.

◆ size()

template<typename F>
size_t funct::Master< F >::size ( void  ) const
inline

◆ update() [1/2]

template<typename F>
void funct::Master< F >::update ( ) const
inlineprivate

◆ update() [2/2]

template<typename F>
void funct::Master< F >::update ( double  x) const
inlineprivate

Member Data Documentation

◆ f_

template<typename F>
const std::shared_ptr<F> funct::Master< F >::f_
private

Definition at line 42 of file FunctClone.h.

◆ toBeUpdated_

template<typename F>
std::vector<bool> funct::Master< F >::toBeUpdated_
mutableprivate

◆ value_

template<typename F>
double funct::Master< F >::value_
mutableprivate

Definition at line 43 of file FunctClone.h.

Referenced by funct::Master< F >::get(), and funct::Master< F >::update().

mps_fire.i
i
Definition: mps_fire.py:355
funct::Master::f_
const std::shared_ptr< F > f_
Definition: FunctClone.h:42
f
double f[11][100]
Definition: MuScleFitUtils.cc:78
DDAxes::x
F
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
funct::Master::toBeUpdated_
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44
ntuplemaker.fill
fill
Definition: ntuplemaker.py:304
funct::Master::clear
void clear() const
Definition: FunctClone.h:33
funct::Master::size
size_t size() const
Definition: FunctClone.h:17
funct::Master::get
double get(size_t i) const
Definition: FunctClone.h:18
funct::Master::value_
double value_
Definition: FunctClone.h:43
funct::Master::update
void update() const
Definition: FunctClone.h:34