ATLAS Offline Software
Loading...
Searching...
No Matches
CaloCluster::MomentStoreIter Class Reference

Internal cell iterator. More...

#include <CaloCluster.h>

Collaboration diagram for CaloCluster::MomentStoreIter:

Public Member Functions

 MomentStoreIter ()
 Default constructor builds unusable iterator.
 MomentStoreIter (const moment_iterator_i &iter, const moment_store *firstStore, const moment_store *secndStore=0)
 Standard constructor for a useable iterator.
 ~MomentStoreIter ()
 Destructor.
MomentStoreIter next ()
 Advance iterator.
MomentStoreIter prev ()
 Step back iterator.
MomentStoreIter operator++ ()
 Post-advance operator.
MomentStoreIter operator++ (int)
 Pre-advance operator.
MomentStoreIter operator-- ()
 Post-step back operator.
MomentStoreIter operator-- (int)
 Pre-step back operator.
bool operator== (const MomentStoreIter &anOther) const
 Equality comparator.
bool operator!= (const MomentStoreIter &anOther) const
 Inequality comparator.
const CaloClusterMomentoperator* () const
 Operator access to CaloClusterMoment.
const CaloClusterMomentgetMoment () const
 Function access to CaloClusterMoment.
moment_type getMomentType () const
 Function access to moment type.

Private Attributes

moment_iterator_i m_iter
 Actual iterator on CaloClusterMomentStore.
const moment_storem_firstStore
 Pointer to first CaloClusterMomentStore.
const moment_storem_secndStore
 Pointer to second CaloClusterMomentStore.

Detailed Description

Internal cell iterator.

Principle iterator of the (split) moment store.

Only for read access presently. Automatically loops cached and external moment store, the latter only if available. The iterator range is as follows:

Definition at line 154 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

Constructor & Destructor Documentation

◆ MomentStoreIter() [1/2]

CaloCluster::MomentStoreIter::MomentStoreIter ( )

Default constructor builds unusable iterator.

Definition at line 1518 of file CaloCluster.cxx.

1518: m_iter(), m_firstStore(nullptr), m_secndStore(nullptr) { }
const moment_store * m_secndStore
Pointer to second CaloClusterMomentStore.
const moment_store * m_firstStore
Pointer to first CaloClusterMomentStore.
moment_iterator_i m_iter
Actual iterator on CaloClusterMomentStore.

◆ MomentStoreIter() [2/2]

CaloCluster::MomentStoreIter::MomentStoreIter ( const moment_iterator_i & iter,
const moment_store * firstStore,
const moment_store * secndStore = 0 )

Standard constructor for a useable iterator.

Definition at line 1520 of file CaloCluster.cxx.

1523 : m_iter(iter), m_firstStore(firstStore), m_secndStore(secndStore)
1524{ }

◆ ~MomentStoreIter()

CaloCluster::MomentStoreIter::~MomentStoreIter ( )
default

Destructor.

Member Function Documentation

◆ getMoment()

const CaloClusterMoment & CaloCluster::MomentStoreIter::getMoment ( ) const

Function access to CaloClusterMoment.

Definition at line 1570 of file CaloCluster.cxx.

1570{ return *m_iter; }

◆ getMomentType()

CaloCluster::moment_type CaloCluster::MomentStoreIter::getMomentType ( ) const

Function access to moment type.

Definition at line 1572 of file CaloCluster.cxx.

1572{ return m_iter.getMomentType(); }

◆ next()

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::next ( )

Advance iterator.

Definition at line 1529 of file CaloCluster.cxx.

1530{
1531 m_iter++;
1532 if ( m_iter == m_firstStore->end() &&
1533 ( m_secndStore != nullptr && m_secndStore->size() > 0 ) )
1534 {
1535 m_iter = m_secndStore->begin();
1536 }
1537 return *this;
1538}

◆ operator!=()

bool CaloCluster::MomentStoreIter::operator!= ( const MomentStoreIter & anOther) const

Inequality comparator.

Definition at line 1564 of file CaloCluster.cxx.

1565{ return m_iter != anOther.m_iter; }

◆ operator*()

const CaloClusterMoment & CaloCluster::MomentStoreIter::operator* ( ) const

Operator access to CaloClusterMoment.

Definition at line 1568 of file CaloCluster.cxx.

1568{ return *m_iter; }

◆ operator++() [1/2]

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::operator++ ( )

Post-advance operator.

Definition at line 1552 of file CaloCluster.cxx.

1552{ return this->next(); }
MomentStoreIter next()
Advance iterator.

◆ operator++() [2/2]

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::operator++ ( int )

Pre-advance operator.

Definition at line 1554 of file CaloCluster.cxx.

1554{ return this->next(); }

◆ operator--() [1/2]

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::operator-- ( )

Post-step back operator.

Definition at line 1556 of file CaloCluster.cxx.

1556{ return this->prev(); }
MomentStoreIter prev()
Step back iterator.

◆ operator--() [2/2]

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::operator-- ( int )

Pre-step back operator.

Definition at line 1558 of file CaloCluster.cxx.

1558{ return this->prev(); }

◆ operator==()

bool CaloCluster::MomentStoreIter::operator== ( const MomentStoreIter & anOther) const

Equality comparator.

Definition at line 1561 of file CaloCluster.cxx.

1562{ return m_iter == anOther.m_iter; }

◆ prev()

CaloCluster::MomentStoreIter CaloCluster::MomentStoreIter::prev ( )

Step back iterator.

Definition at line 1541 of file CaloCluster.cxx.

1542{
1543 if ( m_secndStore != nullptr && m_iter == m_secndStore->begin() )
1544 {
1545 m_iter = m_firstStore->end();
1546 }
1547 m_iter--;
1548 return *this;
1549}

Member Data Documentation

◆ m_firstStore

const moment_store* CaloCluster::MomentStoreIter::m_firstStore
private

Pointer to first CaloClusterMomentStore.

Definition at line 199 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_iter

moment_iterator_i CaloCluster::MomentStoreIter::m_iter
private

Actual iterator on CaloClusterMomentStore.

Definition at line 197 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.

◆ m_secndStore

const moment_store* CaloCluster::MomentStoreIter::m_secndStore
private

Pointer to second CaloClusterMomentStore.

Definition at line 201 of file Calorimeter/CaloEvent/CaloEvent/CaloCluster.h.


The documentation for this class was generated from the following files: