ATLAS custom singleton run manager.
More...
#include <G4AtlasRunManager.h>
ATLAS custom singleton run manager.
This is the run manager used for serial (not-MT) jobs.
- Todo:
- sync and reduce code duplication with MT run managers.
Definition at line 30 of file G4AtlasRunManager.h.
◆ ~G4AtlasRunManager()
virtual G4AtlasRunManager::~G4AtlasRunManager |
( |
| ) |
|
|
inlinevirtual |
◆ G4AtlasRunManager()
G4AtlasRunManager::G4AtlasRunManager |
( |
| ) |
|
|
private |
◆ ATLAS_NOT_THREAD_SAFE()
static G4AtlasRunManager* GetG4AtlasRunManager G4AtlasRunManager::ATLAS_NOT_THREAD_SAFE |
( |
| ) |
|
|
static |
Retrieve the singleton instance.
◆ EndEvent()
void G4AtlasRunManager::EndEvent |
( |
| ) |
|
|
private |
◆ Initialize()
void G4AtlasRunManager::Initialize |
( |
| ) |
|
|
finaloverrideprotected |
◆ InitializeGeometry()
void G4AtlasRunManager::InitializeGeometry |
( |
| ) |
|
|
finaloverrideprotected |
Definition at line 51 of file G4AtlasRunManager.cxx.
55 ATH_MSG_ERROR (
"Could not retrieve the DetectorGeometrySvc" );
57 description <<
"InitializeGeometry: Failed to retrieve IDetectorGeometrySvc.";
58 G4Exception(
"G4AtlasRunManager",
"CouldNotRetrieveDetGeoSvc", FatalException,
description);
63 G4RunManager::SetUserInitialization(
m_detGeoSvc->GetDetectorConstruction());
65 G4RunManager::InitializeGeometry();
68 ATH_MSG_WARNING(
" User Detector not set!!! Geometry NOT initialized!!!" );
◆ InitializePhysics()
void G4AtlasRunManager::InitializePhysics |
( |
| ) |
|
|
finaloverrideprotected |
Definition at line 80 of file G4AtlasRunManager.cxx.
83 kernel->InitializePhysics();
84 physicsInitialized =
true;
90 description <<
"InitializePhysics: Failed to retrieve IPhysicsListSvc.";
91 G4Exception(
"G4AtlasRunManager",
"CouldNotRetrievePLTool", FatalException,
description);
98 ATH_MSG_ERROR (
"Could not retrieve the FastSim master tool" );
100 description <<
"InitializePhysics: Failed to retrieve IFastSimulationMasterTool.";
101 G4Exception(
"G4AtlasRunManager",
"CouldNotRetrieveFastSimMaster", FatalException,
description);
106 description <<
"InitializePhysics: Call to IFastSimulationMasterTool::initializeFastSims failed.";
107 G4Exception(
"G4AtlasRunManager",
"FailedToInitializeFastSims", FatalException,
description);
◆ initMessaging()
void AthMessaging::initMessaging |
( |
| ) |
const |
|
privateinherited |
Initialize our message level and MessageSvc.
This method should only be called once.
Definition at line 39 of file AthMessaging.cxx.
◆ msg() [1/2]
MsgStream & AthMessaging::msg |
( |
| ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 164 of file AthMessaging.h.
◆ msg() [2/2]
MsgStream & AthMessaging::msg |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
The standard message stream.
Returns a reference to the default message stream May not be invoked before sysInitialize() has been invoked.
Definition at line 179 of file AthMessaging.h.
180 {
return msg() << lvl; }
◆ msgLvl()
bool AthMessaging::msgLvl |
( |
const MSG::Level |
lvl | ) |
const |
|
inlineinherited |
Test the output level.
- Parameters
-
lvl | The message level to test against |
- Returns
- boolean Indicating if messages at given level will be printed
- Return values
-
true | Messages at level "lvl" will be printed |
Definition at line 151 of file AthMessaging.h.
◆ ProcessEvent()
bool G4AtlasRunManager::ProcessEvent |
( |
G4Event * |
event | ) |
|
Does the work of simulating an ATLAS event.
Definition at line 118 of file G4AtlasRunManager.cxx.
121 G4StateManager* stateManager = G4StateManager::GetStateManager();
122 stateManager->SetNewState(G4State_GeomClosed);
124 currentEvent =
event;
126 eventManager->ProcessOneEvent(currentEvent);
127 if (currentEvent->IsAborted()) {
128 ATH_MSG_WARNING(
"G4AtlasRunManager::ProcessEvent: Event Aborted at Detector Simulation level" );
129 currentEvent =
nullptr;
135 this->StackPreviousEvent(currentEvent);
136 bool abort = currentEvent->IsAborted();
137 currentEvent =
nullptr;
◆ RunTermination()
void G4AtlasRunManager::RunTermination |
( |
| ) |
|
|
finaloverride |
G4 function called at end of run.
Definition at line 142 of file G4AtlasRunManager.cxx.
149 this->CleanUpPreviousEvents();
150 previousEvents->clear();
153 userRunAction->EndOfRunAction(currentRun);
157 currentRun =
nullptr;
161 G4StateManager* stateManager = G4StateManager::GetStateManager();
162 stateManager->SetNewState(G4State_Idle);
165 G4GeometryManager::GetInstance()->OpenGeometry();
167 ATH_MSG_VERBOSE(
"Terminating the run... State is " << stateManager->GetStateString( stateManager->GetCurrentState() ) );
168 kernel->RunTermination();
171 userRunAction =
nullptr;
172 userEventAction =
nullptr;
173 userSteppingAction =
nullptr;
174 userStackingAction =
nullptr;
175 userTrackingAction =
nullptr;
176 userDetector =
nullptr;
177 userPrimaryGeneratorAction =
nullptr;
◆ SetDetGeoSvc()
void G4AtlasRunManager::SetDetGeoSvc |
( |
const std::string & |
typeAndName | ) |
|
|
inline |
◆ SetFastSimMasterTool()
void G4AtlasRunManager::SetFastSimMasterTool |
( |
const std::string & |
typeAndName | ) |
|
|
inline |
◆ setLevel()
void AthMessaging::setLevel |
( |
MSG::Level |
lvl | ) |
|
|
inherited |
◆ SetLogLevel()
void G4AtlasRunManager::SetLogLevel |
( |
int |
| ) |
|
|
inline |
◆ SetPhysListSvc()
void G4AtlasRunManager::SetPhysListSvc |
( |
const std::string & |
typeAndName | ) |
|
|
inline |
◆ SetQuietMode()
void G4AtlasRunManager::SetQuietMode |
( |
bool |
quietMode | ) |
|
|
inline |
◆ SetRecordFlux()
void G4AtlasRunManager::SetRecordFlux |
( |
bool |
b, |
|
|
std::unique_ptr< IFluxRecorder > |
f |
|
) |
| |
|
inline |
◆ SetVolumeSmartlessLevel()
void G4AtlasRunManager::SetVolumeSmartlessLevel |
( |
const std::map< std::string, double > & |
nameAndValue | ) |
|
|
inline |
◆ ATLAS_THREAD_SAFE
std::atomic_flag m_initialized AthMessaging::ATLAS_THREAD_SAFE = ATOMIC_FLAG_INIT |
|
mutableprivateinherited |
◆ m_detGeoSvc
◆ m_fastSimTool
◆ m_fluxRecorder
◆ m_imsg
std::atomic<IMessageSvc*> AthMessaging::m_imsg { nullptr } |
|
mutableprivateinherited |
◆ m_lvl
std::atomic<MSG::Level> AthMessaging::m_lvl { MSG::NIL } |
|
mutableprivateinherited |
◆ m_msg_tls
boost::thread_specific_ptr<MsgStream> AthMessaging::m_msg_tls |
|
mutableprivateinherited |
MsgStream instance (a std::cout like with print-out levels)
Definition at line 132 of file AthMessaging.h.
◆ m_nm
std::string AthMessaging::m_nm |
|
privateinherited |
◆ m_physListSvc
◆ m_quietMode
bool G4AtlasRunManager::m_quietMode {true} |
|
private |
◆ m_recordFlux
bool G4AtlasRunManager::m_recordFlux |
|
private |
◆ m_volumeSmartlessLevel
std::map<std::string, double> G4AtlasRunManager::m_volumeSmartlessLevel |
|
private |
The documentation for this class was generated from the following files: