BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMwpcContFact.cxx
Go to the documentation of this file.
1#include "BmnMwpcContFact.h"
2
3#include "BmnMwpcGeoPar.h"
4#include "FairRuntimeDb.h"
5
6#include <iomanip>
7#include <iostream>
8using namespace std;
9
11
13{
14 // Constructor (called when the library is loaded)
15 fName = "BmnMwpcContFact";
16 fTitle = "Factory for parameter containers in libMwpc";
18 FairRuntimeDb::instance()->addContFactory(this);
19}
20
22{
23 /** Creates the Container objects with all accepted contexts and adds them to
24 * the list of containers for the Tof library.*/
25
26 FairContainer* p = new FairContainer("BmnMwpcGeoPar", "Mwpc Geometry Parameters", "TestDefaultContext");
27 p->addContext("TestNonDefaultContext");
28
29 containers->Add(p);
30}
31
33{
34 /** Calls the constructor of the corresponding parameter container.
35 * For an actual context, which is not an empty string and not the default context
36 * of this container, the name is concatinated with the context. */
37 const char* name = c->GetName();
38 // cout << " -I container name " << name << endl;
39 FairParSet* p = 0;
40 if (strcmp(name, "BmnMwpcGeoPar") == 0) {
41 p = new BmnMwpcGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
42 }
43 return p;
44}
static BmnMwpcContFact gBmnMwpcContFact
FairParSet * createContainer(FairContainer *)
Definition json.hpp:4446