Skip to content
Snippets Groups Projects
Commit 3e69ca6c authored by lintao@ihep.ac.cn's avatar lintao@ihep.ac.cn
Browse files

WIP: fix the warning of deprecated char* .

parent cdf819c8
No related branches found
No related tags found
No related merge requests found
#include "DetSimAlg.h"
#include "GaudiKernel/IEventProcessor.h"
#include "GaudiKernel/IAppMgrUI.h"
#include "GaudiKernel/GaudiException.h"
#include "G4RunManager.hh"
......@@ -60,7 +63,7 @@ DetSimAlg::initialize() {
info() << "Start Geant4 Visualization." << endmsg;
// initialize Vis
visManager = new G4VisExecutive;
char* argv[1] = {"geant4Vis"};
char* argv[1] = {strdup("geant4Vis")};
ui = new G4UIExecutive(1,argv);
}
for (auto vismac: m_vis_macs.value()) {
......@@ -89,6 +92,20 @@ DetSimAlg::initialize() {
delete visManager;
// fixme: how to stop the run?
// auto ep = serviceLocator()->as<IEventProcessor>();
// if ( !ep ) {
// error() << "Cannot get IEventProcessor" << endmsg;
// return StatusCode::FAILURE;
// }
// ep->stopRun();
// auto ep = serviceLocator()->as<IAppMgrUI>();
// if ( !ep ) {
// error() << "Cannot get IAppMgrUI" << endmsg;
// return StatusCode::FAILURE;
// }
// ep->terminate();
// throw GaudiException( "Stopping loop", "Stop", StatusCode::SUCCESS);
return StatusCode::FAILURE;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment