CbmRoot
CbmPassiveContFact.cxx
Go to the documentation of this file.
1
//*-- AUTHOR : Denis Bertini
2
//*-- Created : 21/06/2005
3
5
//
6
// CbmPassiveContFact
7
//
8
// Factory for the parameter containers in libPassive
9
//
11
12
#include "
CbmPassiveContFact.h
"
13
14
#include "
CbmGeoPassivePar.h
"
15
16
#include "FairRuntimeDb.h"
17
18
//#include <iostream>
19
//#include <iomanip>
20
21
ClassImp
(
CbmPassiveContFact
)
22
23
static
CbmPassiveContFact
gCbmPassiveContFact;
24
25
CbmPassiveContFact::CbmPassiveContFact
() : FairContFact() {
26
// Constructor (called when the library is loaded)
27
fName =
"CbmPassiveContFact"
;
28
fTitle =
"Factory for parameter containers in libPassive"
;
29
setAllContainers
();
30
FairRuntimeDb::instance()->addContFactory(
this
);
31
}
32
33
void
CbmPassiveContFact::setAllContainers
() {
37
FairContainer* p =
new
FairContainer(
38
"CbmGeoPassivePar"
,
"Passive Geometry Parameters"
,
"TestDefaultContext"
);
39
p->addContext(
"TestNonDefaultContext"
);
40
41
containers->Add(p);
42
}
43
44
FairParSet*
CbmPassiveContFact::createContainer
(FairContainer* c) {
48
const
char
* name = c->GetName();
49
FairParSet* p = NULL;
50
if
(strcmp(name,
"CbmGeoPassivePar"
) == 0) {
51
p =
new
CbmGeoPassivePar
(
52
c->getConcatName().Data(), c->GetTitle(), c->getContext());
53
}
54
return
p;
55
}
CbmPassiveContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition:
CbmPassiveContFact.cxx:44
CbmPassiveContFact
Definition:
CbmPassiveContFact.h:8
CbmPassiveContFact::CbmPassiveContFact
CbmPassiveContFact()
Definition:
CbmPassiveContFact.cxx:25
CbmPassiveContFact::setAllContainers
void setAllContainers()
Definition:
CbmPassiveContFact.cxx:33
ClassImp
ClassImp(CbmPassiveContFact) static CbmPassiveContFact gCbmPassiveContFact
CbmPassiveContFact.h
CbmGeoPassivePar
Definition:
CbmGeoPassivePar.h:6
CbmGeoPassivePar.h
sim
passive
CbmPassiveContFact.cxx
Generated on Wed Oct 28 2020 15:11:43 for CbmRoot by
1.8.18