ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawDataNonConstContainer< COLLECTION > Class Template Reference

This is a minimal version of a TileRawDataContainer in which the saved collections remain non-const. More...

#include <TileRawDataNonConstContainer.h>

Collaboration diagram for TileRawDataNonConstContainer< COLLECTION >:

Public Types

typedef COLLECTION::TElement element_t
typedef std::vector< std::unique_ptr< COLLECTION > >::iterator iterator

Public Member Functions

 TileRawDataNonConstContainer (SG::OwnershipPolicy ownPolicy)
void push_back (element_t *rc)
iterator begin ()
iterator end ()

Private Attributes

TileFragHash m_hashFunc
std::vector< std::unique_ptr< COLLECTION > > m_colls

Detailed Description

template<typename COLLECTION>
class TileRawDataNonConstContainer< COLLECTION >

This is a minimal version of a TileRawDataContainer in which the saved collections remain non-const.

This can be used as a temporary while building the container. Once everything's built, the collections can then be moved to the final TileRawDataContainer, after which they'll be const.

Definition at line 34 of file TileRawDataNonConstContainer.h.

Member Typedef Documentation

◆ element_t

template<typename COLLECTION>
typedef COLLECTION::TElement TileRawDataNonConstContainer< COLLECTION >::element_t

Definition at line 37 of file TileRawDataNonConstContainer.h.

◆ iterator

template<typename COLLECTION>
typedef std::vector<std::unique_ptr<COLLECTION>>::iterator TileRawDataNonConstContainer< COLLECTION >::iterator

Definition at line 42 of file TileRawDataNonConstContainer.h.

Constructor & Destructor Documentation

◆ TileRawDataNonConstContainer()

template<typename COLLECTION>
TileRawDataNonConstContainer< COLLECTION >::TileRawDataNonConstContainer ( SG::OwnershipPolicy ownPolicy)

Definition at line 54 of file TileRawDataNonConstContainer.h.

55{
58 size_t ncoll = m_hashFunc.max();
59 m_colls.reserve (ncoll);
60 for (size_t i = 0; i < ncoll; i++) {
61 TileFragHash::ID frag = m_hashFunc.identifier(i);
63 }
64}
This is a minimal version of a TileRawDataContainer in which the saved collections remain non-const.
std::vector< std::unique_ptr< COLLECTION > > m_colls

Member Function Documentation

◆ begin()

template<typename COLLECTION>
iterator TileRawDataNonConstContainer< COLLECTION >::begin ( )
inline

Definition at line 43 of file TileRawDataNonConstContainer.h.

43{ return m_colls.begin(); }

◆ end()

template<typename COLLECTION>
iterator TileRawDataNonConstContainer< COLLECTION >::end ( )
inline

Definition at line 44 of file TileRawDataNonConstContainer.h.

44{ return m_colls.end(); }

◆ push_back()

template<typename COLLECTION>
void TileRawDataNonConstContainer< COLLECTION >::push_back ( element_t * rc)

Definition at line 68 of file TileRawDataNonConstContainer.h.

69{
70 int frag = rc->frag_ID();
72 assert (fragHash < m_colls.size());
73 m_colls[fragHash]->push_back (rc);
74}

Member Data Documentation

◆ m_colls

template<typename COLLECTION>
std::vector<std::unique_ptr<COLLECTION> > TileRawDataNonConstContainer< COLLECTION >::m_colls
private

Definition at line 49 of file TileRawDataNonConstContainer.h.

◆ m_hashFunc

template<typename COLLECTION>
TileFragHash TileRawDataNonConstContainer< COLLECTION >::m_hashFunc
private

Definition at line 48 of file TileRawDataNonConstContainer.h.


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