ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
TileHitNonConstContainer Class Reference

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

#include <TileHitNonConstContainer.h>

Inheritance diagram for TileHitNonConstContainer:
Collaboration diagram for TileHitNonConstContainer:

Public Types

typedef COLLECTION::TElement element_t
 
typedef std::vector< std::unique_ptr< TileHitCollection > >::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< TileHitCollection > > m_colls
 

Detailed Description

This is a minimal version of a TileHitContainer 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 TileHitContainer, after which they'll be const.

Definition at line 29 of file TileHitNonConstContainer.h.

Member Typedef Documentation

◆ element_t

typedef COLLECTION::TElement TileRawDataNonConstContainer< TileHitCollection >::element_t
inherited

Definition at line 37 of file TileRawDataNonConstContainer.h.

◆ iterator

typedef std::vector<std::unique_ptr<TileHitCollection > >::iterator TileRawDataNonConstContainer< TileHitCollection >::iterator
inherited

Definition at line 42 of file TileRawDataNonConstContainer.h.

Member Function Documentation

◆ begin()

Definition at line 43 of file TileRawDataNonConstContainer.h.

43 { return m_colls.begin(); }

◆ end()

Definition at line 44 of file TileRawDataNonConstContainer.h.

44 { return m_colls.end(); }

◆ push_back()

void TileRawDataNonConstContainer< TileHitCollection >::push_back ( element_t rc)
inherited

Definition at line 40 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 }

◆ TileRawDataNonConstContainer()

Definition at line 39 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 Data Documentation

◆ m_colls

std::vector<std::unique_ptr<TileHitCollection > > TileRawDataNonConstContainer< TileHitCollection >::m_colls
privateinherited

Definition at line 49 of file TileRawDataNonConstContainer.h.

◆ m_hashFunc

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< TileHitCollection >::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< TileHitCollection >::m_colls
std::vector< std::unique_ptr< TileHitCollection > > m_colls
Definition: TileRawDataNonConstContainer.h:49
python.trfValidateRootFile.rc
rc
Definition: trfValidateRootFile.py:349