//*-- AUTHOR : Ilse Koenig //*-- Created : 16/11/2015 //*-- Modified : RafaƂ Lalik //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // // HForwardContFact // // Factory for the parameter containers in libHForward // ///////////////////////////////////////////////////////////// #include "hforwardcontfact.h" #include "hforwardcandfinderpar.h" #include "hruntimedb.h" ClassImp(HForwardContFact); static HForwardContFact gHForwardContFact; HForwardContFact::HForwardContFact() { // Constructor (called when the library is loaded) fName = "ForwardContFact"; fTitle = "Factory for parameter containers in libHForward"; setAllContainers(); HRuntimeDb::instance()->addContFactory(this); } void HForwardContFact::setAllContainers() { // Creates the Container objects with all accepted contexts and adds them to // the list of containers for the Forward library. containers->Add( new HContainer("ForwardCandFinderPar", "Forward vector finder parameters", "ForwardCandFinderProduction")); } HParSet *HForwardContFact::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_t *name = c->GetName(); if (strcmp(name, "ForwardCandFinderPar") == 0) return new HForwardCandFinderPar(c->getConcatName().Data(), c->GetTitle(), c->getContext()); return 0; }