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