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

Detailed Description

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

Definition at line 17 of file Store.h.

Public Member Functions

virtual ~Store ()=default
 
 Store (const size_t &nEntries=0, const size_t &nFields=0)
 
template<typename functor_type>
void addFunctor (const functor_type &functor)
 
template<typename functor_type>
 Store (const size_t &nEntries, const std::vector< functor_type > &functors)
 
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
 Store (const size_t &nEntries, const functor_type &functor)
 
template<typename functor_type>
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)
 
template<typename T>
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
 
template<typename return_type>
const return_type get (const size_t &index, const size_t &field) const
 
const stored_type * data () const
 
stored_type * data ()
 
stored_type & operator() (const size_t &index, const size_t &field)
 
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)
 
template<typename functor_type>
void update (const EventList &events, const functor_type &fcn)
 
void resize (std::size_t entries)
 

Public Attributes

size_t m_nEntries {0}
 Number of entries, i.e. number of events.
 
size_t m_nBlocks {0}
 Number of blocks, i.e. number of entries aligned to the size, divided by block size.
 
size_t m_nFields {0}
 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.
 

Constructor & Destructor Documentation

◆ ~Store()

template<typename stored_type, Alignment align = SoA>
virtual AmpGen::Store< stored_type, align >::~Store ( )
virtualdefault

◆ Store() [1/3]

template<typename stored_type, Alignment align = SoA>
AmpGen::Store< stored_type, align >::Store ( const size_t & nEntries = 0,
const size_t & nFields = 0 )
inline

Definition at line 21 of file Store.h.

◆ Store() [2/3]

template<typename stored_type, Alignment align = SoA>
template<typename functor_type>
AmpGen::Store< stored_type, align >::Store ( const size_t & nEntries,
const std::vector< functor_type > & functors )
inline

Definition at line 41 of file Store.h.

◆ Store() [3/3]

template<typename stored_type, Alignment align = SoA>
template<typename functor_type, typename = typename std::enable_if<!std::is_integral<functor_type>::value>::type>
AmpGen::Store< stored_type, align >::Store ( const size_t & nEntries,
const functor_type & functor )
inline

Definition at line 46 of file Store.h.

Member Function Documentation

◆ addFunctor()

template<typename stored_type, Alignment align = SoA>
template<typename functor_type>
void AmpGen::Store< stored_type, align >::addFunctor ( const functor_type & functor)
inline

Definition at line 30 of file Store.h.

◆ aligned_size()

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::aligned_size ( ) const
inline

Definition at line 65 of file Store.h.

◆ allocate()

template<typename stored_type, Alignment align = SoA>
template<typename functor_type>
void AmpGen::Store< stored_type, align >::allocate ( const size_t & nEntries,
const std::vector< functor_type > & functors )
inline

Definition at line 51 of file Store.h.

◆ clear()

template<typename stored_type, Alignment align = SoA>
void AmpGen::Store< stored_type, align >::clear ( )
inline

Definition at line 92 of file Store.h.

◆ data() [1/2]

template<typename stored_type, Alignment align = SoA>
stored_type * AmpGen::Store< stored_type, align >::data ( )
inline

Definition at line 77 of file Store.h.

◆ data() [2/2]

template<typename stored_type, Alignment align = SoA>
const stored_type * AmpGen::Store< stored_type, align >::data ( ) const
inline

Definition at line 76 of file Store.h.

◆ find()

template<typename stored_type, Alignment align = SoA>
template<typename T>
auto AmpGen::Store< stored_type, align >::find ( const T & t) const
inline

Definition at line 59 of file Store.h.

◆ get()

template<typename stored_type, Alignment align = SoA>
template<typename return_type>
const return_type AmpGen::Store< stored_type, align >::get ( const size_t & index,
const size_t & field ) const
inline

Definition at line 72 of file Store.h.

◆ nBlocks()

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::nBlocks ( ) const
inline

Definition at line 63 of file Store.h.

◆ nFields()

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::nFields ( ) const
inline

Definition at line 64 of file Store.h.

◆ operator()() [1/2]

template<typename stored_type, Alignment align = SoA>
stored_type & AmpGen::Store< stored_type, align >::operator() ( const size_t & index,
const size_t & field )
inline

Definition at line 78 of file Store.h.

◆ operator()() [2/2]

template<typename stored_type, Alignment align = SoA>
const stored_type & AmpGen::Store< stored_type, align >::operator() ( const size_t & index,
const size_t & field ) const
inline

Definition at line 66 of file Store.h.

◆ operator[]() [1/2]

template<typename stored_type, Alignment align = SoA>
stored_type & AmpGen::Store< stored_type, align >::operator[] ( const size_t & index)
inline

Definition at line 58 of file Store.h.

◆ operator[]() [2/2]

template<typename stored_type, Alignment align = SoA>
stored_type AmpGen::Store< stored_type, align >::operator[] ( const size_t & index) const
inline

Definition at line 57 of file Store.h.

◆ resize() [1/2]

template<typename stored_type, Alignment align = SoA>
void AmpGen::Store< stored_type, align >::resize ( const size_t & nEntries,
const size_t & nFields )
inline

Definition at line 84 of file Store.h.

◆ resize() [2/2]

template<typename stored_type, Alignment align = SoA>
void AmpGen::Store< stored_type, align >::resize ( std::size_t entries)
inline

Definition at line 101 of file Store.h.

◆ size()

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::size ( ) const
inline

Definition at line 61 of file Store.h.

◆ size_raw()

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::size_raw ( ) const
inline

Definition at line 62 of file Store.h.

◆ store()

template<typename stored_type, Alignment align = SoA>
void AmpGen::Store< stored_type, align >::store ( const size_t & event0,
const unsigned * index,
const stored_type * item,
const unsigned N = 1 )
inline

Definition at line 93 of file Store.h.

◆ update()

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

Definition at line 98 of file Store.h.

Member Data Documentation

◆ m_index

template<typename stored_type, Alignment align = SoA>
std::map<std::string, std::vector<unsigned> > AmpGen::Store< stored_type, align >::m_index

Definition at line 113 of file Store.h.

◆ m_nBlocks

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::m_nBlocks {0}

Definition at line 110 of file Store.h.

◆ m_nEntries

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::m_nEntries {0}

Definition at line 109 of file Store.h.

◆ m_nFields

template<typename stored_type, Alignment align = SoA>
size_t AmpGen::Store< stored_type, align >::m_nFields {0}

Definition at line 111 of file Store.h.

◆ m_store

template<typename stored_type, Alignment align = SoA>
std::vector<stored_type> AmpGen::Store< stored_type, align >::m_store

Definition at line 112 of file Store.h.


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