allpix::Allpix
Provides the link between the core framework and the executable. More…
#include <Allpix.hpp>
Public Functions
Name | |
---|---|
Allpix(std::string config_file_name, const std::vector< std::string > & module_options =std::vector< std::string >(), const std::vector< std::string > & detector_options =std::vector< std::string >()) Constructs Allpix and initialize all managers. |
|
void | load() Load modules from the main configuration and construct them. |
void | initialize() Initialize all modules (pre-run) |
void | run() Run all modules for the number of events (run) |
void | finalize() Finalize all modules (post-run) |
void | terminate() Request termination as early as possible without changing the standard flow. |
Detailed Description
class allpix::Allpix;
Provides the link between the core framework and the executable.
Supply the path location the main configuration which should be provided to the executable. Hereafter this class should be used to load, initialize, run and finalize all the modules.
Public Functions Documentation
function Allpix
explicit Allpix(
std::string config_file_name,
const std::vector< std::string > & module_options =std::vector< std::string >(),
const std::vector< std::string > & detector_options =std::vector< std::string >()
)
Constructs Allpix and initialize all managers.
Parameters:
- config_file_name Path of the main configuration file
- module_options List of extra configuration options for modules
- detector_options List of extra configuration options for the geometry setup
This class will own the managers for the lifetime of the simulation. Will do early initialization:
- Configure the special header sections.
- Set the log level and log format as requested.
- Load the detector configuration and parse it
function load
void load()
Load modules from the main configuration and construct them.
Warning: Should be called after the constructor
Performs the initialization, including:
- Initialize the random seeder
- Determine and create the output directory
- Include all the defined units
- Load the modules from the configuration
function initialize
void initialize()
Initialize all modules (pre-run)
Warning: Should be called after the load function
Runs the Module::initialize() method linearly for every module
function run
void run()
Run all modules for the number of events (run)
Warning: Should be called after the init function
Runs every modules Module::run() method linearly for the number of events
function finalize
void finalize()
Finalize all modules (post-run)
Warning: Should be called after the run function
Runs all modules Module::finalize() method linearly for every module
function terminate
void terminate()
Request termination as early as possible without changing the standard flow.
This function can be called safely from any signal handler. Time between the request to terminate and the actual termination is not always negigible.
Updated on 2024-12-13 at 08:31:36 +0000