R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BPassiveContFact.cxx
Go to the documentation of this file.
1
/******************************************************************************
2
* Copyright (C) 2009 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3
* Copyright (C) 2009-2026 Members of R3B Collaboration *
4
* *
5
* This software is distributed under the terms of the *
6
* GNU General Public Licence (GPL) version 3, *
7
* copied verbatim in the file "LICENSE". *
8
* *
9
* In applying this license GSI does not waive the privileges and immunities *
10
* granted to it by virtue of its status as an Intergovernmental Organization *
11
* or submit itself to any jurisdiction. *
12
******************************************************************************/
13
14
#include "
R3BPassiveContFact.h
"
15
#include "
R3BGeoPassivePar.h
"
16
#include "
R3BLogger.h
"
17
#include "R3BTGeoPar.h"
18
19
#include <TClass.h>
20
21
static
R3BPassiveContFact
gR3BPassiveContFact
;
22
23
R3BPassiveContFact::R3BPassiveContFact
()
24
{
25
// Constructor (called when the library is loaded)
26
fName =
"R3BPassiveContFact"
;
27
fTitle =
"Factory for parameter containers in libR3BPassive"
;
28
setAllContainers
();
29
FairRuntimeDb::instance()->addContFactory(
this
);
30
}
31
32
void
R3BPassiveContFact::setAllContainers
()
33
{
34
auto
p1 =
new
FairContainer(
"R3BGeoPassivePar"
,
"Passive Geometry Parameters"
,
"TestDefaultContext"
);
35
p1->addContext(
"TestNonDefaultContext"
);
36
containers->Add(p1);
37
38
auto
p2 =
new
FairContainer(
"TargetGeoPar"
,
"Target geometry parameters"
,
"GeometryParameterContext"
);
39
p2->addContext(
"GeometryParameterContext"
);
40
containers->Add(p2);
41
}
42
43
FairParSet*
R3BPassiveContFact::createContainer
(FairContainer* c)
44
{
45
const
std::string name(c->GetName());
46
R3BLOG
(info,
"Create container name: "
<< name.c_str());
47
48
FairParSet* p =
nullptr
;
49
if
(name ==
"R3BGeoPassivePar"
)
50
{
51
p =
new
R3BGeoPassivePar
(c->getConcatName().Data(), c->GetTitle(), c->getContext());
52
}
53
else
if
(name ==
"TargetGeoPar"
)
54
{
55
p =
new
R3BTGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
56
}
57
return
p;
58
}
59
60
ClassImp
(
R3BPassiveContFact
)
R3BGeoPassivePar.h
R3BLogger.h
R3BLOG
#define R3BLOG(severity, x)
Definition
R3BLogger.h:33
ClassImp
ClassImp(R3B::Neuland::Cal2HitPar)
gR3BPassiveContFact
static R3BPassiveContFact gR3BPassiveContFact
Definition
R3BPassiveContFact.cxx:21
R3BPassiveContFact.h
R3BGeoPassivePar
Definition
R3BGeoPassivePar.h:19
R3BPassiveContFact
Definition
R3BPassiveContFact.h:22
R3BPassiveContFact::R3BPassiveContFact
R3BPassiveContFact()
Definition
R3BPassiveContFact.cxx:23
R3BPassiveContFact::setAllContainers
void setAllContainers()
Definition
R3BPassiveContFact.cxx:32
R3BPassiveContFact::createContainer
FairParSet * createContainer(FairContainer *) override
Definition
R3BPassiveContFact.cxx:43
passive
R3BPassiveContFact.cxx
Generated by
1.16.1