CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cond::persistency::IOVProxy::Iterator Class Reference

#include <IOVProxy.h>

Inheritance diagram for cond::persistency::IOVProxy::Iterator:

Public Member Functions

 Iterator ()
 
 Iterator (IOVContainer::const_iterator current, IOVContainer::const_iterator end, cond::TimeType timeType, cond::Time_t lastTill, cond::Time_t endOfValidity)
 
 Iterator (const Iterator &rhs)
 
bool operator!= (const Iterator &rhs) const
 
cond::Iov_t operator* ()
 
Iteratoroperator++ ()
 
Iterator operator++ (int)
 
Iteratoroperator= (const Iterator &rhs)
 
bool operator== (const Iterator &rhs) const
 

Private Attributes

IOVContainer::const_iterator m_current
 
IOVContainer::const_iterator m_end
 
cond::Time_t m_endOfValidity
 
cond::Time_t m_lastTill
 
cond::TimeType m_timeType
 

Detailed Description

Definition at line 32 of file IOVProxy.h.

Constructor & Destructor Documentation

cond::persistency::IOVProxy::Iterator::Iterator ( )

Definition at line 35 of file IOVProxy.cc.

35  :
36  m_current(),
37  m_end(),
41  }
const Time_t MIN_VAL(0)
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56
const Time_t MAX_VAL(std::numeric_limits< Time_t >::max())
cond::persistency::IOVProxy::Iterator::Iterator ( IOVContainer::const_iterator  current,
IOVContainer::const_iterator  end,
cond::TimeType  timeType,
cond::Time_t  lastTill,
cond::Time_t  endOfValidity 
)

Definition at line 43 of file IOVProxy.cc.

44  :
45  m_current( current ),
46  m_end( end ),
48  m_lastTill( lastTill ),
50  }
cond::TimeType timeType() const
Definition: IOVProxy.cc:227
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56
cond::Time_t endOfValidity() const
Definition: IOVProxy.cc:239
Iterator end() const
Definition: IOVProxy.cc:297
cond::persistency::IOVProxy::Iterator::Iterator ( const Iterator rhs)

Definition at line 52 of file IOVProxy.cc.

52  :
53  m_current( rhs.m_current ),
54  m_end( rhs.m_end ),
55  m_timeType( rhs.m_timeType ),
56  m_lastTill( rhs.m_lastTill ),
57  m_endOfValidity( rhs.m_endOfValidity ){
58  }
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56

Member Function Documentation

bool cond::persistency::IOVProxy::Iterator::operator!= ( const Iterator rhs) const

Definition at line 107 of file IOVProxy.cc.

References operator==().

107  {
108  return !operator==( rhs );
109  }
bool operator==(const Iterator &rhs) const
Definition: IOVProxy.cc:101
cond::Iov_t cond::persistency::IOVProxy::Iterator::operator* ( )

Definition at line 71 of file IOVProxy.cc.

References m_current, m_end, m_endOfValidity, m_lastTill, m_timeType, GetRecoTauVFromDQM_MC_cff::next, cond::Iov_t::payloadId, cond::Iov_t::since, cond::Iov_t::till, and cond::time::tillTimeFromNextSince().

71  {
72  cond::Iov_t retVal;
73  retVal.since = std::get<0>(*m_current);
74  auto next = m_current;
75  next++;
76 
77  // default is the end of validity when set...
78  retVal.till = m_endOfValidity;
79  // for the till, the next element has to be verified!
80  if( next != m_end ){
81  // the till has to be calculated according to the time type ( because of the packing for some types )
82  retVal.till = cond::time::tillTimeFromNextSince( std::get<0>(*next), m_timeType );
83  } else {
84  retVal.till = m_lastTill;
85  }
86  retVal.payloadId = std::get<1>(*m_current);
87  return retVal;
88  }
Time_t since
Definition: Types.h:55
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
Hash payloadId
Definition: Types.h:57
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56
Time_t tillTimeFromNextSince(Time_t nextSince, TimeType timeType)
Definition: Time.cc:33
Time_t till
Definition: Types.h:56
IOVProxy::Iterator & cond::persistency::IOVProxy::Iterator::operator++ ( )

Definition at line 90 of file IOVProxy.cc.

References m_current.

Referenced by operator++().

90  {
91  m_current++;
92  return *this;
93  }
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVProxy::Iterator cond::persistency::IOVProxy::Iterator::operator++ ( int  )

Definition at line 95 of file IOVProxy.cc.

References operator++(), and tmp.

95  {
96  Iterator tmp( *this );
97  operator++();
98  return tmp;
99  }
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
IOVProxy::Iterator & cond::persistency::IOVProxy::Iterator::operator= ( const Iterator rhs)

Definition at line 60 of file IOVProxy.cc.

References m_current, m_end, m_endOfValidity, m_lastTill, and m_timeType.

60  {
61  if( this != &rhs ){
62  m_current = rhs.m_current;
63  m_end = rhs.m_end;
64  m_timeType = rhs.m_timeType;
65  m_lastTill = rhs.m_lastTill;
66  m_endOfValidity = rhs.m_endOfValidity;
67  }
68  return *this;
69  }
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56
bool cond::persistency::IOVProxy::Iterator::operator== ( const Iterator rhs) const

Definition at line 101 of file IOVProxy.cc.

References m_current, and m_end.

Referenced by operator!=().

101  {
102  if( m_current != rhs.m_current ) return false;
103  if( m_end != rhs.m_end ) return false;
104  return true;
105  }
IOVContainer::const_iterator m_current
Definition: IOVProxy.h:55
IOVContainer::const_iterator m_end
Definition: IOVProxy.h:56

Member Data Documentation

IOVContainer::const_iterator cond::persistency::IOVProxy::Iterator::m_current
private

Definition at line 55 of file IOVProxy.h.

Referenced by operator*(), operator++(), operator=(), and operator==().

IOVContainer::const_iterator cond::persistency::IOVProxy::Iterator::m_end
private

Definition at line 56 of file IOVProxy.h.

Referenced by operator*(), operator=(), and operator==().

cond::Time_t cond::persistency::IOVProxy::Iterator::m_endOfValidity
private

Definition at line 59 of file IOVProxy.h.

Referenced by operator*(), and operator=().

cond::Time_t cond::persistency::IOVProxy::Iterator::m_lastTill
private

Definition at line 58 of file IOVProxy.h.

Referenced by operator*(), and operator=().

cond::TimeType cond::persistency::IOVProxy::Iterator::m_timeType
private

Definition at line 57 of file IOVProxy.h.

Referenced by operator*(), and operator=().