AmpGen 2.1
Loading...
Searching...
No Matches
AmpGen::FunctionCache< input_type, stored_type, align > Class Template Reference

Detailed Description

template<typename input_type, typename stored_type, Alignment align = SoA>
class AmpGen::FunctionCache< input_type, stored_type, align >

Definition at line 102 of file Store.h.

Public Member Functions

 FunctionCache ()=default
 FunctionCache (const input_type *input, const std::size_t &nFields=0)
template<typename functor_type>
 FunctionCache (const input_type *input, const std::vector< functor_type > &functors)
template<typename functor_type>
void allocate (const input_type *input, const std::vector< functor_type > &functors)
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
void allocate (const input_type *input, const functor_type &functor)
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
 FunctionCache (const input_type *input, const functor_type &functors)
template<typename functor_type>
void update (const functor_type &fcn)
void addFunctor (const functor_type &functor)
void allocate (const size_t &nEntries, const std::vector< functor_type > &functors)
stored_type operator[] (const size_t &index) const
auto find (const T &t) const
size_t size () const
size_t size_raw () const
size_t nBlocks () const
size_t nFields () const
size_t aligned_size () const
const stored_type & operator() (const size_t &index, const size_t &field) const
const return_type get (const size_t &index, const size_t &field) const
const stored_type * data () const
void resize (const size_t &nEntries, const size_t &nFields)
void clear ()
void store (const size_t &event0, const unsigned *index, const stored_type *item, const unsigned N=1)
void update (const EventList &events, const functor_type &fcn)

Public Attributes

const input_type * m_input {nullptr}
size_t m_nEntries
 Number of entries, i.e. number of events.
size_t m_nBlocks
 Number of blocks, i.e. number of entries aligned to the size, divided by block size.
size_t m_nFields
 Number of fields per entry.
std::vector< stored_type > m_store
 Actual store of values.
std::map< std::string, std::vector< unsigned > > m_index
 Index between name of functors and the stored values.
Inheritance diagram for AmpGen::FunctionCache< input_type, stored_type, align >:
AmpGen::Store< stored_type, SoA >

Constructor & Destructor Documentation

◆ FunctionCache() [1/4]

template<typename input_type, typename stored_type, Alignment align = SoA>
AmpGen::FunctionCache< input_type, stored_type, align >::FunctionCache ( )
default

◆ FunctionCache() [2/4]

template<typename input_type, typename stored_type, Alignment align = SoA>
AmpGen::FunctionCache< input_type, stored_type, align >::FunctionCache ( const input_type * input,
const std::size_t & nFields = 0 )
inline

Definition at line 105 of file Store.h.

◆ FunctionCache() [3/4]

template<typename input_type, typename stored_type, Alignment align = SoA>
template<typename functor_type>
AmpGen::FunctionCache< input_type, stored_type, align >::FunctionCache ( const input_type * input,
const std::vector< functor_type > & functors )
inline

Definition at line 107 of file Store.h.

◆ FunctionCache() [4/4]

template<typename input_type, typename stored_type, Alignment align = SoA>
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
AmpGen::FunctionCache< input_type, stored_type, align >::FunctionCache ( const input_type * input,
const functor_type & functors )
inline

Definition at line 124 of file Store.h.

Member Function Documentation

◆ addFunctor()

void AmpGen::Store< stored_type, align >::addFunctor ( const functor_type & functor)
inlineinherited

Definition at line 23 of file Store.h.

◆ aligned_size()

size_t AmpGen::Store< stored_type, align >::aligned_size ( ) const
inlineinherited

Definition at line 52 of file Store.h.

◆ allocate() [1/3]

template<typename input_type, typename stored_type, Alignment align = SoA>
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
void AmpGen::FunctionCache< input_type, stored_type, align >::allocate ( const input_type * input,
const functor_type & functor )
inline

Definition at line 116 of file Store.h.

◆ allocate() [2/3]

template<typename input_type, typename stored_type, Alignment align = SoA>
template<typename functor_type>
void AmpGen::FunctionCache< input_type, stored_type, align >::allocate ( const input_type * input,
const std::vector< functor_type > & functors )
inline

Definition at line 108 of file Store.h.

◆ allocate() [3/3]

void AmpGen::Store< stored_type, align >::allocate ( const size_t & nEntries,
const std::vector< functor_type > & functors )
inlineinherited

Definition at line 39 of file Store.h.

◆ clear()

void AmpGen::Store< stored_type, align >::clear ( )
inlineinherited

Definition at line 78 of file Store.h.

◆ data()

const stored_type * AmpGen::Store< stored_type, align >::data ( ) const
inlineinherited

Definition at line 62 of file Store.h.

◆ find()

auto AmpGen::Store< stored_type, align >::find ( const T & t) const
inlineinherited

Definition at line 46 of file Store.h.

◆ get()

const return_type AmpGen::Store< stored_type, align >::get ( const size_t & index,
const size_t & field ) const
inlineinherited

Definition at line 59 of file Store.h.

◆ nBlocks()

size_t AmpGen::Store< stored_type, align >::nBlocks ( ) const
inlineinherited

Definition at line 50 of file Store.h.

◆ nFields()

size_t AmpGen::Store< stored_type, align >::nFields ( ) const
inlineinherited

Definition at line 51 of file Store.h.

◆ operator()()

const stored_type & AmpGen::Store< stored_type, align >::operator() ( const size_t & index,
const size_t & field ) const
inlineinherited

Definition at line 53 of file Store.h.

◆ operator[]()

stored_type AmpGen::Store< stored_type, align >::operator[] ( const size_t & index) const
inlineinherited

Definition at line 44 of file Store.h.

◆ resize()

void AmpGen::Store< stored_type, align >::resize ( const size_t & nEntries,
const size_t & nFields )
inlineinherited

Definition at line 71 of file Store.h.

◆ size()

size_t AmpGen::Store< stored_type, align >::size ( ) const
inlineinherited

Definition at line 48 of file Store.h.

◆ size_raw()

size_t AmpGen::Store< stored_type, align >::size_raw ( ) const
inlineinherited

Definition at line 49 of file Store.h.

◆ store()

void AmpGen::Store< stored_type, align >::store ( const size_t & event0,
const unsigned * index,
const stored_type * item,
const unsigned N = 1 )
inlineinherited

Definition at line 82 of file Store.h.

◆ update() [1/2]

template<typename input_type, typename stored_type, Alignment align = SoA>
template<typename functor_type>
void AmpGen::FunctionCache< input_type, stored_type, align >::update ( const functor_type & fcn)
inline

Definition at line 128 of file Store.h.

◆ update() [2/2]

void AmpGen::Store< stored_type, align >::update ( const EventList & events,
const functor_type & fcn )
inlineinherited

Definition at line 86 of file Store.h.

Member Data Documentation

◆ m_index

std::map<std::string, std::vector<unsigned> > AmpGen::Store< stored_type, align >::m_index
inherited

Definition at line 99 of file Store.h.

◆ m_input

template<typename input_type, typename stored_type, Alignment align = SoA>
const input_type* AmpGen::FunctionCache< input_type, stored_type, align >::m_input {nullptr}

Definition at line 168 of file Store.h.

◆ m_nBlocks

size_t AmpGen::Store< stored_type, align >::m_nBlocks
inherited

Definition at line 96 of file Store.h.

◆ m_nEntries

size_t AmpGen::Store< stored_type, align >::m_nEntries
inherited

Definition at line 95 of file Store.h.

◆ m_nFields

size_t AmpGen::Store< stored_type, align >::m_nFields
inherited

Definition at line 97 of file Store.h.

◆ m_store

std::vector<stored_type> AmpGen::Store< stored_type, align >::m_store
inherited

Definition at line 98 of file Store.h.


The documentation for this class was generated from the following file: