ATLAS Offline Software
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
CaloCalibrationHitContainer Class Reference

#include <CaloCalibrationHitContainer.h>

Inheritance diagram for CaloCalibrationHitContainer:
Collaboration diagram for CaloCalibrationHitContainer:

Public Types

using base_value_type = CaloCalibrationHit
 
using CONT = std::vector< CaloCalibrationHit * >
 
using value_type = typename CONT::value_type
 
using pointer = typename CONT::pointer
 
using reference = typename CONT::reference
 
using iterator = typename CONT::iterator
 
using size_type = typename CONT::size_type
 
using difference_type = typename CONT::difference_type
 
using const_pointer = const CaloCalibrationHit *const *
 
using const_reference = const CaloCalibrationHit *const &
 
using const_iterator = boost::transform_iterator< make_const, typename CONT::const_iterator >
 

Public Member Functions

 CaloCalibrationHitContainer (const std::string &collectionName="DefaultCollectionName")
 Constructor of CaloCalibrationHitContainer. More...
 
virtual ~CaloCalibrationHitContainer ()
 Destructor. More...
 
virtual operator std::string () const
 Returns a string containing the description of this
CaloCalibrationHitContainer with a dump of all the hits that it contains
Can be used in printouts
More...
 
void Clear ()
 
void Clear (AthHitVec::OwnershipPolicy ownPolicy)
 
void Insert (CaloCalibrationHit *h)
 
int Size () const
 
const std::string & Name () const
 
void setName (const std::string &name)
 
const std::vector< CaloCalibrationHit * > & getVector ()
 
bool empty () const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator end () const
 
iterator end ()
 
size_type size () const
 
void push_back (CaloCalibrationHit *t)
 
void push_back (std::unique_ptr< CaloCalibrationHit > t)
 
const CaloCalibrationHitAt (unsigned int pos) const
 
const CaloCalibrationHitoperator[] (size_type n) const
 
void resize (size_type sz)
 
void clear ()
 
void reserve (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< CaloCalibrationHit * > m_hitvector
 
AthHitVec::OwnershipPolicy m_ownPolicy
 

Detailed Description

Definition at line 24 of file CaloCalibrationHitContainer.h.

Member Typedef Documentation

◆ base_value_type

Definition at line 43 of file AthenaHitsVector.h.

◆ const_iterator

using AthenaHitsVector< CaloCalibrationHit >::const_iterator = boost::transform_iterator<make_const, typename CONT::const_iterator>
inherited

Definition at line 57 of file AthenaHitsVector.h.

◆ const_pointer

Definition at line 51 of file AthenaHitsVector.h.

◆ const_reference

Definition at line 52 of file AthenaHitsVector.h.

◆ CONT

using AthenaHitsVector< CaloCalibrationHit >::CONT = std::vector<CaloCalibrationHit *>
inherited

Definition at line 44 of file AthenaHitsVector.h.

◆ difference_type

using AthenaHitsVector< CaloCalibrationHit >::difference_type = typename CONT::difference_type
inherited

Definition at line 50 of file AthenaHitsVector.h.

◆ iterator

using AthenaHitsVector< CaloCalibrationHit >::iterator = typename CONT::iterator
inherited

Definition at line 48 of file AthenaHitsVector.h.

◆ pointer

using AthenaHitsVector< CaloCalibrationHit >::pointer = typename CONT::pointer
inherited

Definition at line 46 of file AthenaHitsVector.h.

◆ reference

using AthenaHitsVector< CaloCalibrationHit >::reference = typename CONT::reference
inherited

Definition at line 47 of file AthenaHitsVector.h.

◆ size_type

using AthenaHitsVector< CaloCalibrationHit >::size_type = typename CONT::size_type
inherited

Definition at line 49 of file AthenaHitsVector.h.

◆ value_type

using AthenaHitsVector< CaloCalibrationHit >::value_type = typename CONT::value_type
inherited

Definition at line 45 of file AthenaHitsVector.h.

Constructor & Destructor Documentation

◆ CaloCalibrationHitContainer()

CaloCalibrationHitContainer::CaloCalibrationHitContainer ( const std::string &  collectionName = "DefaultCollectionName")

Constructor of CaloCalibrationHitContainer.

Definition at line 18 of file CaloCalibrationHitContainer.cxx.

20 {
21 
22 }

◆ ~CaloCalibrationHitContainer()

CaloCalibrationHitContainer::~CaloCalibrationHitContainer ( )
virtualdefault

Destructor.

Member Function Documentation

◆ At()

const CaloCalibrationHit * AthenaHitsVector< CaloCalibrationHit >::At ( unsigned int  pos) const
inlineinherited

Definition at line 156 of file AthenaHitsVector.h.

156 { return m_hitvector.at(pos); }

◆ begin() [1/2]

iterator AthenaHitsVector< CaloCalibrationHit >::begin
inlineinherited

Definition at line 147 of file AthenaHitsVector.h.

147 { return m_hitvector.begin(); }

◆ begin() [2/2]

Definition at line 139 of file AthenaHitsVector.h.

139  {
140  return const_iterator(m_hitvector.begin(), make_const());
141  }

◆ Clear() [1/2]

void AthenaHitsVector< CaloCalibrationHit >::Clear
inlineinherited

Definition at line 76 of file AthenaHitsVector.h.

76  {
77  // delete pointers if we own the elements
79  for (unsigned int i = 0; i < m_hitvector.size(); i++)
80  delete m_hitvector[i];
81  }
82  m_hitvector.clear();
83  }

◆ clear()

void AthenaHitsVector< CaloCalibrationHit >::clear
inlineinherited

Definition at line 174 of file AthenaHitsVector.h.

174  {
176  for (unsigned int i = 0; i < m_hitvector.size(); i++)
177  delete m_hitvector[i];
178  }
179  m_hitvector.clear();
180  }

◆ Clear() [2/2]

void AthenaHitsVector< CaloCalibrationHit >::Clear ( AthHitVec::OwnershipPolicy  ownPolicy)
inlineinherited

Definition at line 85 of file AthenaHitsVector.h.

85  {
86  // delete pointers if we own the elements
88  for (unsigned int i = 0; i < m_hitvector.size(); i++)
89  delete m_hitvector[i];
90  }
91  m_hitvector.clear();
92  m_ownPolicy = ownPolicy;
93  }

◆ empty()

bool AthenaHitsVector< CaloCalibrationHit >::empty
inlineinherited

Definition at line 137 of file AthenaHitsVector.h.

137 { return m_hitvector.empty(); }

◆ end() [1/2]

iterator AthenaHitsVector< CaloCalibrationHit >::end
inlineinherited

Definition at line 149 of file AthenaHitsVector.h.

149 { return m_hitvector.end(); }

◆ end() [2/2]

Definition at line 143 of file AthenaHitsVector.h.

143  {
144  return const_iterator(m_hitvector.end(), make_const());
145  }

◆ getVector()

const std::vector<CaloCalibrationHit *>& AthenaHitsVector< CaloCalibrationHit >::getVector
inlineinherited

Definition at line 135 of file AthenaHitsVector.h.

135 { return m_hitvector; }

◆ initHelper()

static const std::type_info* AthenaHitsVector< CaloCalibrationHit >::initHelper
inlinestaticinherited

Definition at line 192 of file AthenaHitsVector.h.

◆ Insert()

void AthenaHitsVector< CaloCalibrationHit >::Insert ( CaloCalibrationHit h)
inlineinherited

Definition at line 95 of file AthenaHitsVector.h.

95 { m_hitvector.push_back(h); }

◆ Name()

const std::string& AthenaHitsVector< CaloCalibrationHit >::Name
inlineinherited

Definition at line 130 of file AthenaHitsVector.h.

130 { return m_name; }

◆ operator std::string()

CaloCalibrationHitContainer::operator std::string ( ) const
virtual

Returns a string containing the description of this
CaloCalibrationHitContainer with a dump of all the hits that it contains
Can be used in printouts

Definition at line 27 of file CaloCalibrationHitContainer.cxx.

28 {
29  std::string newline( "\n" ) ;
30  std::ostringstream ss;
31  ss << System::typeinfoName(typeid(*this));
32  ss << ": content " ;
33  ss << newline ;
34 
35  int counter = 0 ;
36 
37  for (const CaloCalibrationHit* hit : *this) { // Loop over Hits
38  ss << "CaloCalibrationHit[" ;
39  ss << counter;
40  ss << "] " ;
41 
42  ss << " ID = " << std::hex << hit->cellID().get_identifier32().get_compact()
43  << std::dec << " ; ";
44 
45  ss << " E=("
46  << hit->energy(0) << ","
47  << hit->energy(1) << ","
48  << hit->energy(2) << ","
49  << hit->energy(3) << ") MeV";
50 
51  ss << newline ;
52 
53  counter ++ ;
54 
55  }
56 
57  ss << newline ;
58  ss << "Number of Hits in this container : " ;
59  ss << counter;
60 
61 
62  return ss.str() ;
63 }

◆ operator[]()

const CaloCalibrationHit * AthenaHitsVector< CaloCalibrationHit >::operator[] ( size_type  n) const
inlineinherited

Definition at line 158 of file AthenaHitsVector.h.

158 { return m_hitvector[n]; }

◆ push_back() [1/2]

void AthenaHitsVector< CaloCalibrationHit >::push_back ( CaloCalibrationHit t)
inlineinherited

Definition at line 153 of file AthenaHitsVector.h.

153 { m_hitvector.push_back(t); }

◆ push_back() [2/2]

void AthenaHitsVector< CaloCalibrationHit >::push_back ( std::unique_ptr< CaloCalibrationHit t)
inlineinherited

Definition at line 154 of file AthenaHitsVector.h.

154 { m_hitvector.push_back(t.release()); }

◆ reserve()

void AthenaHitsVector< CaloCalibrationHit >::reserve ( size_type  n)
inlineinherited

Definition at line 182 of file AthenaHitsVector.h.

182 { m_hitvector.reserve(n); }

◆ resize()

void AthenaHitsVector< CaloCalibrationHit >::resize ( size_type  sz)
inlineinherited

Definition at line 160 of file AthenaHitsVector.h.

160  {
161  if (sz < size()) {
163  iterator i(m_hitvector.begin() + sz), e(m_hitvector.end());
164  while (i != e) {
165  delete *i++;
166  }
167  }
168  m_hitvector.resize(sz);
169  } else {
170  m_hitvector.insert(m_hitvector.end(), sz - m_hitvector.size(), nullptr);
171  }
172  }

◆ setName()

void AthenaHitsVector< CaloCalibrationHit >::setName ( const std::string &  name)
inlineinherited

Definition at line 132 of file AthenaHitsVector.h.

132 { m_name = name; }

◆ Size()

int AthenaHitsVector< CaloCalibrationHit >::Size
inlineinherited

Definition at line 96 of file AthenaHitsVector.h.

96 { return size(); }

◆ size()

size_type AthenaHitsVector< CaloCalibrationHit >::size
inlineinherited

Definition at line 151 of file AthenaHitsVector.h.

151 { return m_hitvector.size(); }

Member Data Documentation

◆ m_hitvector

std::vector<CaloCalibrationHit *> AthenaHitsVector< CaloCalibrationHit >::m_hitvector
protectedinherited

Definition at line 186 of file AthenaHitsVector.h.

◆ m_name

std::string AthenaHitsVector< CaloCalibrationHit >::m_name
protectedinherited

Definition at line 185 of file AthenaHitsVector.h.

◆ m_ownPolicy

Definition at line 187 of file AthenaHitsVector.h.

◆ s_info

const std::type_info *const AthenaHitsVector< CaloCalibrationHit >::s_info
staticinherited

Definition at line 195 of file AthenaHitsVector.h.


The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
fitman.sz
sz
Definition: fitman.py:527
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
Identifier::get_identifier32
Identifier32 get_identifier32() const
Get the 32-bit version Identifier, will be invalid if >32 bits needed.
AthHitVec::OWN_ELEMENTS
@ OWN_ELEMENTS
this data object owns its elements
Definition: AthenaHitsVector.h:32
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
Identifier32::get_compact
value_type get_compact() const
Get the compact id.
Definition: Identifier32.h:44
AthenaHitsVector< CaloCalibrationHit >::m_hitvector
std::vector< CaloCalibrationHit * > m_hitvector
Definition: AthenaHitsVector.h:186
AthenaHitsVector< CaloCalibrationHit >::const_iterator
boost::transform_iterator< make_const, typename CONT::const_iterator > const_iterator
Definition: AthenaHitsVector.h:58
Athena::typeinfoName
std::string typeinfoName(const std::type_info &ti)
Convert a type_info to a demangled string.
Definition: AthenaKernel/src/ClassName.cxx:23
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
AthenaHitsVector< CaloCalibrationHit >::initHelper
static const std::type_info * initHelper()
Definition: AthenaHitsVector.h:192
CaloCalibrationHit::cellID
Identifier cellID() const
Definition: CaloCalibrationHit.h:118
CaloCalibrationHit
Class to store calorimeter calibration hit.
Definition: CaloCalibrationHit.h:23
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
AthenaHitsVector< CaloCalibrationHit >::iterator
typename CONT::iterator iterator
Definition: AthenaHitsVector.h:48
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
h
CaloCalibrationHit::energy
double energy(unsigned int i) const
Definition: CaloCalibrationHit.h:143
AthenaHitsVector< CaloCalibrationHit >::m_name
std::string m_name
Definition: AthenaHitsVector.h:185
AthenaHitsVector< CaloCalibrationHit >::size
size_type size() const
Definition: AthenaHitsVector.h:151
AthenaHitsVector< CaloCalibrationHit >
test_pyathena.counter
counter
Definition: test_pyathena.py:15
DataModel_detail::DVLInfo
Definition: DVLInfo.h:237
calibdata.newline
newline
Definition: calibdata.py:526
AthenaHitsVector< CaloCalibrationHit >::m_ownPolicy
AthHitVec::OwnershipPolicy m_ownPolicy
Definition: AthenaHitsVector.h:187