![]() |
Belle II Software
release-05-02-19
|
Python interface for ProcessStatistics. More...
#include <ProcessStatisticsPython.h>
Public Member Functions | |
ProcessStatistics * | getWrapped () |
Get wrapped ProcessStatistics object. | |
std::string | getStatisticsString (ModuleStatistics::EStatisticCounters type=ModuleStatistics::c_Event, const std::vector< ModuleStatistics > *modules=nullptr) |
Return string with statistics for all modules. More... | |
std::string | getModuleStatistics (const boost::python::list &modulesPyList, ModuleStatistics::EStatisticCounters type=ModuleStatistics::c_Event) |
Return string with statistics for selected modules. More... | |
void | setModuleName (Module *module, const std::string &name) |
Set name for module in statistics. More... | |
const ModuleStatistics * | get (const std::shared_ptr< Module > &module) |
Get statistics for given module. | |
const ModuleStatistics * | getGlobal () |
Get statistics for the framework itself. | |
boost::python::list | getAll () |
Get statistics for all modules as python list. | |
void | clear () |
Clear collected statistics but keep names of modules. | |
Static Public Member Functions | |
static ProcessStatisticsPython & | getInstance () |
Return singleton instance of the statistics. | |
static void | exposePythonAPI () |
Define python wrappers to make functionality avaiable in python. | |
Private Member Functions | |
ProcessStatisticsPython ()=default | |
Private constructor due to singleton pattern. | |
ProcessStatisticsPython (const ProcessStatisticsPython &)=delete | |
Prohibit copy constructor. | |
ProcessStatisticsPython & | operator= (ProcessStatisticsPython &)=delete |
Prohibit assignment operator. | |
Python interface for ProcessStatistics.
Since ProcessStatistics itself resides in the data store, this wraps around it to export some functionality to python.
Definition at line 33 of file ProcessStatisticsPython.h.
string getModuleStatistics | ( | const boost::python::list & | modulesPyList, |
ModuleStatistics::EStatisticCounters | type = ModuleStatistics::c_Event |
||
) |
Return string with statistics for selected modules.
modulesPyList | python list of modules to show |
type | counter type to use for statistics |
Definition at line 49 of file ProcessStatisticsPython.cc.
string getStatisticsString | ( | ModuleStatistics::EStatisticCounters | type = ModuleStatistics::c_Event , |
const std::vector< ModuleStatistics > * | modules = nullptr |
||
) |
Return string with statistics for all modules.
Can be used in steering file with 'print statistics'.
type | counter type to use for statistics |
modules | map of modules to use. If NULL, default map will be used |
Definition at line 41 of file ProcessStatisticsPython.cc.
|
inline |
Set name for module in statistics.
Normally, all modules get assigned their default name which is used to register them. If multiple instances of the same module are present at the same time, this can be used to distuingish between them
module | Shared pointer to the Module for which a name is to be defined |
name | Name to show in statistics |
Definition at line 74 of file ProcessStatisticsPython.h.