4#include <QCoreApplication>
7#include "G4MTRunManager.hh"
8#include "G4UImanager.hh"
14#include <gemc/glogging/glogger.h>
15#include <gemc/gsplash/gsplash.h>
16#include <gemc/glogging/gbatch_session.h>
71inline std::unique_ptr<QCoreApplication>
75 auto gbatch = std::make_unique<GBatch_Session>();
76 G4UImanager::GetUIpointer()->SetCoutDestination(gbatch.release());
78 return std::make_unique<QCoreApplication>(argc, argv);
80 return std::make_unique<QApplication>(argc, argv);
101int get_nthreads(
const std::shared_ptr<GOptions>& gopts,
const std::shared_ptr<GLogger>& log);
117 const std::shared_ptr<GLogger>& log);
144std::vector<std::string>
initial_commands(
const std::shared_ptr<GOptions>& gopts,
145 const std::shared_ptr<GLogger>& log,
146 bool configure_visualization =
true);
160 const std::shared_ptr<GLogger>& log,
161 const std::vector<std::string>& commands);
187void start_random_engine(
const std::shared_ptr<GOptions>& gopts,
const std::shared_ptr<GLogger>& log);
void define_new_gemc_units()
std::vector< std::string > initial_commands(const std::shared_ptr< GOptions > &gopts, const std::shared_ptr< GLogger > &log, bool configure_visualization)
Build a list of Geant4 UI commands needed at startup.
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)
Create a Qt application instance suitable for GUI or batch execution.
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.
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.
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.