BmnRoot
Loading...
Searching...
No Matches
BmnDchContFact.cxx
Go to the documentation of this file.
1
2//
3// BmnDchContFact
4//
5// Factory for the parameter containers in libDCH
6//
8
9#include "BmnDchContFact.h"
10#include "FairRuntimeDb.h"
11#include "BmnDchGeoPar.h"
12#include <iostream>
13#include <iomanip>
14using namespace std;
15
16static BmnDchContFact gBmnDchContFact;
17
19 // Constructor (called when the library is loaded)
20 fName="BmnDchContFact";
21 fTitle="Factory for parameter containers in libDCH";
22 setAllContainers();
23 FairRuntimeDb::instance()->addContFactory(this);
24}
25
26void BmnDchContFact::setAllContainers() {
30 FairContainer* p= new FairContainer("BmnDchGeoPar",
31 "DCH Geometry Parameters",
32 "TestDefaultContext");
33 p->addContext("TestNonDefaultContext");
34
35 containers->Add(p);
36}
37
38FairParSet* BmnDchContFact::createContainer(FairContainer* c) {
42 const char* name=c->GetName();
43 //cout << " -I container name " << name << endl;
44 FairParSet* p=0;
45 if (strcmp(name,"BmnDchGeoPar")==0) {
46 p=new BmnDchGeoPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
47 }
48 return p;
49}
50
FairParSet * createContainer(FairContainer *)
STL namespace.