#include "hshowercontfact.h"
#include "hruntimedb.h"
#include "hshowergeometry.h"
#include "hshowergeompar.h"
#include "hshowerdigipar.h"
#include "hshowerhitfpar.h"
#include "hshowercalpar.h"
#include "hshowerhist.h"
ClassImp(HShowerContFact)
static HShowerContFact gHShowerContFact;
HShowerContFact::HShowerContFact() {
fName="ShowerContFact";
fTitle="Factory for parameter containers in libShower";
setAllContainers();
HRuntimeDb::instance()->addContFactory(this);
}
void HShowerContFact::setAllContainers() {
containers->Add(
new HContainer("ShowerCalPar",
"Calibration parameters for Shower",
"ShowerStandardCalib"));
containers->Add(
new HContainer("ShowerDigiPar",
"Digitisation parameters for Shower",
"ShowerStandardDigiPar"));
containers->Add(
new HContainer("ShowerGeometry",
"Geometry parameters for Shower",
"GeomProduction"));
containers->Add(
new HContainer("ShowerGeomPar",
"Shower (GEANT) geometry parameters and alignment",
"GeomProduction"));
containers->Add(
new HContainer("ShowerHist",
"Histograms of offsets and slopes for Shower",
""));
containers->Add(
new HContainer("ShowerHitFPar",
"Parameter for Shower hit finder",
"ShowerStandardHitFinder"));
}
HParSet* HShowerContFact::createContainer(HContainer* c) {
const Char_t* name=c->GetName();
if (strcmp(name,"ShowerCalPar")==0)
return new HShowerCalPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
if (strcmp(name,"ShowerDigiPar")==0)
return new HShowerDigiPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
if (strcmp(name,"ShowerGeometry")==0)
return new HShowerGeometry(c->getConcatName().Data(),c->GetTitle(),c->getContext());
if (strcmp(name,"ShowerGeomPar")==0)
return new HShowerGeomPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
if (strcmp(name,"ShowerHist")==0)
return new HShowerHist(c->getConcatName().Data(),c->GetTitle(),c->getContext());
if (strcmp(name,"ShowerHitFPar")==0)
return new HShowerHitFPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
return 0;
}