ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified last : 14/12/2001 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION 
/////////////////////////////////////////////////////////////
//
//  HShowerContFact
//
//  Factory for the parameter containers in libShower 
//
/////////////////////////////////////////////////////////////

#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() {
  // Constructor (called when the library is loaded)
  fName="ShowerContFact";
  fTitle="Factory for parameter containers in libShower";
  setAllContainers();
  HRuntimeDb::instance()->addContFactory(this);  
}

void HShowerContFact::setAllContainers() {
  // Creates the Container objects with all accepted contexts and adds them to
  // the list of containers for the Shower library.
  //
  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) {
  // 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,"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;
} 
 hshowercontfact.cc:1
 hshowercontfact.cc:2
 hshowercontfact.cc:3
 hshowercontfact.cc:4
 hshowercontfact.cc:5
 hshowercontfact.cc:6
 hshowercontfact.cc:7
 hshowercontfact.cc:8
 hshowercontfact.cc:9
 hshowercontfact.cc:10
 hshowercontfact.cc:11
 hshowercontfact.cc:12
 hshowercontfact.cc:13
 hshowercontfact.cc:14
 hshowercontfact.cc:15
 hshowercontfact.cc:16
 hshowercontfact.cc:17
 hshowercontfact.cc:18
 hshowercontfact.cc:19
 hshowercontfact.cc:20
 hshowercontfact.cc:21
 hshowercontfact.cc:22
 hshowercontfact.cc:23
 hshowercontfact.cc:24
 hshowercontfact.cc:25
 hshowercontfact.cc:26
 hshowercontfact.cc:27
 hshowercontfact.cc:28
 hshowercontfact.cc:29
 hshowercontfact.cc:30
 hshowercontfact.cc:31
 hshowercontfact.cc:32
 hshowercontfact.cc:33
 hshowercontfact.cc:34
 hshowercontfact.cc:35
 hshowercontfact.cc:36
 hshowercontfact.cc:37
 hshowercontfact.cc:38
 hshowercontfact.cc:39
 hshowercontfact.cc:40
 hshowercontfact.cc:41
 hshowercontfact.cc:42
 hshowercontfact.cc:43
 hshowercontfact.cc:44
 hshowercontfact.cc:45
 hshowercontfact.cc:46
 hshowercontfact.cc:47
 hshowercontfact.cc:48
 hshowercontfact.cc:49
 hshowercontfact.cc:50
 hshowercontfact.cc:51
 hshowercontfact.cc:52
 hshowercontfact.cc:53
 hshowercontfact.cc:54
 hshowercontfact.cc:55
 hshowercontfact.cc:56
 hshowercontfact.cc:57
 hshowercontfact.cc:58
 hshowercontfact.cc:59
 hshowercontfact.cc:60
 hshowercontfact.cc:61
 hshowercontfact.cc:62
 hshowercontfact.cc:63
 hshowercontfact.cc:64
 hshowercontfact.cc:65
 hshowercontfact.cc:66
 hshowercontfact.cc:67
 hshowercontfact.cc:68
 hshowercontfact.cc:69
 hshowercontfact.cc:70
 hshowercontfact.cc:71
 hshowercontfact.cc:72
 hshowercontfact.cc:73
 hshowercontfact.cc:74
 hshowercontfact.cc:75
 hshowercontfact.cc:76
 hshowercontfact.cc:77
 hshowercontfact.cc:78
 hshowercontfact.cc:79
 hshowercontfact.cc:80
 hshowercontfact.cc:81
 hshowercontfact.cc:82
 hshowercontfact.cc:83