BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
G4SimEvent.cpp
Go to the documentation of this file.
1#include "G4Svc/G4SimEvent.h"
2#include "G4Svc/IG4Svc.h"
3
4#include "GaudiKernel/AlgFactory.h"
5#include "GaudiKernel/MsgStream.h"
6
7/////////////////////////////////////////////////////////////////////////////
8G4SimEvent::G4SimEvent( const std::string& name, ISvcLocator* pSvcLocator )
9 : Algorithm( name, pSvcLocator ) {}
10
11// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
12
14
15 MsgStream log( msgSvc(), name() );
16 StatusCode status = service( "G4Svc", p_G4Svc );
17
18 if ( status.isSuccess() ) { log << MSG::DEBUG << "got the G4Svc" << endmsg; }
19 else { log << MSG::ERROR << "could not get the G4Svc" << endmsg; }
20
21 return status;
22}
23
24// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
25
26StatusCode G4SimEvent::finalize() { return StatusCode::SUCCESS; }
27
28// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
29
30StatusCode G4SimEvent::execute() {
31
32 MsgStream log( msgSvc(), name() );
33 log << MSG::VERBOSE << "Calling SimulateG4Event" << endmsg;
34
35 p_G4Svc->SimulateG4Event();
36
37 return StatusCode::SUCCESS;
38}
IMessageSvc * msgSvc()
G4SimEvent(const std::string &name, ISvcLocator *pSvcLocator)
Definition G4SimEvent.cpp:8
StatusCode execute()
StatusCode initialize()
StatusCode finalize()