CMS 3D CMS Logo

Public Types | Public Member Functions | Private Attributes

cond::IOVRange Class Reference

#include <IOVProxy.h>

List of all members.

Public Types

typedef iov_range_iterator const_iterator

Public Member Functions

IOVElementProxy back () const
const_iterator begin () const
const_iterator end () const
const_iterator find (cond::Time_t time) const
IOVElementProxy front () const
 IOVRange ()
 IOVRange (const boost::shared_ptr< IOVProxyData > &iov, int low, int high)
 IOVRange (const IOVRange &rhs)
IOVRangeoperator= (const IOVRange &rhs)
size_t size () const

Private Attributes

int m_high
boost::shared_ptr< IOVProxyDatam_iov
int m_low

Detailed Description

Definition at line 102 of file IOVProxy.h.


Member Typedef Documentation

Definition at line 105 of file IOVProxy.h.


Constructor & Destructor Documentation

cond::IOVRange::IOVRange ( )

Definition at line 65 of file IOVProxy.cc.

                      :
  m_iov(),
  m_low(-1),
  m_high(-1){
}
cond::IOVRange::IOVRange ( const boost::shared_ptr< IOVProxyData > &  iov,
int  low,
int  high 
)

Definition at line 71 of file IOVProxy.cc.

                                    :
  m_iov( iov ),
  m_low( low ),
  m_high( high ){
}
cond::IOVRange::IOVRange ( const IOVRange rhs)

Definition at line 79 of file IOVProxy.cc.

                                           :
  m_iov( rhs.m_iov ),
  m_low( rhs.m_low ),
  m_high( rhs.m_high ){
}

Member Function Documentation

cond::IOVElementProxy cond::IOVRange::back ( ) const

Definition at line 105 of file IOVProxy.cc.

Referenced by BOOST_PYTHON_MODULE().

                                             {
  IterHelp helper(*m_iov);
  return helper( m_high );
}
const_iterator cond::IOVRange::begin ( void  ) const [inline]

Definition at line 116 of file IOVProxy.h.

References m_iov, and m_low.

Referenced by BOOST_PYTHON_MODULE(), CondBasicIter::setMax(), CondBasicIter::setMin(), and CondBasicIter::setRange().

                                 {
      return  boost::make_transform_iterator(boost::counting_iterator<int>(m_low),
                                             IterHelp(*m_iov));
    }
const_iterator cond::IOVRange::end ( void  ) const [inline]

Definition at line 121 of file IOVProxy.h.

References m_high, and m_iov.

Referenced by BOOST_PYTHON_MODULE(), CondBasicIter::setMax(), CondBasicIter::setMin(), and CondBasicIter::setRange().

                               {
      return  boost::make_transform_iterator(boost::counting_iterator<int>(m_high),
                                             IterHelp(*m_iov));
    }
cond::IOVRange::const_iterator cond::IOVRange::find ( cond::Time_t  time) const

Definition at line 92 of file IOVProxy.cc.

References end, and n.

                                                                   {
  int n = m_iov->data->find(time)-m_iov->data->iovs().begin();
  return (n<m_low || m_high<n ) ? 
    end() :  
    boost::make_transform_iterator(boost::counting_iterator<int>(n),
                                   IterHelp(*m_iov));
}
cond::IOVElementProxy cond::IOVRange::front ( ) const

Definition at line 100 of file IOVProxy.cc.

Referenced by BOOST_PYTHON_MODULE().

                                              {
  IterHelp helper(*m_iov);
  return helper( m_low );
}
cond::IOVRange & cond::IOVRange::operator= ( const IOVRange rhs)

Definition at line 85 of file IOVProxy.cc.

References m_high, m_iov, and m_low.

                                                          {
  m_iov = rhs.m_iov;
  m_low = rhs.m_low;
  m_high = rhs.m_high;
  return *this;
}
size_t cond::IOVRange::size ( void  ) const

Definition at line 110 of file IOVProxy.cc.

Referenced by BOOST_PYTHON_MODULE().

                                {
  return m_high-m_low;
}

Member Data Documentation

int cond::IOVRange::m_high [private]

Definition at line 137 of file IOVProxy.h.

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

boost::shared_ptr<IOVProxyData> cond::IOVRange::m_iov [private]

Definition at line 135 of file IOVProxy.h.

Referenced by begin(), end(), and operator=().

int cond::IOVRange::m_low [private]

Definition at line 136 of file IOVProxy.h.

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