Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PHDataNodeIterator Class Reference

#include <coresoftware/blob/master/offline/framework/phool/PHDataNodeIterator.h>

+ Inheritance diagram for PHDataNodeIterator:
+ Collaboration diagram for PHDataNodeIterator:

Public Member Functions

 PHDataNodeIterator (PHCompositeNode *node)
 Constructor.
 
 ~PHDataNodeIterator () override
 Destructor.
 
template<class T >
PHIODataNode< T > * FindIODataNode (PHIODataNode< T > *node, const char *name)
 
template<class T >
PHBoolean AddIODataNode (T *data, const char *name)
 
- Public Member Functions inherited from PHNodeIterator
 PHNodeIterator (PHCompositeNode *)
 
virtual ~PHNodeIterator ()
 
 PHNodeIterator ()
 
void print ()
 
PHPointerList< PHNode > & ls ()
 
PHNodefindFirst (const std::string &, const std::string &)
 
PHNodefindFirst (const std::string &)
 
bool cd (const std::string &pathString="")
 
bool addNode (PHNode *)
 
void forEach (PHNodeOperation &)
 
void for_each (PHNodeOperation &)
 
PHCompositeNodeget_currentNode () const
 

Additional Inherited Members

- Protected Attributes inherited from PHNodeIterator
PHCompositeNodecurrentNode
 
PHPointerList< PHNodesubNodeList
 

Detailed Description

A special PHOOL node iterator that simplifies finding and adding data nodes.

The methods are templated, rather than the class, to allow the same iterator object to be used with different data node types.

Author
Kyle Pope

Definition at line 19 of file PHDataNodeIterator.h.

View newest version in sPHENIX GitHub at line 19 of file PHDataNodeIterator.h

Constructor & Destructor Documentation

PHDataNodeIterator::PHDataNodeIterator ( PHCompositeNode node)
inline

Constructor.

Definition at line 48 of file PHDataNodeIterator.h.

View newest version in sPHENIX GitHub at line 48 of file PHDataNodeIterator.h

PHDataNodeIterator::~PHDataNodeIterator ( )
inlineoverride

Destructor.

Definition at line 26 of file PHDataNodeIterator.h.

View newest version in sPHENIX GitHub at line 26 of file PHDataNodeIterator.h

Member Function Documentation

template<class T >
PHBoolean PHDataNodeIterator::AddIODataNode ( T data,
const char *  name 
)

Adds a data node called "name" to the tree, and inserts "data". The data node is added at the current "directory" of this iterator object, so remember to "cd" to the desired location in the tree!

Definition at line 75 of file PHDataNodeIterator.h.

View newest version in sPHENIX GitHub at line 75 of file PHDataNodeIterator.h

References PHNodeIterator::addNode(), configureMap::data, n, and perf_headwind::name.

+ Here is the call graph for this function:

template<class T >
PHIODataNode< T > * PHDataNodeIterator::FindIODataNode ( PHIODataNode< T > *  node,
const char *  name 
)

Finds an IODataNode of name "name" containing data of type "T". A null pointer will be returned if the node is not found, or if it contains data of the wrong type. Note that the return variable is also the first argument; this is necessary to resolve the template type.

Definition at line 55 of file PHDataNodeIterator.h.

View newest version in sPHENIX GitHub at line 55 of file PHDataNodeIterator.h

References PHNodeIterator::findFirst().

+ Here is the call graph for this function:


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