BmnRoot
Loading...
Searching...
No Matches
BmnTOF1ContFact.cxx
Go to the documentation of this file.
1//--------------------------------------------------------------------------------------------------------------------------------------
2#include "BmnTOF1GeoPar.h"
3#include "BmnTOF1ContFact.h"
4
5#include "FairRuntimeDb.h"
6#include "FairParRootFileIo.h"
7#include "FairParAsciiFileIo.h"
8
9#include <iostream>
10#include <iomanip>
11
12static BmnTOF1ContFact gBmnTOF1ContFact;
13
14using namespace std;
15//--------------------------------------------------------------------------------------------------------------------------------------
17{
18 // Constructor (called when the library is loaded)
19 fName = "BmnTOF1ContFact";
20 fTitle = "Factory for parameter containers in libTOF1";
21
22 setAllContainers();
23 FairRuntimeDb::instance()->addContFactory(this);
24}
25//--------------------------------------------------------------------------------------------------------------------------------------
26void BmnTOF1ContFact::setAllContainers()
27{
31 FairContainer* ptr = new FairContainer("BmnTOF1GeoPar", "TOF1 Geometry Parameters", "TOF1DefaultContext");
32 ptr->addContext("TOF1NonDefaultContext");
33
34 containers->Add(ptr);
35
36 // ptp->print();
37}
38//--------------------------------------------------------------------------------------------------------------------------------------
39FairParSet* BmnTOF1ContFact::createContainer(FairContainer* c)
40{
45 const char* name = c->GetName();
46 FairParSet* ptr = NULL;
47
48 if(strcmp(name, "BmnTOF1GeoPar") == 0) ptr = new BmnTOF1GeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
49
50return ptr;
51}
52//--------------------------------------------------------------------------------------------------------------------------------------
53
FairParSet * createContainer(FairContainer *)
STL namespace.