remage
Simulation framework for HPGe-based experiments
 
Loading...
Searching...
No Matches
RMGUserInit Class Reference

User initialization class. More...

#include <RMGUserInit.hh>

Public Member Functions

 RMGUserInit ()=default
 Default constructor.
 
 ~RMGUserInit ()=default
 Default destructor.
 
 RMGUserInit (RMGUserInit const &)=delete
 
RMGUserInitoperator= (RMGUserInit const &)=delete
 
 RMGUserInit (RMGUserInit &&)=delete
 
RMGUserInitoperator= (RMGUserInit &&)=delete
 
auto GetSteppingActions () const
 Retrieves the collection of stepping actions.
 
auto GetTrackingActions () const
 Retrieves the collection of tracking actions.
 
auto GetOutputSchemes () const
 Retrieves the registered output schemes.
 
auto GetOptionalOutputSchemes () const
 Retrieves the optional output schemes.
 
auto GetUserGenerator () const
 Retrieves the user generator.
 
template<typename T, typename... Args>
void AddSteppingAction (Args &&... args)
 Adds a stepping action of type T.
 
template<typename T, typename... Args>
void AddTrackingAction (Args &&... args)
 Adds a tracking action of type T.
 
template<typename T, typename... Args>
void AddOutputScheme (Args &&... args)
 Adds an output scheme of type T.
 
template<typename T, typename... Args>
void AddOptionalOutputScheme (std::string name, Args &&... args)
 Adds an optional output scheme of type T with a given name.
 
template<typename T, typename... Args>
void SetUserGenerator (Args &&... args)
 Sets the user generator to an instance of type T.
 
void RegisterDefaultOptionalOutputSchemes ()
 Registers the default optional output schemes.
 
void ActivateOptionalOutputScheme (std::string name)
 Activates an optional output scheme by its name.
 
bool IsOptionalOutputSchemeActivated (std::string name)
 Check whether the optional output scheme is activated.
 

Detailed Description

User initialization class.

This class manages user-defined actions, output schemes, and generator configuration for the remage simulation. It provides methods to add stepping actions, tracking actions, output schemes, and to configure the user generator.

This class does not manage instances, but stores arguments that will be forwarded several times to initialize the user-defined actions on all worker threads.

Member Function Documentation

◆ ActivateOptionalOutputScheme()

void RMGUserInit::ActivateOptionalOutputScheme ( std::string name)

Activates an optional output scheme by its name.

If the scheme is not found, a fatal error is logged.

Parameters
nameThe name of the optional output scheme to activate.

◆ AddOptionalOutputScheme()

template<typename T, typename... Args>
void RMGUserInit::AddOptionalOutputScheme ( std::string name,
Args &&... args )
inline

Adds an optional output scheme of type T with a given name.

These additional output schemes can be activated with RMGManager::ActivateOptionalOutputScheme.

Template Parameters
TDerived type of RMGVOutputScheme.
Parameters
nameThe key under which the scheme will be stored.
argsArguments to forward to T's constructor.

◆ AddOutputScheme()

template<typename T, typename... Args>
void RMGUserInit::AddOutputScheme ( Args &&... args)
inline

Adds an output scheme of type T.

Template Parameters
TDerived type of RMGVOutputScheme.
Parameters
argsArguments to forward to T's constructor.

◆ AddSteppingAction()

template<typename T, typename... Args>
void RMGUserInit::AddSteppingAction ( Args &&... args)
inline

Adds a stepping action of type T.

Template Parameters
TDerived type of G4UserSteppingAction.
Parameters
argsArguments to forward to T's constructor.

◆ AddTrackingAction()

template<typename T, typename... Args>
void RMGUserInit::AddTrackingAction ( Args &&... args)
inline

Adds a tracking action of type T.

Template Parameters
TDerived type of G4UserTrackingAction.
Parameters
argsArguments to forward to T's constructor.

◆ GetOptionalOutputSchemes()

auto RMGUserInit::GetOptionalOutputSchemes ( ) const
inlinenodiscard

Retrieves the optional output schemes.

Returns
A map of functions generating RMGVOutputScheme objects, keyed by scheme name.

◆ GetOutputSchemes()

auto RMGUserInit::GetOutputSchemes ( ) const
inlinenodiscard

Retrieves the registered output schemes.

Returns
A vector of functions generating RMGVOutputScheme objects.

◆ GetSteppingActions()

auto RMGUserInit::GetSteppingActions ( ) const
inlinenodiscard

Retrieves the collection of stepping actions.

Returns
A vector of functions generating G4UserSteppingAction objects.

◆ GetTrackingActions()

auto RMGUserInit::GetTrackingActions ( ) const
inlinenodiscard

Retrieves the collection of tracking actions.

Returns
A vector of functions generating G4UserTrackingAction objects.

◆ GetUserGenerator()

auto RMGUserInit::GetUserGenerator ( ) const
inlinenodiscard

Retrieves the user generator.

Returns
A function generating an RMGVGenerator object.

◆ IsOptionalOutputSchemeActivated()

bool RMGUserInit::IsOptionalOutputSchemeActivated ( std::string name)

Check whether the optional output scheme is activated.

Parameters
nameThe name of the optional output scheme to check for.

◆ RegisterDefaultOptionalOutputSchemes()

void RMGUserInit::RegisterDefaultOptionalOutputSchemes ( )

Registers the default optional output schemes.

This includes schemes for isotope filtering, particle filtering, and track output.

◆ SetUserGenerator()

template<typename T, typename... Args>
void RMGUserInit::SetUserGenerator ( Args &&... args)
inline

Sets the user generator to an instance of type T.

Template Parameters
TDerived type of RMGVGenerator.
Parameters
argsArguments to forward to T's constructor.

The documentation for this class was generated from the following files: