BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnEcalContFact.cxx
Go to the documentation of this file.
1
/*************************************************************************************
2
*
3
* Class BmnEcalContFact
4
*
5
* Adopted for BMN by: Elena Litvinenko
6
* e-mail: litvin@nf.jinr.ru
7
* Version: 10-02-2016
8
*
9
************************************************************************************/
10
#include "
BmnEcalContFact.h
"
11
12
#include "
BmnEcalGeoPar.h
"
13
#include "FairParAsciiFileIo.h"
14
#include "FairParRootFileIo.h"
15
#include "FairRuntimeDb.h"
16
17
#include <iomanip>
18
#include <iostream>
19
20
using namespace
std
;
21
22
static
BmnEcalContFact
gBmnEcalContFact
;
23
24
BmnEcalContFact::BmnEcalContFact
()
25
{
26
// Constructor (called when the library is loaded)
27
fName =
"BmnEcalContFact"
;
28
fTitle =
"Factory for parameter containers in libEcal"
;
29
setAllContainers
();
30
FairRuntimeDb::instance()->addContFactory(
this
);
31
}
32
33
void
BmnEcalContFact::setAllContainers
()
34
{
35
/** Creates the Container objects with all accepted contexts and adds them to
36
* the list of containers for the ECAL library.*/
37
38
FairContainer* p =
new
FairContainer(
"BmnEcalGeoPar"
,
"Ecal Geometry Parameters"
,
"EcalDefaultContext"
);
39
p->addContext(
"EcalNonDefaultContext"
);
40
41
containers->Add(p);
42
43
// p->print();
44
}
45
46
FairParSet
*
BmnEcalContFact::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
* p = NULL;
53
if
(strcmp(name,
"BmnEcalGeoPar"
) == 0) {
54
p =
new
BmnEcalGeoPar
(c->getConcatName().Data(), c->GetTitle(), c->getContext());
55
}
56
return
p;
57
}
gBmnEcalContFact
static BmnEcalContFact gBmnEcalContFact
Definition
BmnEcalContFact.cxx:22
BmnEcalContFact
Definition
BmnEcalContFact.h:13
BmnEcalContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition
BmnEcalContFact.cxx:46
BmnEcalContFact::BmnEcalContFact
BmnEcalContFact()
Definition
BmnEcalContFact.cxx:24
BmnEcalContFact::setAllContainers
void setAllContainers()
Definition
BmnEcalContFact.cxx:33
BmnEcalGeoPar
Definition
BmnEcalGeoPar.h:18
FairParSet
BmnEcalContFact.h
BmnEcalGeoPar.h
std
Definition
json.hpp:4446
detectors
ecal
BmnEcalContFact.cxx
Generated on
for BmnRoot by
1.17.0