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