ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
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 ()=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 More...
 
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
 
constoperator[] (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 = AtlasHitsVector<T>::initHelper()
 

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 37 of file AtlasHitsVector.h.

◆ const_iterator

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

Definition at line 43 of file AtlasHitsVector.h.

◆ const_pointer

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

Definition at line 41 of file AtlasHitsVector.h.

◆ const_reference

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

Definition at line 45 of file AtlasHitsVector.h.

◆ CONT

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

Definition at line 38 of file AtlasHitsVector.h.

◆ difference_type

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

Definition at line 47 of file AtlasHitsVector.h.

◆ iterator

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

Definition at line 42 of file AtlasHitsVector.h.

◆ pointer

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

Definition at line 40 of file AtlasHitsVector.h.

◆ reference

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

Definition at line 44 of file AtlasHitsVector.h.

◆ size_type

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

Definition at line 46 of file AtlasHitsVector.h.

◆ value_type

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

Definition at line 39 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 55 of file AtlasHitsVector.h.

56  {
57  IMessageSvc* msgSvc(Athena::getMessageSvc());
58  MsgStream log(msgSvc, "AtlasHitsVector");
59  log << MSG::DEBUG << " initialized AtlasHitVector " << collectionName << endmsg;
60 
61  m_name = collectionName;
62  m_hitvector.reserve(mySize);
63  }

◆ ~AtlasHitsVector()

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

◆ AtlasHitsVector() [2/4]

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

Definition at line 91 of file AtlasHitsVector.h.

92  : m_hitvector(rhs.m_hitvector) {}

◆ 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 97 of file AtlasHitsVector.h.

97  {
98  m_hitvector.reserve(rhs.Size());
99  typename AthenaHitsVector<T>::const_iterator i(rhs.begin()), e(rhs.end());
100  while (i != e) {m_hitvector.push_back( T( (**i) ) ); ++i;}
101  }

Member Function Documentation

◆ At()

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

Definition at line 147 of file AtlasHitsVector.h.

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

◆ begin() [1/2]

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

Definition at line 137 of file AtlasHitsVector.h.

138  { return m_hitvector.begin(); }

◆ begin() [2/2]

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

Definition at line 131 of file AtlasHitsVector.h.

132  { return m_hitvector.begin(); }

◆ Clear()

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

Definition at line 67 of file AtlasHitsVector.h.

68  {
69  m_hitvector.clear();
70  std::vector<T>().swap(m_hitvector);
71  }

◆ clear()

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

Definition at line 153 of file AtlasHitsVector.h.

153  {
154  m_hitvector.clear();
155  std::vector<T>().swap(m_hitvector);
156  }

◆ Emplace()

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

Definition at line 81 of file AtlasHitsVector.h.

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

◆ empty()

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

Definition at line 129 of file AtlasHitsVector.h.

129 { return m_hitvector.empty(); }

◆ end() [1/2]

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

Definition at line 140 of file AtlasHitsVector.h.

141  { return m_hitvector.end(); }

◆ end() [2/2]

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

Definition at line 134 of file AtlasHitsVector.h.

135  { return m_hitvector.end(); }

◆ getVector()

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

Definition at line 127 of file AtlasHitsVector.h.

127 {return m_hitvector;}

◆ initHelper()

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

Definition at line 171 of file AtlasHitsVector.h.

◆ Insert() [1/2]

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

Definition at line 73 of file AtlasHitsVector.h.

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

◆ Insert() [2/2]

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

Definition at line 77 of file AtlasHitsVector.h.

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

◆ Name()

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

Definition at line 122 of file AtlasHitsVector.h.

122 {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 114 of file AtlasHitsVector.h.

114  {
115  this->Clear();
116  m_hitvector.reserve(rhs.Size());
117  typename AthenaHitsVector<T>::const_iterator i(rhs.begin()), e(rhs.end());
118  while (i != e) {m_hitvector.push_back( T( (**i) ) ); ++i;}
119  return *this;
120  }

◆ operator=() [3/3]

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

Definition at line 103 of file AtlasHitsVector.h.

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

◆ operator[]()

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

Definition at line 151 of file AtlasHitsVector.h.

151 {return m_hitvector[n];}

◆ push_back()

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

Definition at line 145 of file AtlasHitsVector.h.

145 { m_hitvector.push_back(t);}

◆ reserve()

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

Definition at line 158 of file AtlasHitsVector.h.

158 { m_hitvector.reserve (n); }

◆ resize()

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

Definition at line 160 of file AtlasHitsVector.h.

160 { m_hitvector.resize (n); }

◆ setName()

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

Definition at line 124 of file AtlasHitsVector.h.

124 {m_name = name;}

◆ Size()

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

Definition at line 85 of file AtlasHitsVector.h.

86  {
87  return size();
88  }

◆ size()

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

Definition at line 143 of file AtlasHitsVector.h.

143 { return m_hitvector.size(); }

Member Data Documentation

◆ m_hitvector

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

Definition at line 165 of file AtlasHitsVector.h.

◆ m_name

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

Definition at line 164 of file AtlasHitsVector.h.

◆ s_info

template<class T >
const std::type_info *const AtlasHitsVector< T >::s_info = AtlasHitsVector<T>::initHelper()
static

Definition at line 173 of file AtlasHitsVector.h.


The documentation for this class was generated from the following file:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
AtlasHitsVector::initHelper
static const std::type_info * initHelper()
Definition: AtlasHitsVector.h:171
Athena::getMessageSvc
IMessageSvc * getMessageSvc(bool quiet=false)
Definition: getMessageSvc.cxx:20
AthenaHitsVector::const_iterator
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
Definition: AthenaHitsVector.h:58
AtlasHitsVector::m_name
std::string m_name
Definition: AtlasHitsVector.h:164
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AtlasHitsVector::Clear
void Clear()
Definition: AtlasHitsVector.h:67
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
h
AthenaHitsVector::Size
int Size() const
Definition: AthenaHitsVector.h:96
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
AtlasHitsVector::size
size_type size() const
Definition: AtlasHitsVector.h:143
AtlasHitsVector::m_hitvector
std::vector< T > m_hitvector
Definition: AtlasHitsVector.h:165
AthenaHitsVector::end
const_iterator end() const
Definition: AthenaHitsVector.h:143
DataModel_detail::DVLInfo
Definition: DVLInfo.h:237
python.CaloScaleNoiseConfig.args
args
Definition: CaloScaleNoiseConfig.py:80
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
AthenaHitsVector::begin
const_iterator begin() const
Definition: AthenaHitsVector.h:139