//*-- AUTHOR : Jochen Markert //_HADES_CLASS_DESCRIPTION ///////////////////////////////////////////////////////////// // // HOnlineContFact // // Factory for the parameter containers in libOnline // ///////////////////////////////////////////////////////////// using namespace std; #include "honlinecontfact.h" #include "hruntimedb.h" #include #include #include "honlineconfig.h" #include "honlinestarthistbooker.h" #include "honlinehodohistbooker.h" #include "honlinewallhistbooker.h" #include "honlinerichhistbooker.h" #include "honlinemdchistbooker.h" #include "honlinetofhistbooker.h" #include "honlinetofinohistbooker.h" #include "honlineshowerhistbooker.h" #include "honlinephysicshistbooker.h" ClassImp(HOnlineContFact) static HOnlineContFact gOnlineContFact; HOnlineContFact::HOnlineContFact() { // Constructor (called when the library is loaded) fName="OnlineContFact"; fTitle="Factory for parameter containers in libOnline"; setAllContainers(); HRuntimeDb::instance()->addContFactory(this); } void HOnlineContFact::setAllContainers() { // Creates the Container objects with all accepted contexts and adds them to // the list of containers for the MDC library. HContainer* onlineconfig= new HContainer("OnlineConfig", "parameters for online configuration","OnlineConfigProduction"); containers->Add(onlineconfig); HContainer* starthistbooker= new HContainer("StartHistBooker", "parameters for Start Hist Booking","StartHistBookerProduction"); containers->Add(starthistbooker); HContainer* hodohistbooker= new HContainer("HodoHistBooker", "parameters for Hodo Hist Booking","HodoHistBookerProduction"); containers->Add(hodohistbooker); HContainer* wallhistbooker= new HContainer("WallHistBooker", "parameters for Wall Hist Booking","WallHistBookerProduction"); containers->Add(wallhistbooker); HContainer* richhistbooker= new HContainer("RichHistBooker", "parameters for Rich Hist Booking","RichHistBookerProduction"); containers->Add(richhistbooker); HContainer* mdchistbooker= new HContainer("MdcHistBooker", "parameters for Mdc Hist Booking","MdcHistBookerProduction"); containers->Add(mdchistbooker); HContainer* tofhistbooker= new HContainer("TofHistBooker", "parameters for Tof Hist Booking","TofHistBookerProduction"); containers->Add(tofhistbooker); HContainer* tofinohistbooker= new HContainer("TofinoHistBooker", "parameters for Tofino Hist Booking","TofinoHistBookerProduction"); containers->Add(tofinohistbooker); HContainer* showerhistbooker= new HContainer("ShowerHistBooker", "parameters for Shower Hist Booking","ShowerHistBookerProduction"); containers->Add(showerhistbooker); HContainer* physicshistbooker= new HContainer("PhysicsHistBooker", "parameters for Physics Hist Booking","PhysicsHistBookerProduction"); containers->Add(physicshistbooker); } HParSet* HOnlineContFact::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,"OnlineConfig")==0) return new HOnlineConfig(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"StartHistBooker")==0) return new HOnlineStartHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"HodoHistBooker")==0) return new HOnlineHodoHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"WallHistBooker")==0) return new HOnlineWallHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"RichHistBooker")==0) return new HOnlineRichHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"MdcHistBooker")==0) return new HOnlineMdcHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"TofHistBooker")==0) return new HOnlineTofHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"TofinoHistBooker")==0) return new HOnlineTofinoHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"ShowerHistBooker")==0) return new HOnlineShowerHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); if (strcmp(name,"PhysicsHistBooker")==0) return new HOnlinePhysicsHistBooker(c->getConcatName().Data(),c->GetTitle(),c->getContext()); return 0; }