Pandora
Pandora source code navigator
Loading...
Searching...
No Matches
pandora::XmlHelper Class Reference

XmlHelper class. More...

#include "XmlHelper.h"

Static Public Member Functions

template<typename T >
static StatusCode ReadValue (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, T &t)
 Read a value from an xml element.
 
template<typename T >
static StatusCode ReadVectorOfValues (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, std::vector< T > &vector)
 Read a vector of values from a (space separated) list in an xml element.
 
template<typename T >
static StatusCode Read2DVectorOfValues (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, const std::string &rowName, std::vector< std::vector< T > > &vector)
 Read a two-dimensional array of values into a vector of vectors. Each row of values must be contained within <rowname></rowname> xml tags, whilst the values in the row must be space separated.
 
static StatusCode ProcessAlgorithm (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, std::string &algorithmName)
 Process an algorithm described in an xml element with a matching "description = ..." attribute.
 
static StatusCode ProcessFirstAlgorithm (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, std::string &algorithmName)
 Process a single algorithm described in an xml file (the first found by the xml handle)
 
static StatusCode ProcessAlgorithmList (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, StringVector &algorithmNames)
 Process a list of daughter algorithms in an xml file.
 
static StatusCode ProcessAlgorithmTool (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &description, AlgorithmTool *&pAlgorithmTool)
 Process an algorithm tool described in an xml element with a matching "description = ..." attribute.
 
static StatusCode ProcessFirstAlgorithmTool (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, AlgorithmTool *&pAlgorithmTool)
 Process a single algorithm tool described in an xml file (the first found by the xml handle)
 
static StatusCode ProcessAlgorithmToolList (const Algorithm &algorithm, const TiXmlHandle &xmlHandle, const std::string &listName, AlgorithmToolVector &algorithmToolVector)
 Process a list of algorithms tools in an xml file.
 
static void TokenizeString (const std::string &inputString, StringVector &tokens, const std::string &delimiter=" ")
 Tokenize a string.
 
template<>
StatusCode ReadValue (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, CartesianVector &t)
 
template<>
StatusCode ReadValue (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, TrackState &t)
 
template<>
StatusCode ReadValue (const TiXmlHandle &xmlHandle, const std::string &xmlElementName, bool &t)
 

Detailed Description

XmlHelper class.

Definition at line 25 of file XmlHelper.h.

Member Function Documentation

◆ ProcessAlgorithm()

StatusCode pandora::XmlHelper::ProcessAlgorithm ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
const std::string &  description,
std::string &  algorithmName 
)
static

Process an algorithm described in an xml element with a matching "description = ..." attribute.

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
descriptionthe description attribute of the algorithm xml element
algorithmNameto receive the name of the algorithm instance

Definition at line 16 of file XmlHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessAlgorithmList()

StatusCode pandora::XmlHelper::ProcessAlgorithmList ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
const std::string &  listName,
StringVector algorithmNames 
)
static

Process a list of daughter algorithms in an xml file.

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
listNamethe name of the algorithm list
algorithmNamesto receive the names of the algorithm instances

Definition at line 48 of file XmlHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessAlgorithmTool()

StatusCode pandora::XmlHelper::ProcessAlgorithmTool ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
const std::string &  description,
AlgorithmTool *&  pAlgorithmTool 
)
static

Process an algorithm tool described in an xml element with a matching "description = ..." attribute.

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
descriptionthe description attribute of the algorithm tool xml element
pAlgorithmToolto receive the address of the algorithm tool instance

Definition at line 69 of file XmlHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessAlgorithmToolList()

StatusCode pandora::XmlHelper::ProcessAlgorithmToolList ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
const std::string &  listName,
AlgorithmToolVector algorithmToolVector 
)
static

Process a list of algorithms tools in an xml file.

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
listNamethe name of the algorithm tool list
algorithmToolVectorto receive the vector of addresses of the algorithm tool instances

Definition at line 101 of file XmlHelper.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessFirstAlgorithm()

StatusCode pandora::XmlHelper::ProcessFirstAlgorithm ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
std::string &  algorithmName 
)
inlinestatic

Process a single algorithm described in an xml file (the first found by the xml handle)

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
algorithmNameto receive the name of the algorithm instance

Definition at line 293 of file XmlHelper.h.

Here is the call graph for this function:

◆ ProcessFirstAlgorithmTool()

StatusCode pandora::XmlHelper::ProcessFirstAlgorithmTool ( const Algorithm algorithm,
const TiXmlHandle xmlHandle,
AlgorithmTool *&  pAlgorithmTool 
)
inlinestatic

Process a single algorithm tool described in an xml file (the first found by the xml handle)

Parameters
algorithmthe parent algorithm calling this function
xmlHandlethe relevant xml handle
pAlgorithmToolto receive the address of the algorithm tool instance

Definition at line 301 of file XmlHelper.h.

Here is the call graph for this function:

◆ Read2DVectorOfValues()

template<typename T >
StatusCode pandora::XmlHelper::Read2DVectorOfValues ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
const std::string &  rowName,
std::vector< std::vector< T > > &  vector 
)
inlinestatic

Read a two-dimensional array of values into a vector of vectors. Each row of values must be contained within <rowname></rowname> xml tags, whilst the values in the row must be space separated.

Parameters
xmlHandlethe relevant xml handle
xmlElementNamethe name of the xml element to examine
rowNamethe row name
vectorto receive the 2d vector of values

Definition at line 255 of file XmlHelper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ReadValue() [1/4]

template<>
StatusCode pandora::XmlHelper::ReadValue ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
bool &  t 
)
inlinestatic

Definition at line 201 of file XmlHelper.h.

Here is the call graph for this function:

◆ ReadValue() [2/4]

template<>
StatusCode pandora::XmlHelper::ReadValue ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
CartesianVector t 
)
inlinestatic

Definition at line 150 of file XmlHelper.h.

Here is the call graph for this function:

◆ ReadValue() [3/4]

template<typename T >
StatusCode pandora::XmlHelper::ReadValue ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
T &  t 
)
inlinestatic

Read a value from an xml element.

Parameters
xmlHandlethe relevant xml handle
xmlElementNamethe name of the xml element to examine
tto receive the value

Definition at line 136 of file XmlHelper.h.

Here is the call graph for this function:

◆ ReadValue() [4/4]

template<>
StatusCode pandora::XmlHelper::ReadValue ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
TrackState t 
)
inlinestatic

Definition at line 174 of file XmlHelper.h.

Here is the call graph for this function:

◆ ReadVectorOfValues()

template<typename T >
StatusCode pandora::XmlHelper::ReadVectorOfValues ( const TiXmlHandle xmlHandle,
const std::string &  xmlElementName,
std::vector< T > &  vector 
)
inlinestatic

Read a vector of values from a (space separated) list in an xml element.

Parameters
xmlHandlethe relevant xml handle
xmlElementNamethe name of the xml element to examine
vectorto receive the vector of values

Definition at line 229 of file XmlHelper.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TokenizeString()

void pandora::XmlHelper::TokenizeString ( const std::string &  inputString,
StringVector tokens,
const std::string &  delimiter = " " 
)
static

Tokenize a string.

Parameters
inputStringthe input string
tokensto receive the resulting tokens
delimiterthe specified delimeter

Definition at line 122 of file XmlHelper.cc.

Here is the caller graph for this function:

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