Commit f0adf949 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

GeometryBuilder: set CoutDestination for UI already in constructor

parent e11403df
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -79,6 +79,10 @@ GeometryBuilderGeant4Module::GeometryBuilderGeant4Module(Configuration& config,
        throw InvalidValueError(config_, "log_level_g4cout", "invalid log level provided");
    }

    // Set up UI manager with logging destination
    G4UImanager* ui_g4 = G4UImanager::GetUIpointer();
    ui_g4->SetCoutDestination(G4LoggingDestination::getInstance());

    geometry_construction_ = new GeometryConstructionG4(geo_manager_, config_);
}

@@ -123,9 +127,6 @@ void GeometryBuilderGeant4Module::initialize() {
    // Suppress all stdout output due to a part in Geant4 where G4cout is not used
    SUPPRESS_STREAM(std::cout);

    G4UImanager* ui_g4 = G4UImanager::GetUIpointer();
    ui_g4->SetCoutDestination(G4LoggingDestination::getInstance());

    // Create the G4 run manager. If multithreading was requested we use the custom run manager
    // that support calling BeamOn operations in parallel. Otherwise we use default manager.
    if(multithreadingEnabled()) {