BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnDchContFact.cxx
Go to the documentation of this file.
1
/////////////////////////////////////////////////////////////
2
//
3
// BmnDchContFact
4
//
5
// Factory for the parameter containers in libDCH
6
//
7
/////////////////////////////////////////////////////////////
8
9
#include "
BmnDchContFact.h
"
10
11
#include "
BmnDchGeoPar.h
"
12
#include "FairRuntimeDb.h"
13
14
#include <iomanip>
15
#include <iostream>
16
using namespace
std
;
17
18
static
BmnDchContFact
gBmnDchContFact
;
19
20
BmnDchContFact::BmnDchContFact
()
21
{
22
// Constructor (called when the library is loaded)
23
fName =
"BmnDchContFact"
;
24
fTitle =
"Factory for parameter containers in libDCH"
;
25
setAllContainers
();
26
FairRuntimeDb::instance()->addContFactory(
this
);
27
}
28
29
void
BmnDchContFact::setAllContainers
()
30
{
31
/** Creates the Container objects with all accepted contexts and adds them to
32
* the list of containers for the Tof library.*/
33
34
FairContainer* p =
new
FairContainer(
"BmnDchGeoPar"
,
"DCH Geometry Parameters"
,
"TestDefaultContext"
);
35
p->addContext(
"TestNonDefaultContext"
);
36
37
containers->Add(p);
38
}
39
40
FairParSet
*
BmnDchContFact::createContainer
(FairContainer* c)
41
{
42
/** Calls the constructor of the corresponding parameter container.
43
* For an actual context, which is not an empty string and not the default context
44
* of this container, the name is concatinated with the context. */
45
const
char
* name = c->GetName();
46
// cout << " -I container name " << name << endl;
47
FairParSet
* p = 0;
48
if
(strcmp(name,
"BmnDchGeoPar"
) == 0) {
49
p =
new
BmnDchGeoPar
(c->getConcatName().Data(), c->GetTitle(), c->getContext());
50
}
51
return
p;
52
}
gBmnDchContFact
static BmnDchContFact gBmnDchContFact
Definition
BmnDchContFact.cxx:18
BmnDchContFact
Definition
BmnDchContFact.h:9
BmnDchContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition
BmnDchContFact.cxx:40
BmnDchContFact::setAllContainers
void setAllContainers()
Definition
BmnDchContFact.cxx:29
BmnDchContFact::BmnDchContFact
BmnDchContFact()
Definition
BmnDchContFact.cxx:20
BmnDchGeoPar
Definition
BmnDchGeoPar.h:9
FairParSet
BmnDchContFact.h
BmnDchGeoPar.h
std
Definition
json.hpp:4446
detectors
dch
BmnDchContFact.cxx
Generated on
for BmnRoot by
1.17.0