 |
Belle II Software
release-05-02-19
|
11 #include <framework/modules/profile/StatisticsSummaryModule.h>
13 #include <framework/core/ModuleStatistics.h>
14 #include <framework/core/ModuleManager.h>
26 setDescription(
"Sums up the statistics of preceeding modules. All modules until the first module or another StatisticsSummary module in the module statistics are included.");
27 setPropertyFlags(c_ParallelProcessingCertified | c_DontCollectStatistics);
65 const std::string& name = statistics.
getName();
66 const Module* module =
nullptr;
67 for (
const auto& aModule : modules) {
68 if (aModule->getName() == name) {
69 module = aModule.get();
73 if (module && (module->getType() ==
"StatisticsSummary")) {
86 thisStatistics.
add(type, time, memory);
@ c_Event
Counting time/calls in event()
virtual void endRun() override
Record end run statistics sum.
static ModuleManager & Instance()
Exception is thrown if the requested module could not be created by the ModuleManager.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
@ c_EndRun
Counting time/calls in endRun()
EStatisticCounters
Enum to define all counter types.
value_type getMemorySum(EStatisticCounters type=c_Total) const
return the total used memory for a given counter
virtual void initialize() override
Record initialize statistics sum.
const std::string & getName() const
Return the previously set name.
const std::list< std::shared_ptr< Module > > & getCreatedModules() const
Returns a reference to the list of created modules.
Abstract base class for different kinds of events.
A module that displays the sum of multiple modules in the module statistics.
void add(EStatisticCounters type, value_type time, value_type memory)
Add a time and memory measurment to the counter of a given type.
virtual void event() override
Record event statistics sum.
double value_type
type of float variable to use for calculations and storage
@ c_BeginRun
Counting time/calls in beginRun()
void record(ModuleStatistics::EStatisticCounters type)
Record the statistics of given type.
virtual void beginRun() override
Record begin run statistics sum.
StoreObjPtr< ProcessStatistics > m_processStatistics
process statistics pointer
value_type getTimeSum(EStatisticCounters type=c_Total) const
return the sum of all execution times for a given counter
In the store you can park objects that have to be accessed by various modules.
Keep track of time and memory consumption during processing.
@ c_Init
Counting time/calls in initialize()