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 116 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
 
stored_type & operator[] (const size_t &index)
 
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
 
stored_type & operator() (const size_t &index, const size_t &field)
 
const return_type get (const size_t &index, const size_t &field) const
 
const stored_type * data () const
 
stored_type * data ()
 
void resize (const size_t &nEntries, const size_t &nFields)
 
void resize (std::size_t entries)
 
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 119 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 122 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 143 of file Store.h.

Member Function Documentation

◆ addFunctor()

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

Definition at line 30 of file Store.h.

◆ aligned_size()

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

Definition at line 65 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 135 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 126 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 51 of file Store.h.

◆ clear()

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

Definition at line 92 of file Store.h.

◆ data() [1/2]

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

Definition at line 77 of file Store.h.

◆ data() [2/2]

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

Definition at line 76 of file Store.h.

◆ find()

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

Definition at line 59 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 72 of file Store.h.

◆ nBlocks()

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

Definition at line 63 of file Store.h.

◆ nFields()

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

Definition at line 64 of file Store.h.

◆ operator()() [1/2]

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

Definition at line 78 of file Store.h.

◆ operator()() [2/2]

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

Definition at line 66 of file Store.h.

◆ operator[]() [1/2]

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

Definition at line 58 of file Store.h.

◆ operator[]() [2/2]

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

Definition at line 57 of file Store.h.

◆ resize() [1/2]

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

Definition at line 84 of file Store.h.

◆ resize() [2/2]

void AmpGen::Store< stored_type, align >::resize ( std::size_t entries)
inlineinherited

Definition at line 101 of file Store.h.

◆ size()

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

Definition at line 61 of file Store.h.

◆ size_raw()

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

Definition at line 62 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 93 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 149 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 98 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 113 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 207 of file Store.h.

◆ m_nBlocks

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

Definition at line 110 of file Store.h.

◆ m_nEntries

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

Definition at line 109 of file Store.h.

◆ m_nFields

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

Definition at line 111 of file Store.h.

◆ m_store

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

Definition at line 112 of file Store.h.


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