//*-- AUTHOR : Ilse Koenig //*-- Modified last : 21/01/2002 by Ilse Koenig ///////////////////////////////////////////////////////////// // // HMdcTrackDContFact // // Factory for the parameter containers in libMdcTrackD // ///////////////////////////////////////////////////////////// #include "hmdctrackdcontfact.h" #include "hruntimedb.h" #include "hmdctrackfitpar.h" #include ClassImp(HMdcTrackDContFact) static HMdcTrackDContFact gHMdcTrackDContFact; HMdcTrackDContFact::HMdcTrackDContFact() { // Constructor (called when the library is loaded) fName="MdcTrackDContFact"; fTitle="Factory for parameter containers in libMdcTrackD"; setAllContainers(); HRuntimeDb::instance()->addContFactory(this); } void HMdcTrackDContFact::setAllContainers() { // Creates the Container objects with all accepted contexts and adds them to // the list of containers for the MdcTrackD library. containers->Add( new HContainer("MdcTrackFitPar", "parameters for DUBNA fitter", "MdcTrackFitParProduction")); } HParSet* HMdcTrackDContFact::createContainer(HContainer* 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(); if (strcmp(name,"MdcTrackFitPar")==0) return new HMdcTrackFitPar(c->getConcatName().Data(),c->GetTitle(),c->getContext()); return 0; }