allpix::ModuleManager

Module: Managers

Manager responsible for dynamically loading all modules and running their event sequence. More…

#include <ModuleManager.hpp>

Public Functions

Name
ModuleManager(const ModuleManager & ) =delete
Copying the manager is not allowed.
ModuleManager & operator=(const ModuleManager & ) =delete
Copying the manager is not allowed.
ModuleManager(ModuleManager && ) =delete
Moving the manager is not allowed.
ModuleManager & operator=(ModuleManager && ) =delete
Moving the manager is not allowed.
ModuleManager()
Construct manager.
~ModuleManager() =default
Use default destructor.
void load(Messenger * messenger, ConfigManager * conf_manager, GeometryManager * geo_manager)
Dynamically load all the modules.
void initialize()
Initialize all modules before the event sequence.
void run(RandomNumberGenerator & seeder)
Run all modules for the number of events.
void finalize()
Finalize all modules after the event sequence.
void terminate()
Terminates as soon as the current event is finished.

Friends

Name
class Event

Detailed Description

class allpix::ModuleManager;

Manager responsible for dynamically loading all modules and running their event sequence.

Responsible for the following tasks:

  • Loading the dynamic libraries
  • Instantiating the modules from the libraries
  • Initializng the modules
  • Running the modules for every event
  • Finalizing the modules

Public Functions Documentation

function ModuleManager

ModuleManager(
    const ModuleManager & 
) =delete

Copying the manager is not allowed.

function operator=

ModuleManager & operator=(
    const ModuleManager & 
) =delete

Copying the manager is not allowed.

function ModuleManager

ModuleManager(
    ModuleManager && 
) =delete

Moving the manager is not allowed.

function operator=

ModuleManager & operator=(
    ModuleManager && 
) =delete

Moving the manager is not allowed.

function ModuleManager

ModuleManager()

Construct manager.

function ~ModuleManager

~ModuleManager() =default

Use default destructor.

function load

void load(
    Messenger * messenger,
    ConfigManager * conf_manager,
    GeometryManager * geo_manager
)

Dynamically load all the modules.

Parameters:

  • messenger Pointer to the messenger
  • conf_manager Pointer to the configuration manager
  • geo_manager Pointer to the manager holding the geometry

Loads the modules specified in the configuration file. Each module is contained within its own library which is loaded automatically. After that the required modules are created from the configuration.

function initialize

void initialize()

Initialize all modules before the event sequence.

Warning: Should be called after the load function

Sets the section header and logging settings before executing the Module::initialize() function.

function run

void run(
    RandomNumberGenerator & seeder
)

Run all modules for the number of events.

Parameters:

  • seeder Reference to the seeder

Warning: Should be called after the init function

Initializes the thread pool and executes each event in parallel.

function finalize

void finalize()

Finalize all modules after the event sequence.

Warning: Should be called after the run function

Sets the section header and logging settings before executing the Module::finalize() function. Reset the logging after finalization. No method will be called after finalizing the module (except the destructor).

function terminate

void terminate()

Terminates as soon as the current event is finished.

Note: This method is safe to call from any signal handler

All modules in the event loop continue to finish the current event

Friends

friend Event

friend class Event(
    Event 
);

Updated on 2025-02-27 at 14:14:46 +0000