ATLAS Offline Software
RingSet_v1.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 /*
3  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4 */
5 #ifndef XAODCALORINGS_VERSIONS_RINGSET_V1_H
6 #define XAODCALORINGS_VERSIONS_RINGSET_V1_H
7 
8 // std includes:
9 #include <vector>
10 #include <iosfwd>
11 
12 // EDM include(s):
15 
16 namespace xAOD {
17 
31 class RingSet_v1 : public SG::AuxElement {
32 
33  public:
34 
39  typedef std::vector<float>::const_iterator const_iterator;
41 
42 
45 
48  RingSet_v1();
52  RingSet_v1(const RingSet_v1& ringset);
56  RingSet_v1(const size_t size, const float value = 0);
58 
62 
65 
68  float &at(const unsigned int i);
72  float &operator [](const unsigned int i);
76  float at(const unsigned int i) const;
80  float operator [](const unsigned int i) const;
84  const std::vector<float>& ringsE() const;
88  void setRingsE(const std::vector<float>&);
90 
93 
96  unsigned size() const;
100  void clear();
104  void addRing(float r);
108  iterator begin();
112  iterator end();
116  const_iterator begin() const;
120  const_iterator end() const;
124  void copyTo(std::vector<float> &vec) const;
126 
129 
132  RingSet_v1& operator=(const RingSet_v1& clrings);
134 
136 
139  void print( std::ostream &stream ) const;
141 
142 };
143 
146 //==============================================================================
147 inline
149 
150 //==============================================================================
151 inline
153  SG::AuxElement(ringset)
154 {
155  this->makePrivateStore(ringset);
156 }
157 
158 //==============================================================================
159 inline
160 RingSet_v1::RingSet_v1(const size_t size, const float value)
161 {
162  if (!this->container() && !this->hasStore() ) {
164  }
165  setRingsE(std::vector<float>(size,value));
166 }
168 
169 
170 
171 } // End of namespace xAOD
172 
173 #include "xAODCore/BaseInfo.h"
175 
176 #endif // XAODCALORINGS_VERSIONS_RINGSET_V1_H
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
beamspotman.r
def r
Definition: beamspotman.py:676
xAOD::RingSet_v1::RingSet_v1
RingSet_v1()
Default empty constructor.
Definition: RingSet_v1.h:148
xAOD::RingSet_v1::operator=
RingSet_v1 & operator=(const RingSet_v1 &clrings)
Assignment Operator.
Definition: RingSet_v1.cxx:121
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::AuxElement
Base class for elements of a container that can have aux data.
Definition: AuxElement.h:483
xAOD::RingSet_v1::at
float & at(const unsigned int i)
Get/set ring Et at ith position.
Definition: RingSet_v1.cxx:42
BaseInfo.h
athena.value
value
Definition: athena.py:124
xAOD
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.
Definition: ICaloAffectedTool.h:24
vec
std::vector< size_t > vec
Definition: CombinationsGeneratorTest.cxx:12
xAOD::RingSet_v1
Class holding a set of rings.
Definition: RingSet_v1.h:31
xAOD::RingSet_v1::iterator
std::vector< float >::iterator iterator
Definition: RingSet_v1.h:37
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
xAOD::RingSet_v1::print
void print(std::ostream &stream) const
Definition: RingSet_v1.cxx:115
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
lumiFormat.i
int i
Definition: lumiFormat.py:85
xAOD::RingSet_v1::copyTo
void copyTo(std::vector< float > &vec) const
Copy ringset to std::vector end:
Definition: RingSet_v1.cxx:108
SG_BASE
SG_BASE(xAOD::RingSet_v1, SG::AuxElement)
xAOD::RingSet_v1::ringsE
const std::vector< float > & ringsE() const
Get rings holden by RingSet.
xAOD::RingSet_v1::setRingsE
void setRingsE(const std::vector< float > &)
Get/set rings holden by RingSet.
CaloRingsDefs.h
xAOD::RingSet_v1::begin
iterator begin()
ring begin() iterator
Definition: RingSet_v1.cxx:84
SG::AuxElement::makePrivateStore
void makePrivateStore()
Create a new (empty) private store for this object.
Definition: AuxElement.cxx:192
xAOD::RingSet_v1::size
unsigned size() const
Get rings size.
SG::AuxElement::hasStore
bool hasStore() const
Return true if this object has an associated store.
Definition: AuxElement.cxx:398
xAOD::RingSet_v1::const_iterator
std::vector< float >::const_iterator const_iterator
const Iterator to rings Et
Definition: RingSet_v1.h:39
xAOD::RingSet_v1::end
iterator end()
ring end() iterator
Definition: RingSet_v1.cxx:90
xAOD::RingSet_v1::clear
void clear()
clear rings
SG::AuxElement::container
const SG::AuxVectorData * container() const
Return the container holding this element.
xAOD::RingSet_v1::operator[]
float & operator[](const unsigned int i)
Get/set ring Et at ith position.
Definition: RingSet_v1.cxx:47
AuxElement.h
Base class for elements of a container that can have aux data.
xAOD::RingSet_v1::addRing
void addRing(float r)
add ring to RingSet
Definition: RingSet_v1.cxx:79