///////////////////////////////////////////////////////////// // // CbmMuoContFact // // Factory for the parameter containers in libMuo // ///////////////////////////////////////////////////////////// using namespace std; #include "CbmMuoContFact.h" #include "CbmRuntimeDb.h" #include "CbmGeoMuoPar.h" //#include "CbmParRootFileIo.h" //#include "CbmParAsciiFileIo.h" #include #include ClassImp(CbmMuoContFact) static CbmMuoContFact gCbmMuoContFact; CbmMuoContFact::CbmMuoContFact() { // Constructor (called when the library is loaded) fName="CbmMuoContFact"; fTitle="Factory for parameter containers in libMuo"; setAllContainers(); CbmRuntimeDb::instance()->addContFactory(this); } void CbmMuoContFact::setAllContainers() { /** Creates the Container objects with all accepted contexts and adds them to * the list of containers for the Muo library.*/ CbmContainer* p= new CbmContainer("CbmGeoMuoPar", "Muo Geometry Parameters", "TestDefaultContext"); p->addContext("TestNonDefaultContext"); containers->Add(p); } CbmParSet* CbmMuoContFact::createContainer(CbmContainer* 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(); CbmParSet* p=NULL; if (strcmp(name,"CbmGeoMuoPar")==0) { p=new CbmGeoMuoPar(c->getConcatName().Data(),c->GetTitle(),c->getContext()); } return p; } // void CbmMuoContFact::activateParIo(CbmParIo* io) { // // activates the input/output class for the parameters // // needed by the Muo // return; // }