BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnHodoContFact.cxx
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnHodoContFact
4 *
5 * Author: Sergei Merts
6 * e-mail: merts@jinr.ru
7 * Version: 28-03-2021
8 *
9 ************************************************************************************/
10#include "BmnHodoContFact.h"
11
12#include "BmnHodoGeoPar.h"
13#include "FairParAsciiFileIo.h"
14#include "FairParRootFileIo.h"
15#include "FairRuntimeDb.h"
16
17#include <iomanip>
18#include <iostream>
19
20using namespace std;
21
23
25{
26 // Constructor (called when the library is loaded)
27 fName = "BmnHodoContFact";
28 fTitle = "Factory for parameter containers in libHodo";
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 Hodo library.*/
37
38 FairContainer* p = new FairContainer("BmnHodoGeoPar", "Hodo Geometry Parameters", "HodoDefaultContext");
39 p->addContext("HodoNonDefaultContext");
40
41 containers->Add(p);
42}
43
45{
46 /** Calls the constructor of the corresponding parameter container.
47 * For an actual context, which is not an empty string and not the default context
48 * of this container, the name is concatinated with the context. */
49 const char* name = c->GetName();
50 FairParSet* p = NULL;
51 if (strcmp(name, "BmnHodoGeoPar") == 0) {
52 p = new BmnHodoGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
53 }
54 return p;
55}
static BmnHodoContFact gBmnHodoContFact
FairParSet * createContainer(FairContainer *)
Definition json.hpp:4446