CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
VIterator< Item > Class Template Reference

#include <DQMStoreStats.h>

Inheritance diagram for VIterator< Item >:
Iterator< Item >

Public Member Functions

Item CurrentItem () const override
 
void First () override
 
virtual int getIndex ()
 
bool IsDone () const override
 
void Next () override
 
virtual int size ()
 
 VIterator (const std::vector< Item > *aVector)
 
 ~VIterator () override=default
 
- Public Member Functions inherited from Iterator< Item >
virtual ~Iterator ()=default
 

Private Attributes

unsigned int index
 
const std::vector< Item > * vector_
 

Additional Inherited Members

- Protected Member Functions inherited from Iterator< Item >
 Iterator ()=default
 

Detailed Description

template<class Item>
class VIterator< Item >

Definition at line 107 of file DQMStoreStats.h.

Constructor & Destructor Documentation

◆ VIterator()

template<class Item>
VIterator< Item >::VIterator ( const std::vector< Item > *  aVector)
inline

Definition at line 109 of file DQMStoreStats.h.

109 : vector_(aVector), index(0) {}

◆ ~VIterator()

template<class Item>
VIterator< Item >::~VIterator ( )
overridedefault

Member Function Documentation

◆ CurrentItem()

template<class Item>
Item VIterator< Item >::CurrentItem ( ) const
inlineoverridevirtual

Implements Iterator< Item >.

Definition at line 122 of file DQMStoreStats.h.

122 { return vector_->operator[](index); }

References VIterator< Item >::index, and VIterator< Item >::vector_.

Referenced by DQMStoreStats::calcIgProfDump().

◆ First()

template<class Item>
void VIterator< Item >::First ( )
inlineoverridevirtual

Implements Iterator< Item >.

Definition at line 111 of file DQMStoreStats.h.

111 { index = 0; }

References VIterator< Item >::index.

Referenced by DQMStoreStats::calcIgProfDump().

◆ getIndex()

template<class Item>
virtual int VIterator< Item >::getIndex ( )
inlinevirtual

Definition at line 114 of file DQMStoreStats.h.

114 { return (int)index; }

References VIterator< Item >::index.

◆ IsDone()

template<class Item>
bool VIterator< Item >::IsDone ( ) const
inlineoverridevirtual

Implements Iterator< Item >.

Definition at line 116 of file DQMStoreStats.h.

116  {
117  if (index < (unsigned int)vector_->size())
118  return false;
119  return true;
120  }

References VIterator< Item >::index, and VIterator< Item >::vector_.

Referenced by DQMStoreStats::calcIgProfDump().

◆ Next()

template<class Item>
void VIterator< Item >::Next ( )
inlineoverridevirtual

Implements Iterator< Item >.

Definition at line 112 of file DQMStoreStats.h.

112 { ++index; }

References VIterator< Item >::index.

Referenced by DQMStoreStats::calcIgProfDump().

◆ size()

template<class Item>
virtual int VIterator< Item >::size ( void  )
inlinevirtual

Definition at line 113 of file DQMStoreStats.h.

113 { return vector_->size(); }

References VIterator< Item >::vector_.

Referenced by ntupleDataFormat._Collection::__iter__(), and ntupleDataFormat._Collection::__len__().

Member Data Documentation

◆ index

template<class Item>
unsigned int VIterator< Item >::index
private

◆ vector_

template<class Item>
const std::vector<Item>* VIterator< Item >::vector_
private
VIterator::vector_
const std::vector< Item > * vector_
Definition: DQMStoreStats.h:125
VIterator::index
unsigned int index
Definition: DQMStoreStats.h:126