EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FairBaseContFact.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file FairBaseContFact.cxx
1 // -------------------------------------------------------------------------
2 // ----- FairBaseContFact source file -----
3 // ----- Created 25/10/04 by Ilse Koenig -----
4 // -------------------------------------------------------------------------
5 
6 
7 // Factory for the parameter containers in Base
8 
9 #include "FairBaseContFact.h"
10 #include "FairBaseParSet.h"
11 #include "FairRuntimeDb.h"
12 
13 
15 
16 static FairBaseContFact gFairBaseContFact;
17 
19  :FairContFact()
20 {
21  // Constructor (called when the library is loaded)
22  fName="FairBaseContFact";
23  fTitle="Factory for parameter containers in libSts";
24  setAllContainers();
26 }
27 
29 {
32  FairContainer* pTest= new FairContainer("FairBaseParSet",
33  "class for parameter io",
34  "DefaultContext");
35  pTest->addContext("TestNonDefaultContext");
36  containers->Add(pTest);
37 }
38 
40 {
44  const char* name=c->GetName();
45  FairParSet* p=0;
46  if (strcmp(name,"FairBaseParSet")==0) {
47  p=new FairBaseParSet(c->getConcatName().Data(),c->GetTitle(),c->getContext());
48  }
49  return p;
50 }
51