EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
PndFieldContFact.cxx
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file PndFieldContFact.cxx
1
#include "
PndFieldContFact.h
"
2
#include "
PndFieldPar.h
"
3
#include "
PndSolenoidPar.h
"
4
#include "
PndSolenoid1Par.h
"
5
#include "
PndSolenoid2Par.h
"
6
#include "
PndSolenoid3Par.h
"
7
#include "
PndSolenoid4Par.h
"
8
#include "
PndDipolePar.h
"
9
#include "
PndDipole1Par.h
"
10
#include "
PndDipole2Par.h
"
11
#include "
PndDipole3Par.h
"
12
#include "
PndTransPar.h
"
13
#include "
PndConstPar.h
"
14
#include "
FairParSet.h
"
15
#include "
FairRuntimeDb.h
"
16
#include "
PndMultiFieldPar.h
"
17
#include <iostream>
18
19
using namespace
std;
20
static
PndFieldContFact
gPndFieldContFact
;
21
22
23
// ----- Constructor ---------------------------------------------------
24
PndFieldContFact::PndFieldContFact
() {
25
fName =
"PndFieldContFact"
;
26
fTitle =
"Factory for field parameter containers"
;
27
SetAllContainers();
28
FairRuntimeDb::instance
()->
addContFactory
(
this
);
29
}
30
// -------------------------------------------------------------------------
31
32
33
// ----- Destructor ----------------------------------------------------
34
PndFieldContFact::~PndFieldContFact
() { }
35
// -------------------------------------------------------------------------
36
37
38
39
// ----- Create containers ---------------------------------------------
40
FairParSet
*
PndFieldContFact::createContainer
(
FairContainer
* container) {
41
42
43
const
char
*
name
= container->GetName();
44
// cout << "create PndFieldPar container " << name << endl;
45
FairParSet
*
set
= NULL;
46
if
( strcmp(name,
"PndFieldPar"
) == 0 ) {
47
set
=
new
PndFieldPar
( container->
getConcatName
().Data(),
48
container->GetTitle(),
49
container->
getContext
() );
50
}
else
if
( strcmp(name,
"PndSolenoidPar"
) == 0 ) {
51
set
=
new
PndSolenoidPar
( container->
getConcatName
().Data(),
52
container->GetTitle(),
53
container->
getContext
() );
54
}
else
if
( strcmp(name,
"PndSolenoid1Par"
) == 0 ) {
55
set
=
new
PndSolenoid1Par
( container->
getConcatName
().Data(),
56
container->GetTitle(),
57
container->
getContext
() );
58
}
else
if
( strcmp(name,
"PndSolenoid2Par"
) == 0 ) {
59
set
=
new
PndSolenoid2Par
( container->
getConcatName
().Data(),
60
container->GetTitle(),
61
container->
getContext
() );
62
}
else
if
( strcmp(name,
"PndSolenoid3Par"
) == 0 ) {
63
set
=
new
PndSolenoid3Par
( container->
getConcatName
().Data(),
64
container->GetTitle(),
65
container->
getContext
() );
66
}
else
if
( strcmp(name,
"PndSolenoid4Par"
) == 0 ) {
67
set
=
new
PndSolenoid4Par
( container->
getConcatName
().Data(),
68
container->GetTitle(),
69
container->
getContext
() );
70
}
else
if
( strcmp(name,
"PndDipolePar"
) == 0 ) {
71
set
=
new
PndDipolePar
( container->
getConcatName
().Data(),
72
container->GetTitle(),
73
container->
getContext
() );
74
}
else
if
( strcmp(name,
"PndDipole1Par"
) == 0 ) {
75
set
=
new
PndDipole1Par
( container->
getConcatName
().Data(),
76
container->GetTitle(),
77
container->
getContext
() );
78
}
else
if
( strcmp(name,
"PndDipole2Par"
) == 0 ) {
79
set
=
new
PndDipole2Par
( container->
getConcatName
().Data(),
80
container->GetTitle(),
81
container->
getContext
() );
82
}
else
if
( strcmp(name,
"PndDipoleP3ar"
) == 0 ) {
83
set
=
new
PndDipole3Par
( container->
getConcatName
().Data(),
84
container->GetTitle(),
85
container->
getContext
() );
86
}
else
if
( strcmp(name,
"PndTransPar"
) == 0 ) {
87
set
=
new
PndTransPar
( container->
getConcatName
().Data(),
88
container->GetTitle(),
89
container->
getContext
() );
90
}
else
if
( strcmp(name,
"PndConstPar"
) == 0 ) {
91
set
=
new
PndConstPar
( container->
getConcatName
().Data(),
92
container->GetTitle(),
93
container->
getContext
() );
94
}
else
if
( strcmp(name,
"PndMultiFieldPar"
) == 0 ) {
95
set
=
new
PndMultiFieldPar
( container->
getConcatName
().Data(),
96
container->GetTitle(),
97
container->
getContext
() );
98
}
99
return
set
;
100
}
101
// -------------------------------------------------------------------------
102
103
104
105
// ----- Set all containers (private) ----------------------------------
106
void
PndFieldContFact::SetAllContainers
() {
107
FairContainer
* con1 =
new
FairContainer
(
"PndFieldPar"
,
108
"Field parameter container"
,
109
"Default field"
);
110
containers->Add(con1);
111
FairContainer
* con2 =
new
FairContainer
(
"PndSolenoidPar"
,
112
"Solenoid Field parameter container"
,
113
"Default field"
);
114
containers->Add(con2);
115
116
FairContainer
* con21 =
new
FairContainer
(
"PndSolenoid1Par"
,
117
"Solenoid 1st region parameter container"
,
118
"Default field"
);
119
containers->Add(con21);
120
FairContainer
* con22 =
new
FairContainer
(
"PndSolenoid2Par"
,
121
"Solenoid 2nd region parameter container"
,
122
"Default field"
);
123
containers->Add(con22);
124
125
FairContainer
* con23 =
new
FairContainer
(
"PndSolenoid3Par"
,
126
"Solenoid 3rd region parameter container"
,
127
"Default field"
);
128
containers->Add(con23);
129
130
FairContainer
* con24 =
new
FairContainer
(
"PndSolenoid4Par"
,
131
"Solenoid 4th region parameter container"
,
132
"Default field"
);
133
containers->Add(con24);
134
135
FairContainer
* con3 =
new
FairContainer
(
"PndDipolePar"
,
136
"Dipole Field parameter container"
,
137
"Default field"
);
138
containers->Add(con3);
139
140
141
FairContainer
* con31 =
new
FairContainer
(
"PndDipole1Par"
,
142
"Dipole Field parameter container"
,
143
"Default field"
);
144
containers->Add(con31);
145
146
FairContainer
* con32 =
new
FairContainer
(
"PndDipole2Par"
,
147
"Dipole Field parameter container"
,
148
"Default field"
);
149
containers->Add(con32);
150
151
152
FairContainer
* con33 =
new
FairContainer
(
"PndDipole3Par"
,
153
"Dipole Field parameter container"
,
154
"Default field"
);
155
containers->Add(con33);
156
157
158
FairContainer
* con4 =
new
FairContainer
(
"PndTransPar"
,
159
"Trans. Field parameter container"
,
160
"Default field"
);
161
containers->Add(con4);
162
163
FairContainer
* con5 =
new
FairContainer
(
"PndConstPar"
,
164
"Const Field parameter container"
,
165
"Default field"
);
166
containers->Add(con5);
167
168
FairContainer
* con6 =
new
FairContainer
(
"PndMultiFieldPar"
,
169
"Multiple Field parameter container"
,
170
"Default field"
);
171
containers->Add(con6);
172
173
174
}
175
// -------------------------------------------------------------------------
176
177
178
ClassImp
(
PndFieldContFact
)
EicRoot
blob
master
field
PndFieldContFact.cxx
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:36
using
1.8.2 with
EIC GitHub integration