CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ActionInitialization.cc
Go to the documentation of this file.
11 
12 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
13 
15  RunManager* runm)
16  : G4VUserActionInitialization(),
17  m_runManager(runm),
18  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
19  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
20  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
21  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
22  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
23  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
24  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction"))
25 {}
26 
27 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
28 
30 {}
31 
32 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
33 
35 {
36  SimRunInterface* interface = new SimRunInterface(m_runManager, true);
37 
38  RunAction* runAction = new RunAction(m_pRunAction, interface);
39  SetUserAction(runAction);
40  interface->Connect(runAction);
41 }
42 
43 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
44 
45 #include "G4AutoLock.hh"
46 namespace { G4Mutex ActionInitializationMutex = G4MUTEX_INITIALIZER; }
47 
49 {
50  G4AutoLock l(&ActionInitializationMutex);
51 
52  SimRunInterface* interface = new SimRunInterface(m_runManager, false);
53 
54  //Generator* gen = new Generator(m_pGenerator);
55  //SetUserAction(gen);
56 
57  RunAction* runAction = new RunAction(m_pRunAction, interface);
58  SetUserAction(runAction);
59  interface->Connect(runAction);
60 
61  EventAction* eventAction = new EventAction(m_pEventAction, interface,
62  interface->GetSimTrackManager());
63  SetUserAction(eventAction);
64  interface->Connect(eventAction);
65 
66  TrackingAction* trackAction =
67  new TrackingAction(eventAction, m_pTrackingAction);
68  SetUserAction(trackAction);
69  interface->Connect(trackAction);
70 
71  SteppingAction* stepAction =
72  new SteppingAction(eventAction, m_pSteppingAction);
73  SetUserAction(stepAction);
74  interface->Connect(stepAction);
75 
76  SetUserAction(new StackingAction(trackAction, m_pStackingAction));
77 }
78 
79 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
edm::ParameterSet m_pStackingAction
edm::ParameterSet m_pRunAction
edm::ParameterSet m_pEventAction
virtual void BuildForMaster() const
ActionInitialization(const edm::ParameterSet &ps, RunManager *runm)
virtual void Build() const
edm::ParameterSet m_pSteppingAction
edm::ParameterSet m_pTrackingAction