FairRoot/PandaRoot
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
detectors
stt
PndSttContFact.cxx
Go to the documentation of this file.
1
//*-- AUTHOR : Denis Bertini
2
//*-- Created : 20/06/2005
3
5
//
6
// PndSttContFact
7
//
8
// Factory for the parameter containers in libStt
9
//
11
12
#include "
PndSttContFact.h
"
13
#include "FairRuntimeDb.h"
14
#include "
PndGeoSttPar.h
"
15
#include "
PndSttDigiPar.h
"
16
#include "FairParRootFileIo.h"
17
#include "FairParAsciiFileIo.h"
18
#include "
PndSttParRootFileIo.h
"
19
#include "
PndSttParAsciiFileIo.h
"
20
#include <iostream>
21
#include <iomanip>
22
23
ClassImp
(
PndSttContFact
)
24
25
static
PndSttContFact
gPndSttContFact;
26
27
PndSttContFact
::
PndSttContFact
()
28
{
29
// Constructor (called when the library is loaded)
30
fName=
"PndSttContFact"
;
31
fTitle=
"Factory for parameter containers in libStt"
;
32
setAllContainers();
33
FairRuntimeDb::instance()->addContFactory(
this
);
34
}
35
36
void
PndSttContFact::setAllContainers
()
37
{
40
FairContainer*
p2
=
new
FairContainer(
"PndGeoSttPar"
,
41
"Stt Geometry Parameters"
,
42
"TestDefaultContext"
);
43
p2->addContext(
"TestNonDefaultContext"
);
44
45
containers->Add(p2);
46
}
47
48
FairParSet*
PndSttContFact::createContainer
(FairContainer*
c
)
49
{
53
const
char
*
name
=c->GetName();
54
std::cout <<
" -I container name "
<< name << std::endl;
55
FairParSet*
p
=0;
56
57
if
(strcmp(name,
"PndGeoSttPar"
)==0) {
58
p=
new
PndGeoSttPar
(c->getConcatName().Data(),c->GetTitle(),c->getContext());
59
}
60
return
p
;
61
}
62
/*
63
void PndSttContFact::activateParIo(FairParIo* io) {
64
// activates the input/output class for the parameters
65
// needed by the Stt
66
if (strcmp(io->IsA()->GetName(),"FairParRootFileIo")==0) {
67
PndSttParRootFileIo* p=new PndSttParRootFileIo(((FairParRootFileIo*)io)->getParRootFile());
68
io->setDetParIo(p);
69
}
70
if (strcmp(io->IsA()->GetName(),"FairParAsciiFileIo")==0) {
71
PndSttParAsciiFileIo* p=new PndSttParAsciiFileIo(((FairParAsciiFileIo*)io)->getFile());
72
io->setDetParIo(p);
73
}
74
}
75
76
*/
PndSttParRootFileIo.h
PndSttContFact::setAllContainers
void setAllContainers()
Definition:
PndSttContFact.cxx:36
PndGeoSttPar.h
p
Double_t p
Definition:
anasim.C:58
PndSttParAsciiFileIo.h
ClassImp
ClassImp(PndSttContFact) static PndSttContFact gPndSttContFact
name
TString name
Definition:
createRootGeoFile.C:82
c
GeV c
Definition:
ReadMesDecCorrRes_PiT.C:28
PndSttContFact
Definition:
PndSttContFact.h:8
p2
TPad * p2
Definition:
hist-t7.C:117
PndSttContFact.h
PndSttContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition:
PndSttContFact.cxx:48
PndSttDigiPar.h
PndGeoSttPar
Definition:
PndGeoSttPar.h:8
Generated on Sun Aug 18 2019 03:01:46 for FairRoot/PandaRoot by
1.8.8