#include "PixelTo3ContFact.h" #include "PixelTo3GeoPar.h" #include "FairRuntimeDb.h" #include ClassImp(PixelTo3ContFact) static PixelTo3ContFact gPixelTo3ContFact; PixelTo3ContFact::PixelTo3ContFact() : FairContFact() { /** Constructor (called when the library is loaded) */ fName="PixelTo3ContFact"; fTitle="Factory for parameter containers in libPixelTo3"; setAllContainers(); FairRuntimeDb::instance()->addContFactory(this); } void PixelTo3ContFact::setAllContainers() { /** Creates the Container objects with all accepted contexts and adds them to the list of containers for the PixelTo3 library. */ FairContainer* p= new FairContainer("PixelTo3GeoPar", "PixelTo3 Geometry Parameters", "TestDefaultContext"); p->addContext("TestNonDefaultContext"); containers->Add(p); } FairParSet* PixelTo3ContFact::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. */ const char* name=c->GetName(); FairParSet* p=NULL; if (strcmp(name,"PixelTo3GeoPar")==0) { p=new PixelTo3GeoPar(c->getConcatName().Data(), c->GetTitle(),c->getContext()); } return p; }