BmnRoot
Loading...
Searching...
No Matches
BmnBCContFact.cxx
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnBCContFact
4 *
5 * Adopted for BMN by: Nikita Lashmanov, Andrey Dryuk
6 * e-mail: nikita10630@mail.ru, andredryuk@gmail.com
7 * Version: 20.12.2020
8 *
9 ************************************************************************************/
10
11using namespace std;
12#include "BmnBCContFact.h"
13#include "FairRuntimeDb.h"
14#include "FairParRootFileIo.h"
15#include "FairParAsciiFileIo.h"
16#include "BmnBCGeoPar.h"
17#include <iostream>
18#include <iomanip>
19
20static BmnBCContFact gBmnBCContFact;
21
23 // Constructor (called when the library is loaded)
24 fName="BmnBCContFact";
25 fTitle="Factory for parameter containers in libBC";
26 setAllContainers();
27 FairRuntimeDb::instance()->addContFactory(this);
28}
29
30void BmnBCContFact::setAllContainers() {
34 FairContainer* t= new FairContainer("BmnBCGeoPar",
35 "BC Geometry Parameters",
36 "BCDefaultContext");
37 t->addContext("BCNonDefaultContext");
38
39 containers->Add(t);
40
41 // p->print();
42}
43
44FairParSet* BmnBCContFact::createContainer(FairContainer* c) {
48 const char* name=c->GetName();
49 FairParSet* t=NULL;
50 if (strcmp(name,"BmnBCGeoPar")==0) {
51 t=new BmnBCGeoPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
52 }
53 return t;
54}
FairParSet * createContainer(FairContainer *)
STL namespace.