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