ATLAS Offline Software
Loading...
Searching...
No Matches
AtlasHitsVector< T > Class Template Reference

#include <AtlasHitsVector.h>

Inheritance diagram for AtlasHitsVector< T >:
Collaboration diagram for AtlasHitsVector< T >:

Public Types

typedef T base_value_type
typedef std::vector< T > CONT
typedef CONT::value_type value_type
typedef CONT::pointer pointer
typedef CONT::const_pointer const_pointer
typedef CONT::iterator iterator
typedef CONT::const_iterator const_iterator
typedef CONT::reference reference
typedef CONT::const_reference const_reference
typedef CONT::size_type size_type
typedef CONT::difference_type difference_type

Public Member Functions

 AtlasHitsVector (const std::string &collectionName="DefaultCollectionName", const unsigned int mySize=100)
 ~AtlasHitsVector () override=default
void Clear ()
void Insert (const T &h)
void Insert (T &&h)
template<class... Args>
void Emplace (Args &&... args)
int Size () const
 AtlasHitsVector (const AtlasHitsVector< T > &rhs)
 AtlasHitsVector (AtlasHitsVector< T > &&rhs) noexcept=default
 AtlasHitsVector (const AthenaHitsVector< T > &rhs)
AtlasHitsVector< T > & operator= (const AtlasHitsVector< T > &rhs)
AtlasHitsVector< T > & operator= (AtlasHitsVector< T > &&rhs) noexcept=default
AtlasHitsVector< T > & operator= (const AthenaHitsVector< T > &rhs)
 assignment deletes old elements and deep copies the new ones
const std::string & Name () const
void setName (const std::string &name)
const std::vector< T > & getVector () const
bool empty () const
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
size_type size () const
void push_back (const T &t)
At (unsigned int pos) const
const T operator[] (size_type n) const
void clear ()
void reserve (size_type n)
void resize (size_type n)

Static Public Member Functions

static const std::type_info * initHelper ()

Static Public Attributes

static const std::type_info *const s_info

Protected Attributes

std::string m_name
std::vector< T > m_hitvector

Detailed Description

template<typename T>
class AtlasHitsVector< T >

Definition at line 32 of file AtlasHitsVector.h.

Member Typedef Documentation

◆ base_value_type

template<typename T>
typedef T AtlasHitsVector< T >::base_value_type

Definition at line 36 of file AtlasHitsVector.h.

◆ const_iterator

template<typename T>
typedef CONT::const_iterator AtlasHitsVector< T >::const_iterator

Definition at line 42 of file AtlasHitsVector.h.

◆ const_pointer

template<typename T>
typedef CONT::const_pointer AtlasHitsVector< T >::const_pointer

Definition at line 40 of file AtlasHitsVector.h.

◆ const_reference

template<typename T>
typedef CONT::const_reference AtlasHitsVector< T >::const_reference

Definition at line 44 of file AtlasHitsVector.h.

◆ CONT

template<typename T>
typedef std::vector<T> AtlasHitsVector< T >::CONT

Definition at line 37 of file AtlasHitsVector.h.

◆ difference_type

template<typename T>
typedef CONT::difference_type AtlasHitsVector< T >::difference_type

Definition at line 46 of file AtlasHitsVector.h.

◆ iterator

template<typename T>
typedef CONT::iterator AtlasHitsVector< T >::iterator

Definition at line 41 of file AtlasHitsVector.h.

◆ pointer

template<typename T>
typedef CONT::pointer AtlasHitsVector< T >::pointer

Definition at line 39 of file AtlasHitsVector.h.

◆ reference

template<typename T>
typedef CONT::reference AtlasHitsVector< T >::reference

Definition at line 43 of file AtlasHitsVector.h.

◆ size_type

template<typename T>
typedef CONT::size_type AtlasHitsVector< T >::size_type

Definition at line 45 of file AtlasHitsVector.h.

◆ value_type

template<typename T>
typedef CONT::value_type AtlasHitsVector< T >::value_type

Definition at line 38 of file AtlasHitsVector.h.

Constructor & Destructor Documentation

◆ AtlasHitsVector() [1/4]

template<typename T>
AtlasHitsVector< T >::AtlasHitsVector ( const std::string & collectionName = "DefaultCollectionName",
const unsigned int mySize = 100 )
inline

Definition at line 54 of file AtlasHitsVector.h.

55 {
57 MsgStream log(msgSvc, "AtlasHitsVector");
58 log << MSG::DEBUG << " initialized AtlasHitVector " << collectionName << endmsg;
59
61 m_hitvector.reserve(mySize);
62 }
std::vector< T > m_hitvector

◆ ~AtlasHitsVector()

template<typename T>
AtlasHitsVector< T >::~AtlasHitsVector ( )
overridedefault

◆ AtlasHitsVector() [2/4]

template<typename T>
AtlasHitsVector< T >::AtlasHitsVector ( const AtlasHitsVector< T > & rhs)
inlineexplicit

Definition at line 90 of file AtlasHitsVector.h.

◆ AtlasHitsVector() [3/4]

template<typename T>
AtlasHitsVector< T >::AtlasHitsVector ( AtlasHitsVector< T > && rhs)
defaultnoexcept

◆ AtlasHitsVector() [4/4]

template<typename T>
AtlasHitsVector< T >::AtlasHitsVector ( const AthenaHitsVector< T > & rhs)
inlineexplicit

Definition at line 96 of file AtlasHitsVector.h.

96 {
97 m_hitvector.reserve(rhs.Size());
99 while (i != e) {m_hitvector.push_back( T( (**i) ) ); ++i;}
100 }
const_iterator begin() const
const_iterator end() const

Member Function Documentation

◆ At()

template<typename T>
T AtlasHitsVector< T >::At ( unsigned int pos) const
inline

Definition at line 146 of file AtlasHitsVector.h.

146 {
147 return m_hitvector.at(pos);
148 }

◆ begin() [1/2]

template<typename T>
iterator AtlasHitsVector< T >::begin ( )
inline

Definition at line 136 of file AtlasHitsVector.h.

137 { return m_hitvector.begin(); }

◆ begin() [2/2]

template<typename T>
const_iterator AtlasHitsVector< T >::begin ( ) const
inline

Definition at line 130 of file AtlasHitsVector.h.

131 { return m_hitvector.begin(); }

◆ Clear()

template<typename T>
void AtlasHitsVector< T >::Clear ( )
inline

Definition at line 66 of file AtlasHitsVector.h.

67 {
68 m_hitvector.clear();
70 }

◆ clear()

template<typename T>
void AtlasHitsVector< T >::clear ( )
inline

Definition at line 152 of file AtlasHitsVector.h.

152 {
153 m_hitvector.clear();
155 }

◆ Emplace()

template<typename T>
template<class... Args>
void AtlasHitsVector< T >::Emplace ( Args &&... args)
inline

Definition at line 80 of file AtlasHitsVector.h.

81 {
82 m_hitvector.emplace_back( std::forward<Args>(args)... );
83 }

◆ empty()

template<typename T>
bool AtlasHitsVector< T >::empty ( ) const
inline

Definition at line 128 of file AtlasHitsVector.h.

128{ return m_hitvector.empty(); }

◆ end() [1/2]

template<typename T>
iterator AtlasHitsVector< T >::end ( )
inline

Definition at line 139 of file AtlasHitsVector.h.

140 { return m_hitvector.end(); }

◆ end() [2/2]

template<typename T>
const_iterator AtlasHitsVector< T >::end ( ) const
inline

Definition at line 133 of file AtlasHitsVector.h.

134 { return m_hitvector.end(); }

◆ getVector()

template<typename T>
const std::vector< T > & AtlasHitsVector< T >::getVector ( ) const
inline

Definition at line 126 of file AtlasHitsVector.h.

126{return m_hitvector;}

◆ initHelper()

template<typename T>
const std::type_info * AtlasHitsVector< T >::initHelper ( )
inlinestatic

Definition at line 170 of file AtlasHitsVector.h.

static const std::type_info * initHelper()

◆ Insert() [1/2]

template<typename T>
void AtlasHitsVector< T >::Insert ( const T & h)
inline

Definition at line 72 of file AtlasHitsVector.h.

73 {
74 m_hitvector.push_back(h);
75 }

◆ Insert() [2/2]

template<typename T>
void AtlasHitsVector< T >::Insert ( T && h)
inline

Definition at line 76 of file AtlasHitsVector.h.

77 {
78 m_hitvector.push_back( std::move(h) );
79 }

◆ Name()

template<typename T>
const std::string & AtlasHitsVector< T >::Name ( ) const
inline

Definition at line 121 of file AtlasHitsVector.h.

121{return m_name;}

◆ operator=() [1/3]

template<typename T>
AtlasHitsVector< T > & AtlasHitsVector< T >::operator= ( AtlasHitsVector< T > && rhs)
defaultnoexcept

◆ operator=() [2/3]

template<typename T>
AtlasHitsVector< T > & AtlasHitsVector< T >::operator= ( const AthenaHitsVector< T > & rhs)
inline

assignment deletes old elements and deep copies the new ones

Definition at line 113 of file AtlasHitsVector.h.

113 {
114 this->Clear();
115 m_hitvector.reserve(rhs.Size());
117 while (i != e) {m_hitvector.push_back( T( (**i) ) ); ++i;}
118 return *this;
119 }

◆ operator=() [3/3]

template<typename T>
AtlasHitsVector< T > & AtlasHitsVector< T >::operator= ( const AtlasHitsVector< T > & rhs)
inline

Definition at line 102 of file AtlasHitsVector.h.

102 {
103 if (this != &rhs) {
105 }
106 return *this;
107 }

◆ operator[]()

template<typename T>
const T AtlasHitsVector< T >::operator[] ( size_type n) const
inline

Definition at line 150 of file AtlasHitsVector.h.

150{return m_hitvector[n];}

◆ push_back()

template<typename T>
void AtlasHitsVector< T >::push_back ( const T & t)
inline

Definition at line 144 of file AtlasHitsVector.h.

144{ m_hitvector.push_back(t);}

◆ reserve()

template<typename T>
void AtlasHitsVector< T >::reserve ( size_type n)
inline

Definition at line 157 of file AtlasHitsVector.h.

157{ m_hitvector.reserve (n); }

◆ resize()

template<typename T>
void AtlasHitsVector< T >::resize ( size_type n)
inline

Definition at line 159 of file AtlasHitsVector.h.

159{ m_hitvector.resize (n); }

◆ setName()

template<typename T>
void AtlasHitsVector< T >::setName ( const std::string & name)
inline

Definition at line 123 of file AtlasHitsVector.h.

123{m_name = name;}

◆ Size()

template<typename T>
int AtlasHitsVector< T >::Size ( ) const
inline

Definition at line 84 of file AtlasHitsVector.h.

85 {
86 return size();
87 }
size_type size() const

◆ size()

template<typename T>
size_type AtlasHitsVector< T >::size ( ) const
inline

Definition at line 142 of file AtlasHitsVector.h.

142{ return m_hitvector.size(); }

Member Data Documentation

◆ m_hitvector

template<typename T>
std::vector<T> AtlasHitsVector< T >::m_hitvector
protected

Definition at line 164 of file AtlasHitsVector.h.

◆ m_name

template<typename T>
std::string AtlasHitsVector< T >::m_name
protected

Definition at line 163 of file AtlasHitsVector.h.

◆ s_info

template<typename T>
const std::type_info* const AtlasHitsVector< T >::s_info
static

Definition at line 172 of file AtlasHitsVector.h.


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