HepMC Reference Documentation

HepMC

HepMC::GenVertex::vertex_iterator Class Reference

vertex iterator More...

#include <GenVertex.h>

List of all members.

Public Member Functions

 vertex_iterator ()
 vertex_iterator (GenVertex &vtx_root, IteratorRange range)
 used to set limits on the iteration
 vertex_iterator (GenVertex &vtx_root, IteratorRange range, std::set< const HepMC::GenVertex * > &visited_vertices)
 next constructor is intended for internal use only
 vertex_iterator (const vertex_iterator &v_iter)
 copy
virtual ~vertex_iterator ()
vertex_iteratoroperator= (const vertex_iterator &)
 make a copy
GenVertexoperator * (void) const
 return a pointer to a vertex
vertex_iteratoroperator++ (void)
 Pre-fix increment.
vertex_iterator operator++ (int)
 Post-fix increment.
bool operator== (const vertex_iterator &) const
 equality
bool operator!= (const vertex_iterator &) const
 inequality
GenVertexvertex_root () const
 vertex that this iterator begins from
IteratorRange range () const
 iterator range
void copy_with_own_set (const vertex_iterator &v_iter, std::set< const HepMC::GenVertex * > &visited_vertices)
 intended for internal use only.

Protected Member Functions

GenVertexfollow_edge_ ()
 non-null if recursive iter. created
void copy_recursive_iterator_ (const vertex_iterator *recursive_v_iter)
 copy recursive iterator


Detailed Description

vertex iterator

Iterates over all vertices connected via a graph to this vertex. this is made friend to that it can access protected edge iterator the range can be IteratorRange= ( parents, children, family, ancestors, descendants, relatives ) example for range=descendants the iterator will return all vertices which are children (connected by an outgoing particle edge), grandchildren, great-grandchildren, etc. of this vertex In all cases the iterator always returns this vertex (returned last). The algorithm is accomplished by converting the graph to a tree (by "chopping" the edges connecting to an already visited vertex) and returning the vertices in POST ORDER traversal.

Definition at line 247 of file GenVertex.h.


Constructor & Destructor Documentation

HepMC::GenVertex::vertex_iterator::vertex_iterator (  ) 

Definition at line 607 of file GenVertex.cc.

Referenced by copy_recursive_iterator_(), and follow_edge_().

HepMC::GenVertex::vertex_iterator::vertex_iterator ( GenVertex vtx_root,
IteratorRange  range 
)

used to set limits on the iteration

Definition at line 612 of file GenVertex.cc.

References HepMC::GenVertex::edges_begin(), HepMC::GenVertex::edges_end(), and follow_edge_().

HepMC::GenVertex::vertex_iterator::vertex_iterator ( GenVertex vtx_root,
IteratorRange  range,
std::set< const HepMC::GenVertex * > &  visited_vertices 
)

next constructor is intended for internal use only

Definition at line 628 of file GenVertex.cc.

References HepMC::GenVertex::edges_begin(), HepMC::GenVertex::edges_end(), and follow_edge_().

HepMC::GenVertex::vertex_iterator::vertex_iterator ( const vertex_iterator v_iter  ) 

copy

Definition at line 645 of file GenVertex.cc.

HepMC::GenVertex::vertex_iterator::~vertex_iterator (  )  [virtual]

Definition at line 652 of file GenVertex.cc.


Member Function Documentation

void HepMC::GenVertex::vertex_iterator::copy_recursive_iterator_ ( const vertex_iterator recursive_v_iter  )  [protected]

copy recursive iterator

Definition at line 817 of file GenVertex.cc.

References copy_recursive_iterator_(), m_edge, m_it_owns_set, m_range, m_recursive_iterator, m_vertex, m_visited_vertices, and vertex_iterator().

Referenced by copy_recursive_iterator_(), copy_with_own_set(), and operator=().

void HepMC::GenVertex::vertex_iterator::copy_with_own_set ( const vertex_iterator v_iter,
std::set< const HepMC::GenVertex * > &  visited_vertices 
)

intended for internal use only.

intended for internal use only. (use with care!) this is the same as the operator= method, but it allows the user to specify which set container m_visited_vertices points to. in all cases, this vertex will NOT own its set.

Definition at line 758 of file GenVertex.cc.

References copy_recursive_iterator_(), m_edge, m_range, m_recursive_iterator, and m_vertex.

GenVertex * HepMC::GenVertex::vertex_iterator::follow_edge_ (  )  [protected]

non-null if recursive iter. created

Definition at line 781 of file GenVertex.cc.

References HepMC::family, HepMC::GenVertex::edge_iterator::is_parent(), and vertex_iterator().

Referenced by operator++(), and vertex_iterator().

GenVertex * HepMC::GenVertex::vertex_iterator::operator * ( void   )  const

return a pointer to a vertex

Definition at line 694 of file GenVertex.cc.

bool HepMC::GenVertex::vertex_iterator::operator!= ( const vertex_iterator  )  const [inline]

inequality

Definition at line 475 of file GenVertex.h.

GenVertex::vertex_iterator HepMC::GenVertex::vertex_iterator::operator++ ( int   ) 

Post-fix increment.

Definition at line 751 of file GenVertex.cc.

GenVertex::vertex_iterator & HepMC::GenVertex::vertex_iterator::operator++ ( void   ) 

Pre-fix increment.

Definition at line 709 of file GenVertex.cc.

References HepMC::GenVertex::edges_end(), and follow_edge_().

GenVertex::vertex_iterator & HepMC::GenVertex::vertex_iterator::operator= ( const vertex_iterator  ) 

make a copy

Definition at line 657 of file GenVertex.cc.

References copy_recursive_iterator_(), m_edge, m_it_owns_set, m_range, m_recursive_iterator, m_vertex, and m_visited_vertices.

bool HepMC::GenVertex::vertex_iterator::operator== ( const vertex_iterator  )  const [inline]

equality

Definition at line 470 of file GenVertex.h.

IteratorRange HepMC::GenVertex::vertex_iterator::range (  )  const [inline]

iterator range

Definition at line 484 of file GenVertex.h.

Referenced by HepMC::GenVertex::particle_iterator::advance_to_first_(), HepMC::GenVertex::particle_iterator::operator++(), and HepMC::GenVertex::particle_iterator::particle_iterator().

GenVertex * HepMC::GenVertex::vertex_iterator::vertex_root (  )  const [inline]

vertex that this iterator begins from

Definition at line 480 of file GenVertex.h.


The documentation for this class was generated from the following files:
Generated on Thu Jan 7 13:10:18 2010 for HepMC by  doxygen 1.4.7