ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Simulation
G4Atlas
G4AtlasServices
src
UserActionSvc.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
6
#ifndef G4ATLASSERVICES__G4UA_USERACTIONSVC_H
7
#define G4ATLASSERVICES__G4UA_USERACTIONSVC_H
8
9
// Framework includes
10
#include "
AthenaBaseComps/AthService.h
"
11
#include "GaudiKernel/ToolHandle.h"
12
13
// G4Atlas includes
14
#include "
G4AtlasRunAction.h
"
15
#include "
G4AtlasEventAction.h
"
16
#include "
G4AtlasPrimaryGeneratorAction.h
"
17
#include "
G4AtlasStackingAction.h
"
18
#include "
G4AtlasTrackingAction.h
"
19
#include "
G4AtlasSteppingAction.h
"
20
#include "
G4AtlasInterfaces/IUserActionTool.h
"
21
#include "
G4AtlasInterfaces/IUserActionSvc.h
"
22
#include "
G4AtlasTools/ThreadActionHolder.h
"
23
#include "
HitManagement/HitCollectionMap.h
"
24
25
// Forward declarations
26
class
IG4RunTool
;
27
28
namespace
G4UA
29
{
30
35
class
UserActionSvc
:
public
extends<AthService, IUserActionSvc>
36
{
37
38
public
:
39
41
UserActionSvc
(
const
std::string& name, ISvcLocator* pSvcLocator);
42
44
StatusCode
initialize
()
override
;
45
47
StatusCode
initializeActionsMaster
()
override
final
;
48
50
StatusCode
initializeActions
()
override
final
;
51
52
StatusCode
getSecondaryActions
( std::vector< G4UserSteppingAction* >& actions )
override
final
;
53
54
StatusCode
addActionTool
(
const
ToolHandle<IUserActionTool>& service_tool)
override
final
;
55
56
void
G4RunTool
(
IG4RunTool
*)
override
final
;
57
59
StatusCode
BeginOfAthenaEvent
(
HitCollectionMap
&)
override
final
;
61
StatusCode
EndOfAthenaEvent
(
HitCollectionMap
&)
override
final
;
62
63
private
:
64
67
69
ToolHandleArray<IUserActionTool>
m_userActionTools
;
70
72
75
77
ThreadActionHolder<G4AtlasRunAction>
m_runActions
;
79
ThreadActionHolder<G4AtlasPrimaryGeneratorAction>
m_primaryGeneratorActions
;
81
ThreadActionHolder<G4AtlasEventAction>
m_eventActions
;
83
ThreadActionHolder<G4AtlasStackingAction>
m_stackingActions
;
85
ThreadActionHolder<G4AtlasTrackingAction>
m_trackingActions
;
87
ThreadActionHolder<G4AtlasSteppingAction>
m_steppingActions
;
88
90
91
};
// class UserActionSvc
92
93
}
94
95
#endif
AthService.h
G4AtlasEventAction.h
G4AtlasPrimaryGeneratorAction.h
G4AtlasRunAction.h
G4AtlasStackingAction.h
G4AtlasSteppingAction.h
G4AtlasTrackingAction.h
HitCollectionMap.h
IUserActionSvc.h
IUserActionTool.h
ThreadActionHolder.h
G4UA::ThreadActionHolder
A thread-local storage wrapper for the user actions.
Definition
ThreadActionHolder.h:31
G4UA::UserActionSvc::m_userActionTools
ToolHandleArray< IUserActionTool > m_userActionTools
User action tools.
Definition
UserActionSvc.h:69
G4UA::UserActionSvc::addActionTool
StatusCode addActionTool(const ToolHandle< IUserActionTool > &service_tool) override final
Definition
UserActionSvc.cxx:50
G4UA::UserActionSvc::m_eventActions
ThreadActionHolder< G4AtlasEventAction > m_eventActions
Thread-local event action.
Definition
UserActionSvc.h:81
G4UA::UserActionSvc::initializeActions
StatusCode initializeActions() override final
Initialize the user actions for the current thread.
Definition
UserActionSvc.cxx:91
G4UA::UserActionSvc::initializeActionsMaster
StatusCode initializeActionsMaster() override final
Initialize the user run actions for the main thread.
Definition
UserActionSvc.cxx:68
G4UA::UserActionSvc::getSecondaryActions
StatusCode getSecondaryActions(std::vector< G4UserSteppingAction * > &actions) override final
Definition
UserActionSvc.cxx:215
G4UA::UserActionSvc::m_steppingActions
ThreadActionHolder< G4AtlasSteppingAction > m_steppingActions
Thread-local stepping action.
Definition
UserActionSvc.h:87
G4UA::UserActionSvc::initialize
StatusCode initialize() override
Initialize the service.
Definition
UserActionSvc.cxx:38
G4UA::UserActionSvc::G4RunTool
void G4RunTool(IG4RunTool *) override final
Definition
UserActionSvc.cxx:29
G4UA::UserActionSvc::EndOfAthenaEvent
StatusCode EndOfAthenaEvent(HitCollectionMap &) override final
Calls EndOfAthenaEvent on each UserAction tool.
Definition
UserActionSvc.cxx:234
G4UA::UserActionSvc::UserActionSvc
UserActionSvc(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
Definition
UserActionSvc.cxx:21
G4UA::UserActionSvc::m_primaryGeneratorActions
ThreadActionHolder< G4AtlasPrimaryGeneratorAction > m_primaryGeneratorActions
Thread-local primary generator action.
Definition
UserActionSvc.h:79
G4UA::UserActionSvc::m_trackingActions
ThreadActionHolder< G4AtlasTrackingAction > m_trackingActions
Thread-local tracking action.
Definition
UserActionSvc.h:85
G4UA::UserActionSvc::m_stackingActions
ThreadActionHolder< G4AtlasStackingAction > m_stackingActions
Thread-local stacking action.
Definition
UserActionSvc.h:83
G4UA::UserActionSvc::BeginOfAthenaEvent
StatusCode BeginOfAthenaEvent(HitCollectionMap &) override final
Calls BeginOfAthenaEvent on each UserAction tool.
Definition
UserActionSvc.cxx:223
G4UA::UserActionSvc::m_runActions
ThreadActionHolder< G4AtlasRunAction > m_runActions
Thread-local run action.
Definition
UserActionSvc.h:77
HitCollectionMap
Small wrapper around hit collection map to facilitate accessing the hit collection.
Definition
HitCollectionMap.h:23
IG4RunTool
Provides an interface to interact with the Geant4 run.
Definition
IG4RunTool.h:22
G4UA
for nSW
Definition
CalibrationDefaultProcessing.h:19
Generated on
for ATLAS Offline Software by
1.17.0