FairRoot/PandaRoot
Public Member Functions | Private Member Functions | List of all members
PndMdtContFact Class Reference

#include <PndMdtContFact.h>

Inheritance diagram for PndMdtContFact:

Public Member Functions

 PndMdtContFact ()
 
 ~PndMdtContFact ()
 
FairParSet * createContainer (FairContainer *)
 

Private Member Functions

void setAllContainers ()
 

Detailed Description

Definition at line 9 of file PndMdtContFact.h.

Constructor & Destructor Documentation

PndMdtContFact::PndMdtContFact ( )

Definition at line 25 of file PndMdtContFact.cxx.

25  {
26  // Constructor (called when the library is loaded)
27  fName="PndMdtContFact";
28  fTitle="Factory for parameter containers in libMdt";
30  FairRuntimeDb::instance()->addContFactory(this);
31 }
PndMdtContFact::~PndMdtContFact ( )
inline

Definition at line 14 of file PndMdtContFact.h.

14 {}

Member Function Documentation

FairParSet * PndMdtContFact::createContainer ( FairContainer *  c)

Calls the constructor of the corresponding parameter container. For an actual context, which is not an empty string and not the default context of this container, the name is concatinated with the context.

Definition at line 51 of file PndMdtContFact.cxx.

References name, and p.

51  {
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
void PndMdtContFact::setAllContainers ( )
private

Creates the Container objects with all accepted contexts and adds them to the list of containers for the Mdt library.

Definition at line 33 of file PndMdtContFact.cxx.

References p1, and p2.

33  {
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 }
TPad * p2
Definition: hist-t7.C:117
TPad * p1
Definition: hist-t7.C:116

The documentation for this class was generated from the following files: