CbmRoot
CbmPassiveContFact.cxx
Go to the documentation of this file.
1 //*-- AUTHOR : Denis Bertini
2 //*-- Created : 21/06/2005
3 
5 //
6 // CbmPassiveContFact
7 //
8 // Factory for the parameter containers in libPassive
9 //
11 
12 #include "CbmPassiveContFact.h"
13 
14 #include "CbmGeoPassivePar.h"
15 
16 #include "FairRuntimeDb.h"
17 
18 //#include <iostream>
19 //#include <iomanip>
20 
22 
23  static CbmPassiveContFact gCbmPassiveContFact;
24 
26  // Constructor (called when the library is loaded)
27  fName = "CbmPassiveContFact";
28  fTitle = "Factory for parameter containers in libPassive";
30  FairRuntimeDb::instance()->addContFactory(this);
31 }
32 
37  FairContainer* p = new FairContainer(
38  "CbmGeoPassivePar", "Passive Geometry Parameters", "TestDefaultContext");
39  p->addContext("TestNonDefaultContext");
40 
41  containers->Add(p);
42 }
43 
44 FairParSet* CbmPassiveContFact::createContainer(FairContainer* c) {
48  const char* name = c->GetName();
49  FairParSet* p = NULL;
50  if (strcmp(name, "CbmGeoPassivePar") == 0) {
51  p = new CbmGeoPassivePar(
52  c->getConcatName().Data(), c->GetTitle(), c->getContext());
53  }
54  return p;
55 }
CbmPassiveContFact::createContainer
FairParSet * createContainer(FairContainer *)
Definition: CbmPassiveContFact.cxx:44
CbmPassiveContFact
Definition: CbmPassiveContFact.h:8
CbmPassiveContFact::CbmPassiveContFact
CbmPassiveContFact()
Definition: CbmPassiveContFact.cxx:25
CbmPassiveContFact::setAllContainers
void setAllContainers()
Definition: CbmPassiveContFact.cxx:33
ClassImp
ClassImp(CbmPassiveContFact) static CbmPassiveContFact gCbmPassiveContFact
CbmPassiveContFact.h
CbmGeoPassivePar
Definition: CbmGeoPassivePar.h:6
CbmGeoPassivePar.h