BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnEcalContFact.cxx
Go to the documentation of this file.
1/*************************************************************************************
2 *
3 * Class BmnEcalContFact
4 *
5 * Adopted for BMN by: Elena Litvinenko
6 * e-mail: litvin@nf.jinr.ru
7 * Version: 10-02-2016
8 *
9 ************************************************************************************/
10#include "BmnEcalContFact.h"
11
12#include "BmnEcalGeoPar.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 = "BmnEcalContFact";
28 fTitle = "Factory for parameter containers in libEcal";
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 ECAL library.*/
37
38 FairContainer* p = new FairContainer("BmnEcalGeoPar", "Ecal Geometry Parameters", "EcalDefaultContext");
39 p->addContext("EcalNonDefaultContext");
40
41 containers->Add(p);
42
43 // p->print();
44}
45
47{
48 /** Calls the constructor of the corresponding parameter container.
49 * For an actual context, which is not an empty string and not the default context
50 * of this container, the name is concatinated with the context. */
51 const char* name = c->GetName();
52 FairParSet* p = NULL;
53 if (strcmp(name, "BmnEcalGeoPar") == 0) {
54 p = new BmnEcalGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
55 }
56 return p;
57}
static BmnEcalContFact gBmnEcalContFact
FairParSet * createContainer(FairContainer *)
Definition json.hpp:4446