BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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
14#include "BmnBCGeoPar.h"
15#include "FairParAsciiFileIo.h"
16#include "FairParRootFileIo.h"
17#include "FairRuntimeDb.h"
18
19#include <iomanip>
20#include <iostream>
21
23
25{
26 // Constructor (called when the library is loaded)
27 fName = "BmnBCContFact";
28 fTitle = "Factory for parameter containers in libBC";
30 FairRuntimeDb::instance()->addContFactory(this);
31}
32
34{
35 /** Creates the Container objects with all accepted contexts and adds them to
36 * the list of containers for the BD1 library.*/
37
38 FairContainer* t = new FairContainer("BmnBCGeoPar", "BC Geometry Parameters", "BCDefaultContext");
39 t->addContext("BCNonDefaultContext");
40
41 containers->Add(t);
42
43 // p->print();
44}
45
47{
48 /** Calls the constructor of the corresponding parameter container.
49 * For an actual context, which is not an empty string and not the default context
50 * of this container, the name is concatinated with the context. */
51 const char* name = c->GetName();
52 FairParSet* t = NULL;
53 if (strcmp(name, "BmnBCGeoPar") == 0) {
54 t = new BmnBCGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
55 }
56 return t;
57}
static BmnBCContFact gBmnBCContFact
FairParSet * createContainer(FairContainer *)
void setAllContainers()
Definition json.hpp:4446