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