CbmRoot
Loading...
Searching...
No Matches
CbmStar2019ContFact.cxx
Go to the documentation of this file.
1
/* Copyright (C) 2018 Facility for Antiproton and Ion Research in Europe, Darmstadt
2
SPDX-License-Identifier: GPL-3.0-only
3
Authors: Pierre-Alain Loizeau [committer] */
4
6
//
7
// CbmStar2019ContFact
8
//
9
// Factory for the parameter containers in libStar2019
10
//
12
13
#include "
CbmStar2019ContFact.h
"
14
15
#include "
CbmStar2019TofPar.h
"
16
17
#include "FairRuntimeDb.h"
18
19
ClassImp
(
CbmStar2019ContFact
)
20
21
static
CbmStar2019ContFact
gCbmStar2019ContFact;
22
23
CbmStar2019ContFact::CbmStar2019ContFact
()
24
{
25
// Constructor (called when the library is loaded)
26
fName =
"CbmStar2019ContFact"
;
27
fTitle =
"Factory for parameter containers for fles test library"
;
28
setAllContainers
();
29
FairRuntimeDb::instance()->addContFactory(
this
);
30
}
31
32
void
CbmStar2019ContFact::setAllContainers
()
33
{
38
FairContainer* pTof =
39
new
FairContainer(
"CbmStar2019TofPar"
,
"TOF at MCBM 2018 Unpack Parameters"
,
"TestDefaultContext"
);
40
pTof->addContext(
"TestNonDefaultContext"
);
41
42
containers->Add(pTof);
43
}
44
45
FairParSet*
CbmStar2019ContFact::createContainer
(FairContainer* c)
46
{
50
const
char
* name = c->GetName();
51
FairParSet* p = 0;
52
53
if
(strcmp(name,
"CbmStar2019TofPar"
) == 0) {
54
p =
new
CbmStar2019TofPar
(c->getConcatName().Data(), c->GetTitle(), c->getContext());
55
}
56
57
return
p;
58
}
ClassImp
ClassImp(CbmStar2019ContFact) static CbmStar2019ContFact gCbmStar2019ContFact
CbmStar2019ContFact.h
CbmStar2019TofPar.h
CbmStar2019ContFact
Definition
CbmStar2019ContFact.h:13
CbmStar2019ContFact::setAllContainers
void setAllContainers()
Definition
CbmStar2019ContFact.cxx:32
CbmStar2019ContFact::CbmStar2019ContFact
CbmStar2019ContFact()
Definition
CbmStar2019ContFact.cxx:23
CbmStar2019ContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition
CbmStar2019ContFact.cxx:45
CbmStar2019TofPar
Definition
CbmStar2019TofPar.h:22
fles
star2019
parameter
CbmStar2019ContFact.cxx
Generated on Sun Dec 22 2024 23:04:12 for CbmRoot by
1.12.0