BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnNdetContFact.cxx
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnNdetContFact
4 *
5 * Adopted for BMN by: Elena Litvinenko
6 * e-mail: litvin@nf.jinr.ru
7 * Version: 06-11-2015
8 * Modified by M.Golubeva July 2022
9 *
10 ************************************************************************************/
11
12#include "BmnNdetContFact.h"
13
14#include "BmnNdetGeoPar.h"
15#include "FairParAsciiFileIo.h"
16#include "FairParRootFileIo.h"
17#include "FairRuntimeDb.h"
18
19#include <iomanip>
20#include <iostream>
21
22using namespace std;
23
25
27{
28 // Constructor (called when the library is loaded)
29 fName = "BmnNdetContFact";
30 fTitle = "Factory for parameter containers in libNdet";
32 FairRuntimeDb::instance()->addContFactory(this);
33}
34
36{
37 /** Creates the Container objects with all accepted contexts and adds them to
38 * the list of containers for the NDET library.*/
39
40 FairContainer* p = new FairContainer("BmnNdetGeoPar", "Ndet Geometry Parameters", "NdetDefaultContext");
41 p->addContext("NdetNonDefaultContext");
42
43 containers->Add(p);
44
45 // p->print();
46}
47
49{
50 /** Calls the constructor of the corresponding parameter container.
51 * For an actual context, which is not an empty string and not the default context
52 * of this container, the name is concatinated with the context. */
53 const char* name = c->GetName();
54 FairParSet* p = NULL;
55 if (strcmp(name, "BmnNdetGeoPar") == 0) {
56 p = new BmnNdetGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
57 }
58 return p;
59}
static BmnNdetContFact gBmnNdetContFact
FairParSet * createContainer(FairContainer *)
Definition json.hpp:4446