BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnNdetContFact.cxx
Go to the documentation of this file.
1
/*************************************************************************************
2
*
3
* Class BmnNdetContFact
4
*
5
* Adopted for BMN by: Elena Litvinenko
6
* e-mail: litvin@nf.jinr.ru
7
* Version: 06-11-2015
8
* Modified by M.Golubeva July 2022
9
*
10
************************************************************************************/
11
12
#include "
BmnNdetContFact.h
"
13
14
#include "
BmnNdetGeoPar.h
"
15
#include "FairParAsciiFileIo.h"
16
#include "FairParRootFileIo.h"
17
#include "FairRuntimeDb.h"
18
19
#include <iomanip>
20
#include <iostream>
21
22
using namespace
std
;
23
24
static
BmnNdetContFact
gBmnNdetContFact
;
25
26
BmnNdetContFact::BmnNdetContFact
()
27
{
28
// Constructor (called when the library is loaded)
29
fName =
"BmnNdetContFact"
;
30
fTitle =
"Factory for parameter containers in libNdet"
;
31
setAllContainers
();
32
FairRuntimeDb::instance()->addContFactory(
this
);
33
}
34
35
void
BmnNdetContFact::setAllContainers
()
36
{
37
/** Creates the Container objects with all accepted contexts and adds them to
38
* the list of containers for the NDET library.*/
39
40
FairContainer* p =
new
FairContainer(
"BmnNdetGeoPar"
,
"Ndet Geometry Parameters"
,
"NdetDefaultContext"
);
41
p->addContext(
"NdetNonDefaultContext"
);
42
43
containers->Add(p);
44
45
// p->print();
46
}
47
48
FairParSet
*
BmnNdetContFact::createContainer
(FairContainer* c)
49
{
50
/** Calls the constructor of the corresponding parameter container.
51
* For an actual context, which is not an empty string and not the default context
52
* of this container, the name is concatinated with the context. */
53
const
char
* name = c->GetName();
54
FairParSet
* p = NULL;
55
if
(strcmp(name,
"BmnNdetGeoPar"
) == 0) {
56
p =
new
BmnNdetGeoPar
(c->getConcatName().Data(), c->GetTitle(), c->getContext());
57
}
58
return
p;
59
}
gBmnNdetContFact
static BmnNdetContFact gBmnNdetContFact
Definition
BmnNdetContFact.cxx:24
BmnNdetContFact
Definition
BmnNdetContFact.h:13
BmnNdetContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition
BmnNdetContFact.cxx:48
BmnNdetContFact::BmnNdetContFact
BmnNdetContFact()
Definition
BmnNdetContFact.cxx:26
BmnNdetContFact::setAllContainers
void setAllContainers()
Definition
BmnNdetContFact.cxx:35
BmnNdetGeoPar
Definition
BmnNdetGeoPar.h:20
FairParSet
BmnNdetContFact.h
BmnNdetGeoPar.h
std
Definition
json.hpp:4446
detectors
ndet
BmnNdetContFact.cxx
Generated on
for BmnRoot by
1.17.0