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