00001 #include "G4Svc/G4SimEvent.h"
00002 #include "G4Svc/IG4Svc.h"
00003
00004 #include "GaudiKernel/MsgStream.h"
00005 #include "GaudiKernel/AlgFactory.h"
00006
00008 G4SimEvent::G4SimEvent(const std::string& name, ISvcLocator* pSvcLocator) :
00009 Algorithm(name, pSvcLocator)
00010 {
00011 }
00012
00013
00014
00015
00016 StatusCode G4SimEvent::initialize() {
00017
00018 MsgStream log(msgSvc(), name());
00019 StatusCode status = service("G4Svc",p_G4Svc);
00020
00021 if (status.isSuccess()) {
00022 log << MSG::DEBUG << "got the G4Svc" << endreq;
00023 } else {
00024 log << MSG::ERROR << "could not get the G4Svc" << endreq;
00025 }
00026
00027 return status;
00028
00029 }
00030
00031
00032
00033 StatusCode G4SimEvent::finalize() {
00034
00035 return StatusCode::SUCCESS;
00036
00037 }
00038
00039
00040
00041 StatusCode G4SimEvent::execute() {
00042
00043 MsgStream log(msgSvc(), name());
00044 log << MSG::VERBOSE << "Calling SimulateG4Event" << endreq;
00045
00046 p_G4Svc->SimulateG4Event();
00047
00048 return StatusCode::SUCCESS;
00049
00050 }
00051