ATLAS Offline Software
Loading...
Searching...
No Matches
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
16namespace xAOD {
17
31class RingSet_v1 : public SG::AuxElement {
32
33 public:
34
37 typedef std::vector<float>::iterator iterator;
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//==============================================================================
147inline
149
150//==============================================================================
151inline
153 SG::AuxElement(ringset)
154{
155 this->makePrivateStore(ringset);
156}
157
158//==============================================================================
159inline
160RingSet_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}
167
168
169
170
171} // End of namespace xAOD
172
173#include "xAODCore/BaseInfo.h"
175
176#endif // XAODCALORINGS_VERSIONS_RINGSET_V1_H
Base class for elements of a container that can have aux data.
std::vector< size_t > vec
#define SG_BASE(D, B)
Declare that class D derives from class B.
Base class for elements of a container that can have aux data.
Definition AuxElement.h:483
void makePrivateStore()
Create a new (empty) private store for this object.
bool hasStore() const
Return true if this object has an associated store.
const SG::AuxVectorData * container() const
Return the container holding this element.
AuxElement()
Default constructor.
Class holding a set of rings.
Definition RingSet_v1.h:31
void addRing(float r)
add ring to RingSet
RingSet_v1()
Default empty constructor.
Definition RingSet_v1.h:148
std::vector< float >::const_iterator const_iterator
const Iterator to rings Et
Definition RingSet_v1.h:39
iterator begin()
ring begin() iterator
RingSet_v1 & operator=(const RingSet_v1 &clrings)
Assignment Operator.
float & operator[](const unsigned int i)
Get/set ring Et at ith position.
iterator end()
ring end() iterator
unsigned size() const
Get rings size.
void copyTo(std::vector< float > &vec) const
Copy ringset to std::vector end:
void setRingsE(const std::vector< float > &)
Get/set rings holden by RingSet.
const std::vector< float > & ringsE() const
Get rings holden by RingSet.
void clear()
clear rings
float & at(const unsigned int i)
Get/set ring Et at ith position.
std::vector< float >::iterator iterator
Definition RingSet_v1.h:37
void print(std::ostream &stream) const
int r
Definition globals.cxx:22
Forward declaration.
ICaloAffectedTool is abstract interface for tools checking if 4 mom is in calo affected region.