ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
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++) {
62  m_colls.push_back (std::make_unique<COLLECTION> (frag, ownPolicy));
63  }
64 }

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();
71  IdentifierHash fragHash = static_cast<IdentifierHash>(m_hashFunc(frag));
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:
TileFragHash::max
int max() const
return maximum number of IDs
Definition: TileFragHash.h:50
TileCablingService::getInstance
static const TileCablingService * getInstance()
get pointer to service instance
Definition: TileCablingService.cxx:24
TileFragHash::Digitizer
@ Digitizer
Definition: TileFragHash.h:33
lumiFormat.i
int i
Definition: lumiFormat.py:85
TileFragHash::ID
int ID
Definition: TileFragHash.h:28
TileFragHash::initialize
void initialize(const TileHWID *tileHWID, TYPE type=Default)
Definition: TileFragHash.cxx:23
TileFragHash::identifier
ID identifier(int i) const
reverse conversion
Definition: TileFragHash.cxx:67
TileRawDataNonConstContainer::m_hashFunc
TileFragHash m_hashFunc
Definition: TileRawDataNonConstContainer.h:48
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
TileRawDataNonConstContainer::m_colls
std::vector< std::unique_ptr< COLLECTION > > m_colls
Definition: TileRawDataNonConstContainer.h:49
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:355