1 #include "ERGadastContFact.h" 3 #include "ERGadastDigiPar.h" 4 #include "ERGadastGeoPar.h" 6 #include "FairRuntimeDb.h" 16 fName=
"ERGadastContFact";
17 fTitle=
"Factory for parameter containers in libTutorial1";
19 FairRuntimeDb::instance()->addContFactory(
this);
29 FairContainer* p1=
new FairContainer(
"ERGadastGeoPar",
31 "TestDefaultContext");
32 p1->addContext(
"TestNonDefaultContext");
36 FairContainer* p2=
new FairContainer(
"ERGadastDigiPar",
38 "TestDefaultContext");
39 p2->addContext(
"TestNonDefaultContext");
44 FairParSet* ERGadastContFact::createContainer(FairContainer* c)
46 const char* name=c->GetName();
48 if (strcmp(name,
"ERGadastGeoPar")==0) {
50 c->GetTitle(),c->getContext());
52 if (strcmp(name,
"ERGadastDigiPar")==0) {
54 c->GetTitle(),c->getContext());