utilities
Loading...
Searching...
No Matches
gemc Namespace Reference

GEMC runtime setup, command, and translation utilities.

Functions

QString translateSvgLabels (QString svg)
int get_nthreads (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log)
 Determine the number of worker threads to use for the run.
std::vector< std::string > verbosity_commands (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log)
 Build a list of Geant4 UI commands that reduce verbosity across subsystems.
std::vector< std::string > initial_commands (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log, bool configure_visualization=true)
 Build a list of Geant4 UI commands needed at startup.
void run_manager_commands (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log, const std::vector< std::string > &commands)
 Execute a sequence of Geant4 UI commands through the UI manager.
void execute_macro (const std::string &filename, const std::shared_ptr< GLogger > &log)
 Execute a Geant4 macro file, terminating with an error if it cannot complete.
void define_new_gemc_units ()
void start_random_engine (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log)
 Select and start the random engine, then seed it.
std::unique_ptr< QCoreApplication > makeQtApplication (int &argc, char *argv[], bool gui, const GOptions *options=nullptr)
 Create a Qt application instance suitable for GUI or batch execution.
void installGuiTranslations (QCoreApplication &application, const GOptions *options=nullptr)
 Install GUI translations before constructing widgets, using the same language as GLogger.

Variables

constexpr int EC__RANDOMENGINENOTFOUND = 2003
 Error code used when the configured random engine name is not recognized.
constexpr char DEFAULT_RANDOM_ENGINE [] = "RanluxEngine"
 Default random engine name used when no explicit selection is provided.

Function Documentation

◆ installGuiTranslations()

void gemc::installGuiTranslations ( QCoreApplication & application,
const GOptions * options = nullptr )

The application owns the translators. Regional catalogs override the base language; embedded catalogs provide relocation-safe defaults. Missing entries retain English. Qt's standard-dialog catalogs are loaded from the Qt installation when available. Calling again replaces the translators; existing widgets require reconstruction to update their static labels. Numeric locale settings are left unchanged.

Definition at line 14 of file gQtTranslation.cc.