Belle II Software  release-05-02-19
PathUtils.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2018 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * *
7  * This software is provided "as is" without any warranty. *
8  **************************************************************************/
9 #pragma once
10 
11 #include <framework/core/Module.h>
12 #include <framework/core/Path.h>
13 
14 namespace Belle2 {
19  class PathUtils {
21  public:
26  static std::tuple<PathPtr, PathPtr, PathPtr> splitPath(const PathPtr& path);
27 
29  static ModulePtrList preparePaths(PathPtr& inputPath, PathPtr& mainPath, PathPtr& outputPath);
30 
32  static ModulePtr getHistogramManager(PathPtr& inputPath, PathPtr& mainPath, PathPtr& outputPath);
33 
36 
38  static void prependModulesIfNotPresent(ModulePtrList* modules, const ModulePtrList& prependModules);
39 
41  static void appendModule(PathPtr& path, const ModulePtr& module);
42 
44  static void prependModule(PathPtr& path, const ModulePtr& module);
45  };
47 } // namespace Belle2
Belle2::PathUtils::prependModule
static void prependModule(PathPtr &path, const ModulePtr &module)
Append given modules to the path.
Definition: PathUtils.cc:208
Belle2::PathUtils::appendModule
static void appendModule(PathPtr &path, const ModulePtr &module)
Prepend given modules to the path.
Definition: PathUtils.cc:203
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::ModulePtrList
std::list< ModulePtr > ModulePtrList
Defines a std::list of shared module pointers.
Definition: Module.h:586
Belle2::PathPtr
std::shared_ptr< Path > PathPtr
Defines a pointer to a path object as a boost shared pointer.
Definition: Path.h:30
Belle2::ModulePtr
std::shared_ptr< Module > ModulePtr
Defines a pointer to a module object as a boost shared pointer.
Definition: Module.h:42
Belle2::PathUtils::getHistogramManager
static ModulePtr getHistogramManager(PathPtr &inputPath, PathPtr &mainPath, PathPtr &outputPath)
Find the histogram manager in the paths and return it.
Definition: PathUtils.cc:89
Belle2::PathUtils::prependModulesIfNotPresent
static void prependModulesIfNotPresent(ModulePtrList *modules, const ModulePtrList &prependModules)
Prepend given 'prependModules' to 'modules', if they're not already present.
Definition: PathUtils.cc:194
Belle2::PathUtils::splitPath
static std::tuple< PathPtr, PathPtr, PathPtr > splitPath(const PathPtr &path)
Split the given part into the input, main and output path (in this order) by looking onto the paralle...
Definition: PathUtils.cc:17
Belle2::PathUtils::getTerminateGloballyModules
static ModulePtrList getTerminateGloballyModules(const ModulePtrList &modules)
Return only modules which have the TerminateGlobally Module flag set.
Definition: PathUtils.cc:184
Belle2::PathUtils::preparePaths
static ModulePtrList preparePaths(PathPtr &inputPath, PathPtr &mainPath, PathPtr &outputPath)
Adds internal zmq modules to the paths.
Definition: PathUtils.cc:105