BOSS 6.6.4.p01
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/MsgStream.h"
5#include "GaudiKernel/AlgFactory.h"
6
7/////////////////////////////////////////////////////////////////////////////
8G4SimEvent::G4SimEvent(const std::string& name, ISvcLocator* pSvcLocator) :
9 Algorithm(name, pSvcLocator)
10{
11}
12
13
14// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
15
17
18 MsgStream log(msgSvc(), name());
19 StatusCode status = service("G4Svc",p_G4Svc);
20
21 if (status.isSuccess()) {
22 log << MSG::DEBUG << "got the G4Svc" << endreq;
23 } else {
24 log << MSG::ERROR << "could not get the G4Svc" << endreq;
25 }
26
27 return status;
28
29}
30
31// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
32
34
35 return StatusCode::SUCCESS;
36
37}
38
39// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
40
41StatusCode G4SimEvent::execute() {
42
43 MsgStream log(msgSvc(), name());
44 log << MSG::VERBOSE << "Calling SimulateG4Event" << endreq;
45
46 p_G4Svc->SimulateG4Event();
47
48 return StatusCode::SUCCESS;
49
50}
51
IMessageSvc * msgSvc()
G4SimEvent(const std::string &name, ISvcLocator *pSvcLocator)
Definition: G4SimEvent.cpp:8
StatusCode execute()
Definition: G4SimEvent.cpp:41
StatusCode initialize()
Definition: G4SimEvent.cpp:16
StatusCode finalize()
Definition: G4SimEvent.cpp:33