Belle II Software development
|
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. | |
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. | |
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. | |
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? | |
std::shared_ptr< PathElement > | clone () const override |
Create an independent copy of this path, recreating all contained modules with the same parameters. | |
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]] | |
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 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'.
Definition at line 135 of file Path.cc.
void addIndependentPath | ( | const PathPtr & | independent_path, |
std::string | ds_ID, | ||
const boost::python::list & | merge_back | ||
) |
See 'pydoc3 basf2.Path'.
Definition at line 109 of file Path.cc.
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.
void addPath | ( | const PathPtr & | path | ) |
See 'pydoc3 basf2.Path'.
Definition at line 37 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. |
Definition at line 67 of file Path.cc.
|
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.
Definition at line 186 of file Path.cc.
bool contains | ( | const std::string & | moduleType | ) | const |
Does this Path contain a module of the given type?
Useable in Python via '"ModuleType" in path' syntax.
Definition at line 178 of file Path.cc.
void doWhile | ( | PathPtr | path, |
const std::string & | condition, | ||
unsigned int | maxIterations | ||
) |
See 'pydoc3 basf2.Path'.
Definition at line 102 of file Path.cc.
|
static |
Exposes methods of the Path class to Python.
Definition at line 238 of file Path.cc.
void forEach | ( | const std::string & | loopObjectName, |
const std::string & | arrayName, | ||
PathPtr | path | ||
) |
See 'pydoc3 basf2.Path'.
Definition at line 95 of file Path.cc.
|
overridevirtual |
Returns a list of the modules in this path.
(Recursively searches sub-paths)
Implements PathElement.
Definition at line 50 of file Path.cc.
|
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.
Definition at line 206 of file Path.cc.
bool isEmpty | ( | ) | const |
Returns true if this Path doesn't contain any elements.
void putModules | ( | const std::list< std::shared_ptr< Module > > & | mlist | ) |
Replaces all Modules and sub-Paths with the specified Module list.
|
friend |
|
private |