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) {}
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44
double f[11][100]
const std::shared_ptr< F > f_
Definition: FunctClone.h:42
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163

Member Function Documentation

◆ add()

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

Definition at line 16 of file FunctClone.h.

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

Referenced by counter.Counter::register().

16 { toBeUpdated_.resize(size() + 1, true); }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44
size_t size() const
Definition: FunctClone.h:17

◆ clear()

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

Definition at line 33 of file FunctClone.h.

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

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

33 { std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), false); }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44

◆ 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); }

◆ operator()() [2/2]

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

Definition at line 15 of file FunctClone.h.

References x.

15 { return get(0, x); }

◆ reset()

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

Definition at line 32 of file FunctClone.h.

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

32 { std::fill(toBeUpdated_.begin(), toBeUpdated_.end(), true); }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44

◆ size()

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

Definition at line 17 of file FunctClone.h.

References funct::Master< F >::toBeUpdated_.

Referenced by ntupleDataFormat._Collection::__iter__(), ntupleDataFormat._Collection::__len__(), and funct::Master< F >::add().

17 { return toBeUpdated_.size(); }
std::vector< bool > toBeUpdated_
Definition: FunctClone.h:44

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