FairRoot/PandaRoot
PndMdtContFact.cxx
Go to the documentation of this file.
1 
3 //
4 // PndMdtContFact
5 //
6 // Factory for the parameter containers in libMdt
7 //
8 // update: George Serbanut @2008
9 //
11 
12 #include "PndMdtContFact.h"
13 #include "FairRuntimeDb.h"
14 
15 #include "PndGeoMdtPar.h"
16 #include "PndMdtRecoPar.h"
17 
18 #include <iostream>
19 #include <iomanip>
20 
22 
24 
26  // Constructor (called when the library is loaded)
27  fName="PndMdtContFact";
28  fTitle="Factory for parameter containers in libMdt";
29  setAllContainers();
30  FairRuntimeDb::instance()->addContFactory(this);
31 }
32 
37  FairContainer* p1= new FairContainer("PndGeoMdtPar",
38  "MDT Geometry Parameters",
39  "TestDefaultContext");
40  p1->addContext("TestDefaultContext");
41 
42  FairContainer* p2= new FairContainer("PndMdtRecoPar",
43  "MDT Reconstruction Parameters",
44  "TestDefaultContext");
45  p2->addContext("TestDefaultContext");
46 
47  containers->Add(p1);
48  containers->Add(p2);
49 }
50 
51 FairParSet* PndMdtContFact::createContainer(FairContainer* c) {
55  const char* name=c->GetName();
56  FairParSet* p=NULL;
57 
58  if (strcmp(name,"PndGeoMdtPar")==0) {
59  p=new PndGeoMdtPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
60  };
61 
62  if (strcmp(name,"PndMdtRecoPar")==0) {
63  p=new PndMdtRecoPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
64  };
65 
66  return p;
67 }
Double_t p
Definition: anasim.C:58
TString name
TPad * p2
Definition: hist-t7.C:117
static PndMdtContFact gPndMdtContFact
ClassImp(PndAnaContFact)
TPad * p1
Definition: hist-t7.C:116
FairParSet * createContainer(FairContainer *)