ATLAS Offline Software
Public Types | Public Member Functions | Private Attributes | List of all members
CondMultChanCollImpl Class Reference

A CondMultChanCollImpl defines the non-template part of a CondMultChanCollection. It holds the vectors of: channel numbers IOVs tokens to the DataObject a pointer to the CondAttrListCollection, used to register in COOL. More...

#include <CondMultChanCollImpl.h>

Collaboration diagram for CondMultChanCollImpl:

Public Types

typedef unsigned int ChanNum
 
typedef std::vector< ChanNumChanVec
 
typedef std::vector< IOVRangeIOVVec
 
typedef std::vector< std::string > TokenVec
 
typedef ChanVec::const_iterator chan_const_iterator
 
typedef ChanVec::iterator chan_iterator
 
typedef ChanVec::size_type chan_size_type
 
typedef IOVVec::const_iterator iov_const_iterator
 
typedef IOVVec::iterator iov_iterator
 
typedef IOVVec::size_type iov_size_type
 
typedef TokenVec::const_iterator token_const_iterator
 
typedef TokenVec::iterator token_iterator
 
typedef TokenVec::size_type token_size_type
 

Public Member Functions

 CondMultChanCollImpl ()
 Default constructor. More...
 
virtual ~CondMultChanCollImpl ()
 Default destructor. More...
 
chan_const_iterator chan_begin () const
 Access to Channel numbers via iterators. More...
 
chan_const_iterator chan_end () const
 
chan_size_type chan_size () const
 number of channels More...
 
iov_const_iterator iov_begin () const
 Access to IOVs via iterators. More...
 
iov_const_iterator iov_end () const
 
iov_size_type iov_size () const
 number of IOVs More...
 
IOVRange minRange () const
 Current minimal IOVRange. More...
 
bool hasUniqueIOV () const
 Check whether there is a unique IOV for all channels. More...
 
token_const_iterator token_begin () const
 Access to tokens via iterators. More...
 
token_const_iterator token_end () const
 
token_size_type token_size () const
 number of tokens More...
 
void add (ChanNum chanNum)
 Adding in channel numbers. More...
 
void add (const IOVRange &range)
 Adding in iov ranges. More...
 
void addNewStop (const IOVTime &stop)
 Add new stop time to minRange - make sure that stop is <= to new stop
More...
 
void add (const std::string &token)
 Adding in token. More...
 
void setAttrListColl (CondAttrListCollection *coll)
 Set pointer to the CondAttrListCollection. More...
 
void resetChannelNumbers ()
 Reset channel numbers - needed to allow sorting. More...
 
void resetTokens ()
 Reset tokens - needed to multiple I/O of the same object. More...
 

Private Attributes

CondAttrListCollectionm_attrListColl
 
ChanVec m_channels
 
IOVVec m_iovs
 
TokenVec m_tokens
 
IOVRange m_minRange
 
bool m_hasUniqueIOV
 
bool m_checkRunEventTime
 

Detailed Description

A CondMultChanCollImpl defines the non-template part of a CondMultChanCollection. It holds the vectors of: channel numbers IOVs tokens to the DataObject a pointer to the CondAttrListCollection, used to register in COOL.

Definition at line 37 of file CondMultChanCollImpl.h.

Member Typedef Documentation

◆ chan_const_iterator

typedef ChanVec::const_iterator CondMultChanCollImpl::chan_const_iterator

Definition at line 45 of file CondMultChanCollImpl.h.

◆ chan_iterator

typedef ChanVec::iterator CondMultChanCollImpl::chan_iterator

Definition at line 46 of file CondMultChanCollImpl.h.

◆ chan_size_type

typedef ChanVec::size_type CondMultChanCollImpl::chan_size_type

Definition at line 47 of file CondMultChanCollImpl.h.

◆ ChanNum

typedef unsigned int CondMultChanCollImpl::ChanNum

Definition at line 41 of file CondMultChanCollImpl.h.

◆ ChanVec

typedef std::vector<ChanNum> CondMultChanCollImpl::ChanVec

Definition at line 42 of file CondMultChanCollImpl.h.

◆ iov_const_iterator

typedef IOVVec::const_iterator CondMultChanCollImpl::iov_const_iterator

Definition at line 48 of file CondMultChanCollImpl.h.

◆ iov_iterator

typedef IOVVec::iterator CondMultChanCollImpl::iov_iterator

Definition at line 49 of file CondMultChanCollImpl.h.

◆ iov_size_type

typedef IOVVec::size_type CondMultChanCollImpl::iov_size_type

Definition at line 50 of file CondMultChanCollImpl.h.

◆ IOVVec

typedef std::vector<IOVRange> CondMultChanCollImpl::IOVVec

Definition at line 43 of file CondMultChanCollImpl.h.

◆ token_const_iterator

typedef TokenVec::const_iterator CondMultChanCollImpl::token_const_iterator

Definition at line 51 of file CondMultChanCollImpl.h.

◆ token_iterator

typedef TokenVec::iterator CondMultChanCollImpl::token_iterator

Definition at line 52 of file CondMultChanCollImpl.h.

◆ token_size_type

typedef TokenVec::size_type CondMultChanCollImpl::token_size_type

Definition at line 53 of file CondMultChanCollImpl.h.

◆ TokenVec

typedef std::vector<std::string> CondMultChanCollImpl::TokenVec

Definition at line 44 of file CondMultChanCollImpl.h.

Constructor & Destructor Documentation

◆ CondMultChanCollImpl()

CondMultChanCollImpl::CondMultChanCollImpl ( )
inline

Default constructor.

Definition at line 127 of file CondMultChanCollImpl.h.

128  :
129  m_attrListColl(0),
130  // Assume run/event for minRange
133  m_hasUniqueIOV(true),
134  m_checkRunEventTime(true)
135 {}

◆ ~CondMultChanCollImpl()

CondMultChanCollImpl::~CondMultChanCollImpl ( )
inlinevirtual

Default destructor.

Definition at line 139 of file CondMultChanCollImpl.h.

140 {}

Member Function Documentation

◆ add() [1/3]

void CondMultChanCollImpl::add ( ChanNum  chanNum)
inline

Adding in channel numbers.

Definition at line 232 of file CondMultChanCollImpl.h.

233 {
234  m_channels.push_back(chanNum);
235 }

◆ add() [2/3]

void CondMultChanCollImpl::add ( const IOVRange range)
inline

Adding in iov ranges.

Definition at line 240 of file CondMultChanCollImpl.h.

241 {
242  // Check if we're adding too many iovs - may be a 2nd pass
243  if (m_iovs.size() >= m_channels.size()) {
244  // Should throw an exception here because we are trying to
245  // add more iovs than channels. Now we just return
246  return;
247  }
248 
249  // Save range
250  m_iovs.push_back(range);
251 
252  // If CondAttrListCollection exists, also add to it
253  if(m_attrListColl) {
254  // Get channel number
255  ChanNum chan = m_channels[m_iovs.size()-1];
257  }
258 
259  if(m_checkRunEventTime) {
260  // On the first push_back we must check if we're using a time
261  // stamp and if so, reset the minRange
262  if(range.start().isTimestamp()) {
265  }
266  m_checkRunEventTime = false;
267  }
268 
269  // Accumulate minRange
271  if (m_minRange.start() < range.start()) start = range.start();
273  if (range.stop() < m_minRange.stop()) stop = range.stop();
275  if (m_hasUniqueIOV && range != m_minRange)m_hasUniqueIOV = false;
276 }

◆ add() [3/3]

void CondMultChanCollImpl::add ( const std::string &  token)
inline

Adding in token.

Definition at line 292 of file CondMultChanCollImpl.h.

293 {
294  m_tokens.push_back(token);
295 }

◆ addNewStop()

void CondMultChanCollImpl::addNewStop ( const IOVTime stop)
inline

Add new stop time to minRange - make sure that stop is <= to new stop

Add new stop time to minRange - make sure that stop is <= to new stop.

Definition at line 282 of file CondMultChanCollImpl.h.

283 {
284  if (stop < m_minRange.stop()) {
286  }
287 }

◆ chan_begin()

CondMultChanCollImpl::chan_const_iterator CondMultChanCollImpl::chan_begin ( ) const
inline

Access to Channel numbers via iterators.

Definition at line 146 of file CondMultChanCollImpl.h.

147 {
148  return (m_channels.begin());
149 }

◆ chan_end()

CondMultChanCollImpl::chan_const_iterator CondMultChanCollImpl::chan_end ( ) const
inline

Definition at line 153 of file CondMultChanCollImpl.h.

154 {
155  return (m_channels.end());
156 }

◆ chan_size()

CondMultChanCollImpl::chan_size_type CondMultChanCollImpl::chan_size ( ) const
inline

number of channels

Definition at line 161 of file CondMultChanCollImpl.h.

162 {
163  return (m_channels.size());
164 }

◆ hasUniqueIOV()

bool CondMultChanCollImpl::hasUniqueIOV ( ) const
inline

Check whether there is a unique IOV for all channels.

Definition at line 201 of file CondMultChanCollImpl.h.

202 {
203  return (m_hasUniqueIOV);
204 }

◆ iov_begin()

CondMultChanCollImpl::iov_const_iterator CondMultChanCollImpl::iov_begin ( ) const
inline

Access to IOVs via iterators.

Definition at line 170 of file CondMultChanCollImpl.h.

171 {
172  return (m_iovs.begin());
173 }

◆ iov_end()

CondMultChanCollImpl::iov_const_iterator CondMultChanCollImpl::iov_end ( ) const
inline

Definition at line 177 of file CondMultChanCollImpl.h.

178 {
179  return (m_iovs.end());
180 }

◆ iov_size()

CondMultChanCollImpl::iov_size_type CondMultChanCollImpl::iov_size ( ) const
inline

number of IOVs

number of iovs

Definition at line 185 of file CondMultChanCollImpl.h.

186 {
187  return (m_iovs.size());
188 }

◆ minRange()

IOVRange CondMultChanCollImpl::minRange ( ) const
inline

Current minimal IOVRange.

Definition at line 193 of file CondMultChanCollImpl.h.

194 {
195  return (m_minRange);
196 }

◆ resetChannelNumbers()

void CondMultChanCollImpl::resetChannelNumbers ( )
inline

Reset channel numbers - needed to allow sorting.

Definition at line 308 of file CondMultChanCollImpl.h.

309 {
310  m_channels.clear();
311 }

◆ resetTokens()

void CondMultChanCollImpl::resetTokens ( )
inline

Reset tokens - needed to multiple I/O of the same object.

Definition at line 316 of file CondMultChanCollImpl.h.

317 {
318  m_tokens.clear();
319 }

◆ setAttrListColl()

void CondMultChanCollImpl::setAttrListColl ( CondAttrListCollection coll)
inline

Set pointer to the CondAttrListCollection.

Add pointer to the CondAttrListCollection.

Definition at line 300 of file CondMultChanCollImpl.h.

301 {
302  m_attrListColl = coll;
303 }

◆ token_begin()

CondMultChanCollImpl::token_const_iterator CondMultChanCollImpl::token_begin ( ) const
inline

Access to tokens via iterators.

Definition at line 209 of file CondMultChanCollImpl.h.

210 {
211  return m_tokens.begin();
212 }

◆ token_end()

CondMultChanCollImpl::token_const_iterator CondMultChanCollImpl::token_end ( ) const
inline

Definition at line 216 of file CondMultChanCollImpl.h.

217 {
218  return m_tokens.end();
219 }

◆ token_size()

CondMultChanCollImpl::token_size_type CondMultChanCollImpl::token_size ( ) const
inline

number of tokens

Definition at line 224 of file CondMultChanCollImpl.h.

225 {
226  return m_tokens.size();
227 }

Member Data Documentation

◆ m_attrListColl

CondAttrListCollection* CondMultChanCollImpl::m_attrListColl
private

Definition at line 113 of file CondMultChanCollImpl.h.

◆ m_channels

ChanVec CondMultChanCollImpl::m_channels
private

Definition at line 114 of file CondMultChanCollImpl.h.

◆ m_checkRunEventTime

bool CondMultChanCollImpl::m_checkRunEventTime
private

Definition at line 119 of file CondMultChanCollImpl.h.

◆ m_hasUniqueIOV

bool CondMultChanCollImpl::m_hasUniqueIOV
private

Definition at line 118 of file CondMultChanCollImpl.h.

◆ m_iovs

IOVVec CondMultChanCollImpl::m_iovs
private

Definition at line 115 of file CondMultChanCollImpl.h.

◆ m_minRange

IOVRange CondMultChanCollImpl::m_minRange
private

Definition at line 117 of file CondMultChanCollImpl.h.

◆ m_tokens

TokenVec CondMultChanCollImpl::m_tokens
private

Definition at line 116 of file CondMultChanCollImpl.h.


The documentation for this class was generated from the following file:
CondMultChanCollImpl::m_tokens
TokenVec m_tokens
Definition: CondMultChanCollImpl.h:116
IOVRange
Validity Range object. Holds two IOVTimes (start and stop)
Definition: IOVRange.h:30
IOVTime::MAXRUN
static constexpr uint32_t MAXRUN
Definition: IOVTime.h:48
mergePhysValFiles.start
start
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:14
IOVRange::start
const IOVTime & start() const
Definition: IOVRange.h:38
CondMultChanCollImpl::m_checkRunEventTime
bool m_checkRunEventTime
Definition: CondMultChanCollImpl.h:119
PixelModuleFeMask_create_db.stop
int stop
Definition: PixelModuleFeMask_create_db.py:76
IOVTime::MINRUN
static constexpr uint32_t MINRUN
Definition: IOVTime.h:44
CondMultChanCollImpl::m_minRange
IOVRange m_minRange
Definition: CondMultChanCollImpl.h:117
IOVRange::stop
const IOVTime & stop() const
Definition: IOVRange.h:39
CondMultChanCollImpl::m_iovs
IOVVec m_iovs
Definition: CondMultChanCollImpl.h:115
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
ReadCellNoiseFromCool.chan
chan
Definition: ReadCellNoiseFromCool.py:52
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
IOVTime::MAXTIMESTAMP
static constexpr uint64_t MAXTIMESTAMP
Definition: IOVTime.h:58
CondMultChanCollImpl::m_attrListColl
CondAttrListCollection * m_attrListColl
Definition: CondMultChanCollImpl.h:113
CondMultChanCollImpl::m_channels
ChanVec m_channels
Definition: CondMultChanCollImpl.h:114
IOVTime::MAXEVENT
static constexpr uint32_t MAXEVENT
Definition: IOVTime.h:51
CondMultChanCollImpl::ChanNum
unsigned int ChanNum
Definition: CondMultChanCollImpl.h:41
IOVTime::MINEVENT
static constexpr uint32_t MINEVENT
Definition: IOVTime.h:50
CondMultChanCollImpl::m_hasUniqueIOV
bool m_hasUniqueIOV
Definition: CondMultChanCollImpl.h:118
IOVTime::MINTIMESTAMP
static constexpr uint64_t MINTIMESTAMP
Definition: IOVTime.h:56
CondAttrListCollection::add
bool add(ChanNum chanNum, const AttributeList &attributeList)
Adding in chan/attrList pairs.
Definition: CondAttrListCollection.h:452