Belle II Software
release-05-02-19
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
a
b
c
d
e
h
i
l
m
n
p
r
s
t
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
BFieldMap.cc
1
/**************************************************************************
2
* BASF2 (Belle Analysis Framework 2) *
3
* Copyright(C) 2010-2011 Belle II Collaboration *
4
* *
5
* Author: The Belle II Collaboration *
6
* Contributors: Andreas Moll *
7
* *
8
* This software is provided "as is" without any warranty. *
9
**************************************************************************/
10
11
#include <geometry/bfieldmap/BFieldMap.h>
12
#include <framework/logging/Logger.h>
13
14
using namespace
std;
15
using namespace
Belle2
;
16
17
BFieldMap
& BFieldMap::Instance()
18
{
19
static
std::unique_ptr<BFieldMap> instance(
new
BFieldMap
());
20
return
*instance;
21
}
22
23
void
BFieldMap::initialize()
24
{
25
if
(!m_isMapInitialized) {
26
for
(
BFieldComponentAbs
* comp : m_components) {
27
comp->
initialize
();
28
}
29
30
m_isMapInitialized =
true
;
31
B2DEBUG(10,
"The magnetic field map has been initialized."
);
32
}
33
}
34
35
void
BFieldMap::clear()
36
{
37
m_isMapInitialized =
false
;
38
for
(
auto
ptr : m_components)
delete
ptr;
39
m_components.clear();
40
}
41
42
//====================================================================
43
// Private methods
44
//====================================================================
45
46
BFieldMap::BFieldMap() : m_isMapInitialized(false)
47
{
48
49
}
50
51
BFieldMap::~BFieldMap
()
52
{
53
if
(
m_isMapInitialized
) {
54
//Delete the magnetic field components by calling their terminate() method and freeing their memory.
55
for
(
BFieldComponentAbs
* comp :
m_components
) {
56
comp->terminate();
57
delete
comp;
58
}
59
}
60
}
Belle2::BFieldMap::m_isMapInitialized
bool m_isMapInitialized
If false the map hasn't been initialized yet.
Definition:
BFieldMap.h:85
Belle2::BFieldMap
This class represents the magnetic field of the Belle II detector.
Definition:
BFieldMap.h:41
Belle2::BFieldMap::initialize
void initialize()
Initialize the magnetic field after adding all components.
Definition:
BFieldMap.cc:23
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::BFieldMap::~BFieldMap
virtual ~BFieldMap()
The destructor of the BFieldMap class.
Definition:
BFieldMap.cc:51
Belle2::BFieldComponentAbs
The BFieldComponentAbs class.
Definition:
BFieldComponentAbs.h:41
Belle2::BFieldMap::m_components
std::list< BFieldComponentAbs * > m_components
The components of the magnetic field.
Definition:
BFieldMap.h:80
geometry
bfieldmap
src
BFieldMap.cc
Generated on Tue Jan 4 2022 02:58:58 for Belle II Software by
1.8.17