BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnBdContFact.cxx
Go to the documentation of this file.
1
2using namespace std;
3#include "BmnBdContFact.h"
4
5#include "BmnBdGeoPar.h"
6#include "FairParAsciiFileIo.h"
7#include "FairParRootFileIo.h"
8#include "FairRuntimeDb.h"
9
10#include <iomanip>
11#include <iostream>
12
14
16{
17 // Constructor (called when the library is loaded)
18 fName = "BmnBdContFact";
19 fTitle = "Factory for parameter containers in libBd";
21 FairRuntimeDb::instance()->addContFactory(this);
22}
23
25{
26 /** Creates the Container objects with all accepted contexts and adds them to
27 * the list of containers for the BD1 library.*/
28
29 FairContainer* t = new FairContainer("BmnBdGeoPar", "BD Geometry Parameters", "BdDefaultContext");
30 t->addContext("BdNonDefaultContext");
31
32 containers->Add(t);
33
34 // p->print();
35}
36
38{
39 /** Calls the constructor of the corresponding parameter container.
40 * For an actual context, which is not an empty string and not the default context
41 * of this container, the name is concatinated with the context. */
42 const char* name = c->GetName();
43 FairParSet* t = NULL;
44 if (strcmp(name, "BmnBdGeoPar") == 0) {
45 t = new BmnBdGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
46 }
47 return t;
48}
static BmnBdContFact gBmnBdContFact
void setAllContainers()
FairParSet * createContainer(FairContainer *)
Definition json.hpp:4446