utilities
Loading...
Searching...
No Matches
gemcUtilities.h File Reference

Utility helpers for runtime setup, command preparation, and random-engine initialization. More...

#include <QCoreApplication>
#include "G4MTRunManager.hh"
#include "G4UImanager.hh"
#include <memory>
#include "glogger.h"
#include "gsplash.h"
#include "gbatch_session.h"
Include dependency graph for gemcUtilities.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  gemc
 

Functions

std::unique_ptr< QCoreApplication > gemc::makeQtApplication (int &argc, char *argv[], bool gui)
 Create a Qt application instance suitable for GUI or batch execution.
 
int gemc::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 > gemc::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 > gemc::initial_commands (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log)
 Build a list of Geant4 UI commands needed at startup.
 
void gemc::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 gemc::start_random_engine (const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log)
 Select and start the random engine, then seed it.
 

Detailed Description

This header contains small, self-contained utilities used during GEMC startup:

  • Qt application instantiation for GUI and batch modes
  • Computation of the number of threads to use
  • Preparation of Geant4 UI command sequences
  • Execution of those commands through the UI manager
  • Random engine selection and seeding

Definition in file gemcUtilities.h.