ATLAS Offline Software
Public Types | Public Member Functions | List of all members
SG::ELVRef< DOBJ > Class Template Reference

a short ref to an ElementLink into an ElementLinkVector. Used to be an internal class of ElementLinkVector. Had to pull out because of brain-damaged pool converters More...

#include <SGELVRef.h>

Collaboration diagram for SG::ELVRef< DOBJ >:

Public Types

typedef std::vector< DataLink< DOBJ > > DataLinkVector
 
typedef ElementLinkVector< DOBJ > ElemLinkVec
 
typedef ElementLink< DOBJ > ElemLink
 
typedef ElemLink::IndexingPolicy IndexingPolicy
 
typedef ElemLink::ElementConstPointer ElementConstPointer
 
typedef ElemLink::index_type index_type
 
typedef ElemLink::stored_index_type stored_index_type
 
typedef ElemLink::ID_type ID_type
 

Public Member Functions

 ELVRef (const ELVRef &rhs)
 STL required. More...
 
ELVRefoperator= (const ELVRef &rhs)
 STL required. More...
 
 ELVRef (const ElemLink &link=ElemLink())
 standard constructor More...
 
 ELVRef (typename DataLinkVector::size_type hostIndex, index_type elementIndex, const ElemLinkVec &owner)
 Constructor from indices. More...
 
ID_type dataID () const
 dataID of the host More...
 
index_type elementIndex () const
 index into container (non-const, calculates and sets on demand): More...
 
ElementConstPointer cptr () const
 element pointer in ElementLink More...
 
const ElemLinkelementLink () const
 get the corresponding ElementLink. O(1) More...
 

comparison ops (STL required)

ElemLink m_link
 
DataLinkVector::size_type m_shortRef
 ! the element pointer More...
 
stored_index_type m_index
 ! index of the host dobj More...
 
bool operator== (const ELVRef &rhs) const
 
bool operator< (const ELVRef &rhs) const
 
bool toPersistent (const ElemLinkVec &owner)
 called by handlers to change state: More...
 
bool toPersistent (const ElemLinkVec &owner, typename DataLinkVector::size_type &shortref)
 
bool toTransient (const ElemLinkVec &owner)
 
bool doRemap ()
 
const stored_index_typeindex () const
 

Detailed Description

template<typename DOBJ>
class SG::ELVRef< DOBJ >

a short ref to an ElementLink into an ElementLinkVector. Used to be an internal class of ElementLinkVector. Had to pull out because of brain-damaged pool converters

Definition at line 29 of file SGELVRef.h.

Member Typedef Documentation

◆ DataLinkVector

template<typename DOBJ >
typedef std::vector< DataLink<DOBJ> > SG::ELVRef< DOBJ >::DataLinkVector

Definition at line 32 of file SGELVRef.h.

◆ ElementConstPointer

template<typename DOBJ >
typedef ElemLink::ElementConstPointer SG::ELVRef< DOBJ >::ElementConstPointer

Definition at line 36 of file SGELVRef.h.

◆ ElemLink

template<typename DOBJ >
typedef ElementLink<DOBJ> SG::ELVRef< DOBJ >::ElemLink

Definition at line 34 of file SGELVRef.h.

◆ ElemLinkVec

template<typename DOBJ >
typedef ElementLinkVector<DOBJ> SG::ELVRef< DOBJ >::ElemLinkVec

Definition at line 33 of file SGELVRef.h.

◆ ID_type

template<typename DOBJ >
typedef ElemLink::ID_type SG::ELVRef< DOBJ >::ID_type

Definition at line 39 of file SGELVRef.h.

◆ index_type

template<typename DOBJ >
typedef ElemLink::index_type SG::ELVRef< DOBJ >::index_type

Definition at line 37 of file SGELVRef.h.

◆ IndexingPolicy

template<typename DOBJ >
typedef ElemLink::IndexingPolicy SG::ELVRef< DOBJ >::IndexingPolicy

Definition at line 35 of file SGELVRef.h.

◆ stored_index_type

template<typename DOBJ >
typedef ElemLink::stored_index_type SG::ELVRef< DOBJ >::stored_index_type

Definition at line 38 of file SGELVRef.h.

Constructor & Destructor Documentation

◆ ELVRef() [1/3]

template<typename DOBJ >
SG::ELVRef< DOBJ >::ELVRef ( const ELVRef< DOBJ > &  rhs)

STL required.

◆ ELVRef() [2/3]

template<typename DOBJ >
SG::ELVRef< DOBJ >::ELVRef ( const ElemLink link = ElemLink())

standard constructor

◆ ELVRef() [3/3]

template<typename DOBJ >
SG::ELVRef< DOBJ >::ELVRef ( typename DataLinkVector::size_type  hostIndex,
index_type  elementIndex,
const ElemLinkVec owner 
)

Constructor from indices.

Member Function Documentation

◆ cptr()

template<typename DOBJ >
ElementConstPointer SG::ELVRef< DOBJ >::cptr ( ) const
inline

element pointer in ElementLink

Definition at line 56 of file SGELVRef.h.

56 { return m_link.cptr(); }

◆ dataID()

template<typename DOBJ >
ID_type SG::ELVRef< DOBJ >::dataID ( ) const

dataID of the host

◆ doRemap()

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::doRemap ( )

◆ elementIndex()

template<typename DOBJ >
index_type SG::ELVRef< DOBJ >::elementIndex ( ) const

index into container (non-const, calculates and sets on demand):

◆ elementLink()

template<typename DOBJ >
const ElemLink& SG::ELVRef< DOBJ >::elementLink ( ) const
inline

get the corresponding ElementLink. O(1)

Definition at line 59 of file SGELVRef.h.

59 { return m_link; }

◆ index()

template<typename DOBJ >
const stored_index_type& SG::ELVRef< DOBJ >::index ( ) const
inline

Definition at line 79 of file SGELVRef.h.

80  {
81  return m_index;
82  }

◆ operator<()

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::operator< ( const ELVRef< DOBJ > &  rhs) const
inline

Definition at line 66 of file SGELVRef.h.

66  {
67  return ( (index() < rhs.index()) ||
68  ( (index() == rhs.index()) && (dataID() < rhs.dataID()) ) );
69  }

◆ operator=()

template<typename DOBJ >
ELVRef& SG::ELVRef< DOBJ >::operator= ( const ELVRef< DOBJ > &  rhs)

STL required.

◆ operator==()

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::operator== ( const ELVRef< DOBJ > &  rhs) const
inline

Definition at line 63 of file SGELVRef.h.

63  {
64  return ( (index() == rhs.index()) && (dataID() == rhs.dataID()) );
65  }

◆ toPersistent() [1/2]

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::toPersistent ( const ElemLinkVec owner)

called by handlers to change state:

◆ toPersistent() [2/2]

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::toPersistent ( const ElemLinkVec owner,
typename DataLinkVector::size_type &  shortref 
)

◆ toTransient()

template<typename DOBJ >
bool SG::ELVRef< DOBJ >::toTransient ( const ElemLinkVec owner)

Member Data Documentation

◆ m_index

template<typename DOBJ >
stored_index_type SG::ELVRef< DOBJ >::m_index
private

! index of the host dobj

Definition at line 92 of file SGELVRef.h.

◆ m_link

template<typename DOBJ >
ElemLink SG::ELVRef< DOBJ >::m_link
private

Definition at line 87 of file SGELVRef.h.

◆ m_shortRef

template<typename DOBJ >
DataLinkVector::size_type SG::ELVRef< DOBJ >::m_shortRef
private

! the element pointer

Definition at line 90 of file SGELVRef.h.


The documentation for this class was generated from the following file:
SG::ELVRef::m_link
ElemLink m_link
Definition: SGELVRef.h:87
index
Definition: index.py:1
SG::ELVRef::index
const stored_index_type & index() const
Definition: SGELVRef.h:79
SG::ELVRef::m_index
stored_index_type m_index
! index of the host dobj
Definition: SGELVRef.h:92
SG::ELVRef::dataID
ID_type dataID() const
dataID of the host