Belle II Software
release-08-01-10
|
Implements a path consisting of Module and/or Path objects. More...
#include <Path.h>
Public Member Functions | |
Path () | |
Constructor. | |
~Path () | |
Destructor. | |
void | addModule (const std::shared_ptr< Module > &module) |
Adds a module to the path. More... | |
bool | isEmpty () const |
Returns true if this Path doesn't contain any elements. | |
std::list< std::shared_ptr< Module > > | getModules () const override |
Returns a list of the modules in this path. More... | |
std::list< std::shared_ptr< Module > > | buildModulePathList (bool unique=true) const |
Builds a list of all modules which could be executed during the data processing. More... | |
void | putModules (const std::list< std::shared_ptr< Module > > &mlist) |
Replaces all Modules and sub-Paths with the specified Module list. | |
bool | contains (const std::string &moduleType) const |
Does this Path contain a module of the given type? More... | |
std::shared_ptr< PathElement > | clone () const override |
Create an independent copy of this path, recreating all contained modules with the same parameters. More... | |
void | addPath (const PathPtr &path) |
See 'pydoc3 basf2.Path'. | |
void | forEach (const std::string &loopObjectName, const std::string &arrayName, PathPtr path) |
See 'pydoc3 basf2.Path'. | |
void | doWhile (PathPtr path, const std::string &condition, unsigned int maxIterations) |
See 'pydoc3 basf2.Path'. | |
void | addIndependentPath (const PathPtr &independent_path, std::string ds_ID, const boost::python::list &merge_back) |
See 'pydoc3 basf2.Path'. | |
void | addIndependentMergePath (const PathPtr &independent_path, std::string ds_ID, const boost::python::list &merge_back, std::string consistency_check, bool event_mixing, bool mergeSameFile) |
See 'pydoc3 basf2.Path'. | |
std::string | getPathString () const override |
return a string of the form [module a -> module b -> [another path]] More... | |
Static Public Member Functions | |
static void | exposePythonAPI () |
Exposes methods of the Path class to Python. | |
Private Attributes | |
std::list< std::shared_ptr< PathElement > > | m_elements |
The list of path elements (Modules and sub-Paths) | |
Friends | |
class | PathIterator |
Implements a path consisting of Module and/or Path objects.
The modules are arranged in a linear order.
void addModule | ( | const std::shared_ptr< Module > & | module | ) |
Adds a module to the path.
The module is added to the path by inserting it to the end of the list of modules.
See 'pydoc3 basf2.Path' for the complete documentation.
module | Module that should be added to the path. |
Definition at line 32 of file Path.cc.
ModulePtrList buildModulePathList | ( | bool | unique = true | ) | const |
Builds a list of all modules which could be executed during the data processing.
The method starts with the current path, iterates over the modules in the path and follows recursively module conditions to make sure the final list contains all modules which could be executed while preserving their correct order.
unique | If true, the list will be unique. |
|
overridevirtual |
Create an independent copy of this path, recreating all contained modules with the same parameters.
Note that parameters are shared, so changing them on a module in the cloned path will also affect the module in the original path.
Implements PathElement.
bool contains | ( | const std::string & | moduleType | ) | const |
|
overridevirtual |
Returns a list of the modules in this path.
(Recursively searches sub-paths)
Implements PathElement.
|
overridevirtual |
return a string of the form [module a -> module b -> [another path]]
can be used to 'print' a path in a steering file.
Implements PathElement.