ATLAS Offline Software
Simulation
G4Atlas
G4AtlasServices
src
G4MagFieldSvcBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef G4ATLASSERVICES_G4MagFieldSvcBase_H
6
#define G4ATLASSERVICES_G4MagFieldSvcBase_H
7
8
// Geant4 includes
9
#include "G4SystemOfUnits.hh"
10
11
// Framework includes
12
#include "
AthenaBaseComps/AthService.h
"
13
14
// G4Atlas includes
15
#include "
G4AtlasInterfaces/IG4FieldSvc.h
"
16
#include "
G4AtlasTools/ThreadLocalHolder.h
"
17
18
// Forward declarations
19
class
G4MagneticField;
20
21
29
class
G4MagFieldSvcBase
:
public
extends<AthService, IG4FieldSvc> {
30
31
public
:
33
G4MagFieldSvcBase
(
const
std::string&
name
, ISvcLocator* pSvcLocator );
34
36
virtual
~G4MagFieldSvcBase
() {};
37
40
G4MagneticField*
getField
() override final;
41
42
protected
:
43
45
virtual G4MagneticField*
makeField
() = 0;
46
48
thread_utils
::ThreadLocalOwner<G4MagneticField>
m_fieldHolder
;
49
50
};
51
52
#endif // G4ATLASSERVICES_G4AtlasFieldTool_H
G4MagFieldSvcBase::makeField
virtual G4MagneticField * makeField()=0
This method must be overridden by concrete tools to create a new field.
G4MagFieldSvcBase::~G4MagFieldSvcBase
virtual ~G4MagFieldSvcBase()
Empty destructor.
Definition:
G4MagFieldSvcBase.h:36
ThreadLocalHolder.h
Defines template helper classes for thread-local storage.
protected
#define protected
Definition:
DetDescrConditionsDict_dict_fixes.cxx:14
G4MagFieldSvcBase
Definition:
G4MagFieldSvcBase.h:29
G4MagFieldSvcBase::getField
G4MagneticField * getField() override final
Retrieve a G4 magnetic field object.
Definition:
G4MagFieldSvcBase.cxx:29
IG4FieldSvc.h
name
std::string name
Definition:
Control/AthContainers/Root/debug.cxx:228
G4MagFieldSvcBase::G4MagFieldSvcBase
G4MagFieldSvcBase(const std::string &name, ISvcLocator *pSvcLocator)
Standard constructor.
Definition:
G4MagFieldSvcBase.cxx:20
AthService.h
thread_utils
Definition:
ThreadLocalHolder.h:33
G4MagFieldSvcBase::m_fieldHolder
thread_utils::ThreadLocalOwner< G4MagneticField > m_fieldHolder
Thread-local field object.
Definition:
G4MagFieldSvcBase.h:48
Generated on Fri Jan 10 2025 21:10:33 for ATLAS Offline Software by
1.8.18