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