ATLAS Offline Software
Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
NavWrapper< NAVIMPL > Class Template Reference

Wrapper for Navigable implementation. More...

#include <NavWrapper.h>

Collaboration diagram for NavWrapper< NAVIMPL >:

Public Types

typedef NAVIMPL navimpl_t
 Publish navigation implementation type. More...
 
typedef navimpl_t::container_type container_type
 { More...
 
typedef navimpl_t::constituent_type constituent_type
 
typedef navimpl_t::parameter_type parameter_type
 
typedef navimpl_t::object_iter object_iter
 
typedef navimpl_t::external_index_type external_index_type
 

Public Member Functions

 NavWrapper ()
 } More...
 
 NavWrapper (const navimpl_t &theNav)
 Optional constructor: construct from Navigable. More...
 
virtual ~NavWrapper ()
 Base class destructor. More...
 
virtual void fillToken (INavigationToken &navToken) const
 Visitor handler without relational parameter. More...
 
virtual void fillToken (INavigationToken &navToken, const std::any &parentParameter) const
 Visitor handler including a relational parameter. More...
 
void putElement (const container_type *pCont, const constituent_type *pObj, const parameter_type &oPar=parameter_type(), size_t sizeHint=0)
 Add element to Navigable store. More...
 
void putElement (const container_type *pCont, external_index_type &iObj, const parameter_type &oPar=parameter_type(), size_t sizeHint=0)
 Add element to the Navigable store. More...
 
void insertElement (const container_type *pCont, const constituent_type *pObj, const parameter_type &oPar=parameter_type(), size_t sizeHint=0)
 Insert element into Navigable store. More...
 
void insertElement (const container_type *pCont, external_index_type &iObj, const parameter_type &oPar=parameter_type(), size_t sizeHint=0)
 Insert element into Navigable store. More...
 
void reweight (const constituent_type *pObj, const parameter_type &oPar=parameter_type())
 
void reweight (const container_type *pCont, external_index_type &iObj, const parameter_type &oPar=parameter_type())
 
void reweight (object_iter &oIter, const parameter_type &oPar=parameter_type())
 
bool remove (const constituent_type *pObj)
 
bool remove (const container_type *pCont, external_index_type &iObj)
 
bool removeAll ()
 
bool contains (const constituent_type *pObj) const
 
bool contains (const container_type *pCont, external_index_type &iObj) const
 
virtual object_iter begin () const
 
virtual object_iter end () const
 
virtual size_t size () const
 
parameter_type getParameter (const constituent_type *pObj) const
 
parameter_type getParameter (const container_type *pCont, external_index_type &iObj) const
 
parameter_type getParameter (object_iter &oIter) const
 
const container_typegetContainer (const constituent_type *pObj) const
 
const container_typegetContainer (object_iter oIter) const
 
bool getIndex (const constituent_type *pObj, external_index_type &iObj) const
 
bool getIndex (object_iter oIter, external_index_type &iObj) const
 

Protected Member Functions

navimpl_tgetNavImpl ()
 
const navimpl_tgetNavImpl () const
 

Private Attributes

navimpl_t m_nav
 Wrapped Navigable implementation. More...
 

Detailed Description

template<class NAVIMPL>
class NavWrapper< NAVIMPL >

Wrapper for Navigable implementation.

Date
June 2, 2006
Author
Peter Loch loch@.nosp@m.phys.nosp@m.ics.a.nosp@m.rizo.nosp@m.na.ed.nosp@m.u

This templated wrapper decouples the navigation implementation (implementing INavigable) from the client class by forwarding the Navigable behaviour to the actual implementation, rather than inheriting it. In particular this means this template itself is not derived from INavigable. This wrapper together with the P4Wrapper allows an un-ambiguous implementation of the combined INavigable4Momentum interface.

Definition at line 14 of file NavWrapper.h.

Member Typedef Documentation

◆ constituent_type

template<class NAVIMPL >
typedef navimpl_t::constituent_type NavWrapper< NAVIMPL >::constituent_type

Definition at line 31 of file NavWrapper.h.

◆ container_type

template<class NAVIMPL >
typedef navimpl_t::container_type NavWrapper< NAVIMPL >::container_type

{

Publish important types from Navigable, new style ‍/ typedef typename navimpl::container_t container_t; typedef typename navimpl::constituent_t constituent_t; typedef typename navimpl::parameter_t parameter_t; typedef typename navimpl::object_iter_t object_iter_t; typedef typename navimpl::external_index_t external_index_t; /!}

{ Publish important types from Navigable, old style, soon to be obsolete!

Definition at line 30 of file NavWrapper.h.

◆ external_index_type

template<class NAVIMPL >
typedef navimpl_t::external_index_type NavWrapper< NAVIMPL >::external_index_type

Definition at line 34 of file NavWrapper.h.

◆ navimpl_t

template<class NAVIMPL >
typedef NAVIMPL NavWrapper< NAVIMPL >::navimpl_t

Publish navigation implementation type.

Definition at line 19 of file NavWrapper.h.

◆ object_iter

template<class NAVIMPL >
typedef navimpl_t::object_iter NavWrapper< NAVIMPL >::object_iter

Definition at line 33 of file NavWrapper.h.

◆ parameter_type

template<class NAVIMPL >
typedef navimpl_t::parameter_type NavWrapper< NAVIMPL >::parameter_type

Definition at line 32 of file NavWrapper.h.

Constructor & Destructor Documentation

◆ NavWrapper() [1/2]

template<class NAVIMPL >
NavWrapper< NAVIMPL >::NavWrapper ( )
inline

}

Default constructor

Definition at line 38 of file NavWrapper.h.

38 : m_nav(navimpl_t()) { };

◆ NavWrapper() [2/2]

template<class NAVIMPL >
NavWrapper< NAVIMPL >::NavWrapper ( const navimpl_t theNav)
inline

Optional constructor: construct from Navigable.

Definition at line 40 of file NavWrapper.h.

40 : m_nav(theNav) { };

◆ ~NavWrapper()

template<class NAVIMPL >
virtual NavWrapper< NAVIMPL >::~NavWrapper ( )
inlinevirtual

Base class destructor.

Definition at line 42 of file NavWrapper.h.

42 { };

Member Function Documentation

◆ begin()

template<class NAVIMPL >
virtual object_iter NavWrapper< NAVIMPL >::begin ( ) const
inlinevirtual

Definition at line 128 of file NavWrapper.h.

128 { return m_nav.begin(); }

◆ contains() [1/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::contains ( const constituent_type pObj) const
inline

Definition at line 117 of file NavWrapper.h.

118  { return m_nav.contains(pObj); }

◆ contains() [2/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::contains ( const container_type pCont,
external_index_type iObj 
) const
inline

Definition at line 119 of file NavWrapper.h.

121  { return m_nav.contains(pCont,iObj); }

◆ end()

template<class NAVIMPL >
virtual object_iter NavWrapper< NAVIMPL >::end ( ) const
inlinevirtual

Definition at line 129 of file NavWrapper.h.

129 { return m_nav.end(); }

◆ fillToken() [1/2]

template<class NAVIMPL >
virtual void NavWrapper< NAVIMPL >::fillToken ( INavigationToken navToken) const
inlinevirtual

Visitor handler without relational parameter.

This is the implementation of the INavigable interface.

Reimplemented in Nav4MomWrapper< Navigable_t, P4Momentum_t >, and Nav4MomWrapper< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE >.

Definition at line 50 of file NavWrapper.h.

51  { m_nav.fillToken(navToken); }

◆ fillToken() [2/2]

template<class NAVIMPL >
virtual void NavWrapper< NAVIMPL >::fillToken ( INavigationToken navToken,
const std::any &  parentParameter 
) const
inlinevirtual

Visitor handler including a relational parameter.

This is the implementation of the INavigable interface.

Reimplemented in Nav4MomWrapper< Navigable_t, P4Momentum_t >, and Nav4MomWrapper< Navigable< DataVector< INavigable4Momentum >, double, std::vector< std::pair< ElementLink< DataVector< INavigable4Momentum > >, double > > >, P4ImplPxPyPzE >.

Definition at line 57 of file NavWrapper.h.

59  { m_nav.fillToken(navToken, parentParameter); }

◆ getContainer() [1/2]

template<class NAVIMPL >
const container_type* NavWrapper< NAVIMPL >::getContainer ( const constituent_type pObj) const
inline

Definition at line 142 of file NavWrapper.h.

143  { return m_nav.getContainer(pObj); }

◆ getContainer() [2/2]

template<class NAVIMPL >
const container_type* NavWrapper< NAVIMPL >::getContainer ( object_iter  oIter) const
inline

Definition at line 146 of file NavWrapper.h.

147  { return m_nav.getContainer(oIter); }

◆ getIndex() [1/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::getIndex ( const constituent_type pObj,
external_index_type iObj 
) const
inline

Definition at line 150 of file NavWrapper.h.

152  { return m_nav.getIndex(pObj,iObj); }

◆ getIndex() [2/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::getIndex ( object_iter  oIter,
external_index_type iObj 
) const
inline

Definition at line 155 of file NavWrapper.h.

157  { return m_nav.getIndex(oIter,iObj); }

◆ getNavImpl() [1/2]

template<class NAVIMPL >
navimpl_t& NavWrapper< NAVIMPL >::getNavImpl ( )
inlineprotected

Definition at line 161 of file NavWrapper.h.

161 { return m_nav; }

◆ getNavImpl() [2/2]

template<class NAVIMPL >
const navimpl_t& NavWrapper< NAVIMPL >::getNavImpl ( ) const
inlineprotected

Definition at line 162 of file NavWrapper.h.

162 { return m_nav; }

◆ getParameter() [1/3]

template<class NAVIMPL >
parameter_type NavWrapper< NAVIMPL >::getParameter ( const constituent_type pObj) const
inline

Definition at line 133 of file NavWrapper.h.

134  { return m_nav.getParameter(pObj); }

◆ getParameter() [2/3]

template<class NAVIMPL >
parameter_type NavWrapper< NAVIMPL >::getParameter ( const container_type pCont,
external_index_type iObj 
) const
inline

Definition at line 135 of file NavWrapper.h.

137  { return m_nav.getParameter(pCont,iObj); }

◆ getParameter() [3/3]

template<class NAVIMPL >
parameter_type NavWrapper< NAVIMPL >::getParameter ( object_iter oIter) const
inline

Definition at line 138 of file NavWrapper.h.

139  { return m_nav.getParameter(oIter); }

◆ insertElement() [1/2]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::insertElement ( const container_type pCont,
const constituent_type pObj,
const parameter_type oPar = parameter_type(),
size_t  sizeHint = 0 
)
inline

Insert element into Navigable store.

Definition at line 81 of file NavWrapper.h.

85  { m_nav.insertElement(pCont,pObj,oPar,sizeHint); }

◆ insertElement() [2/2]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::insertElement ( const container_type pCont,
external_index_type iObj,
const parameter_type oPar = parameter_type(),
size_t  sizeHint = 0 
)
inline

Insert element into Navigable store.

Definition at line 87 of file NavWrapper.h.

91  { m_nav.insertElement(pCont,iObj,oPar,sizeHint); }

◆ putElement() [1/2]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::putElement ( const container_type pCont,
const constituent_type pObj,
const parameter_type oPar = parameter_type(),
size_t  sizeHint = 0 
)
inline

Add element to Navigable store.

Element is referenced by pointer (internal linear index search).

Definition at line 69 of file NavWrapper.h.

73  { m_nav.putElement(pCont,pObj,oPar,sizeHint); }

◆ putElement() [2/2]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::putElement ( const container_type pCont,
external_index_type iObj,
const parameter_type oPar = parameter_type(),
size_t  sizeHint = 0 
)
inline

Add element to the Navigable store.

Definition at line 75 of file NavWrapper.h.

79  { m_nav.putElement(pCont,iObj,oPar,sizeHint); }

◆ remove() [1/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::remove ( const constituent_type pObj)
inline

Definition at line 110 of file NavWrapper.h.

111  { return m_nav.remove(pObj); }

◆ remove() [2/2]

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::remove ( const container_type pCont,
external_index_type iObj 
)
inline

Definition at line 112 of file NavWrapper.h.

113  { return m_nav.remove(pCont,iObj); }

◆ removeAll()

template<class NAVIMPL >
bool NavWrapper< NAVIMPL >::removeAll ( )
inline

Definition at line 114 of file NavWrapper.h.

114 { return m_nav.removeAll(); }

◆ reweight() [1/3]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::reweight ( const constituent_type pObj,
const parameter_type oPar = parameter_type() 
)
inline

Definition at line 98 of file NavWrapper.h.

100  { m_nav.reweight(pObj,oPar); }

◆ reweight() [2/3]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::reweight ( const container_type pCont,
external_index_type iObj,
const parameter_type oPar = parameter_type() 
)
inline

Definition at line 101 of file NavWrapper.h.

104  { m_nav.reweight(pCont,iObj,oPar); }

◆ reweight() [3/3]

template<class NAVIMPL >
void NavWrapper< NAVIMPL >::reweight ( object_iter oIter,
const parameter_type oPar = parameter_type() 
)
inline

Definition at line 105 of file NavWrapper.h.

107  { m_nav.reweight(oIter,oPar); }

◆ size()

template<class NAVIMPL >
virtual size_t NavWrapper< NAVIMPL >::size ( ) const
inlinevirtual

Definition at line 130 of file NavWrapper.h.

130 { return size_t(m_nav.size()); }

Member Data Documentation

◆ m_nav

template<class NAVIMPL >
navimpl_t NavWrapper< NAVIMPL >::m_nav
private

Wrapped Navigable implementation.

Definition at line 166 of file NavWrapper.h.


The documentation for this class was generated from the following file:
NavWrapper::navimpl_t
NAVIMPL navimpl_t
Publish navigation implementation type.
Definition: NavWrapper.h:19
NavWrapper::m_nav
navimpl_t m_nav
Wrapped Navigable implementation.
Definition: NavWrapper.h:166