ATLAS Offline Software
CondMultChanCollection.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
16 #ifndef DBDATAOBJECTS_CONDMULTCHANCOLLECTION_H
17 # define DBDATAOBJECTS_CONDMULTCHANCOLLECTION_H
18 
19 //<<<<<< INCLUDES >>>>>>
20 
23 #include "AthenaKernel/IOVRange.h"
24 #include <vector>
25 
50 template <typename T>
52 {
53 public:
54 
55  typedef unsigned int ChanNum;
56  typedef std::vector<ChanNum> ChanVec;
57  typedef std::vector<IOVRange> IOVVec;
58  typedef typename ChanVec::const_iterator chan_const_iterator;
59  typedef typename ChanVec::iterator chan_iterator;
60  typedef typename ChanVec::size_type chan_size_type;
61  typedef typename IOVVec::const_iterator iov_const_iterator;
62  typedef typename IOVVec::iterator iov_iterator;
63  typedef typename IOVVec::size_type iov_size_type;
64 
67 
71 
74 
78 
81 
83  IOVRange minRange() const;
84 
86  bool hasUniqueIOV() const;
87 
90 
92  void add(const IOVRange& range);
93 
96  void addNewStop(const IOVTime& stop);
97 
101 
104 
107 
108 private:
109 
111 };
112 
113 //<<<<<< INLINE PUBLIC FUNCTIONS >>>>>>
114 //<<<<<< INLINE MEMBER FUNCTIONS >>>>>>
115 
116 
117 template <typename T>
118 inline
120  :
122 {}
123 
125 template <typename T>
126 inline
129 {
130  return (m_impl.chan_begin());
131 }
132 
133 template <typename T>
134 inline
137 {
138  return (m_impl.chan_end());
139 }
140 
142 template <typename T>
143 inline
146 {
147  return (m_impl.chan_size());
148 }
149 
150 
152 template <typename T>
153 inline
156 {
157  return (m_impl.iov_begin());
158 }
159 
160 template <typename T>
161 inline
164 {
165  return (m_impl.iov_end());
166 }
167 
169 template <typename T>
170 inline
173 {
174  return (m_impl.iov_size());
175 }
176 
178 template <typename T>
179 inline
180 IOVRange
182 {
183  return (m_impl.minRange());
184 }
185 
187 template <typename T>
188 inline
189 bool
191 {
192  return (m_impl.hasUniqueIOV());
193 }
194 
196 template <typename T>
197 inline
198 void
200 {
201  m_impl.add(chanNum);
202 }
203 
205 template <typename T>
206 inline
207 void
209 {
210  m_impl.add(range);
211 }
212 
215 template <typename T>
216 inline
217 void
219 {
220  m_impl.addNewStop(stop);
221 }
222 
225 template <typename T>
226 inline
227 StatusCode
229 {
230  return (StatusCode::SUCCESS);
231 }
232 
234 template <typename T>
235 inline
236 void
238 {
239  m_impl.resetChannelNumbers();
240 }
241 
243 template <typename T>
244 inline
247 {
248  return &m_impl;
249 }
250 
251 
252 
253 #endif // DBDATAOBJECTS_CONDMULTCHANCOLLECTION_H
CondMultChanCollection::chan_const_iterator
ChanVec::const_iterator chan_const_iterator
Definition: CondMultChanCollection.h:58
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
CondMultChanCollection::chan_begin
chan_const_iterator chan_begin() const
Access to Channel numbers via iterators.
Definition: CondMultChanCollection.h:128
IOVRange.h
Validity Range object. Holds two IOVTime instances (start and stop)
CondMultChanCollection::resetChannelNumbers
void resetChannelNumbers()
Reset channel numbers - needed to allow sorting.
Definition: CondMultChanCollection.h:237
CondMultChanCollection
A CondMultChanCollection is a template class which can hold a collection of T* objects which are inte...
Definition: CondMultChanCollection.h:52
CondMultChanCollection::chan_iterator
ChanVec::iterator chan_iterator
Definition: CondMultChanCollection.h:59
CondMultChanCollection::CondMultChanCollection
CondMultChanCollection()
Default constructor.
Definition: CondMultChanCollection.h:119
CondMultChanCollection::minRange
IOVRange minRange() const
Current minimal IOVRange.
Definition: CondMultChanCollection.h:181
CondMultChanCollection::ChanVec
std::vector< ChanNum > ChanVec
Definition: CondMultChanCollection.h:56
CondMultChanCollection::iov_iterator
IOVVec::iterator iov_iterator
Definition: CondMultChanCollection.h:62
CondMultChanCollection::chan_size
chan_size_type chan_size() const
number of channels
Definition: CondMultChanCollection.h:145
CondMultChanCollection::implementation
CondMultChanCollImpl * implementation()
Get implementation.
Definition: CondMultChanCollection.h:246
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
CondMultChanCollection::iov_end
iov_const_iterator iov_end() const
Definition: CondMultChanCollection.h:163
CondMultChanCollection::chan_end
chan_const_iterator chan_end() const
Definition: CondMultChanCollection.h:136
IOVTime
Basic time unit for IOVSvc. Hold time as a combination of run and event numbers.
Definition: IOVTime.h:33
checkCoolLatestUpdate.chanNum
chanNum
Definition: checkCoolLatestUpdate.py:27
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
CondMultChanCollection::m_impl
CondMultChanCollImpl m_impl
Definition: CondMultChanCollection.h:110
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
CondMultChanCollection::chan_size_type
ChanVec::size_type chan_size_type
Definition: CondMultChanCollection.h:60
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
CondMultChanCollection::iov_begin
iov_const_iterator iov_begin() const
Access to IOVs via iterators.
Definition: CondMultChanCollection.h:155
CondMultChanCollection::iov_const_iterator
IOVVec::const_iterator iov_const_iterator
Definition: CondMultChanCollection.h:61
CondMultChanCollection::addNewStop
void addNewStop(const IOVTime &stop)
Add new stop time to minRange - make sure that stop is <= to new stop
Definition: CondMultChanCollection.h:218
CondMultChanCollection::iov_size
iov_size_type iov_size() const
number of IOVs
Definition: CondMultChanCollection.h:172
CondMultChanCollImpl
A CondMultChanCollImpl defines the non-template part of a CondMultChanCollection. It holds the vector...
Definition: CondMultChanCollImpl.h:38
CondMultChanCollection::hasUniqueIOV
bool hasUniqueIOV() const
Check whether there is a unique IOV for all channels.
Definition: CondMultChanCollection.h:190
CondMultChanCollection::add
void add(ChanNum chanNum)
Adding in channel numbers.
Definition: CondMultChanCollection.h:199
CondMultChanCollection::iov_size_type
IOVVec::size_type iov_size_type
Definition: CondMultChanCollection.h:63
CondMultChanCollection::initialize
virtual StatusCode initialize()
Initialization done after creation or read back - derived classes may augment the functionality.
Definition: CondMultChanCollection.h:228
CondMultChanCollection::add
void add(const IOVRange &range)
Adding in iov ranges.
Definition: CondMultChanCollection.h:208
CondMultChanCollection::ChanNum
unsigned int ChanNum
Definition: CondMultChanCollection.h:55
DataVector.h
An STL vector of pointers that by default owns its pointed-to elements.
CondMultChanCollection::IOVVec
std::vector< IOVRange > IOVVec
Definition: CondMultChanCollection.h:57
CondMultChanCollImpl.h
This file defines the non-template part of a CondMultChanCollection.
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35