ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified last : 03/12/2009 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION
/////////////////////////////////////////////////////////////
//
//  HStartContFact
//
//  Factory for the parameter containers in libStart
//
/////////////////////////////////////////////////////////////

#include "hruntimedb.h"
#include "hstart2calpar.h"
#include "hstart2hitfpar.h"
#include "hstart2trb2lookup.h"
#include "hstart2calrunpar.h"
#include "hstart2geompar.h"
#include "hstart2digipar.h"
#include "hstart2trb3lookup.h"
#include "hstart2trb3calpar.h"
#include "hstartcontfact.h"

ClassImp(HStartContFact)

static HStartContFact gHStartContFact;

HStartContFact::HStartContFact()
{
   // Constructor (called when the library is loaded)
   fName = "StartContFact";
   fTitle = "Factory for parameter containers in libStart";
   setAllContainers();
   HRuntimeDb::instance()->addContFactory(this);
}

void HStartContFact::setAllContainers()
{
   // Creates the Container objects with all accepted contexts and adds them to
   // the list of containers for the Start library.
   containers->Add(
      new HContainer("Start2Trb2Lookup",
                     "Lookup table for Start2 TRB unpacker",
                     "Start2Trb2LookupProduction"));
   containers->Add(
      new HContainer("Start2Calpar",
                     "Calibration parameters for Start2",
                     "Start2CalparProduction"));
   containers->Add(
      new HContainer("Start2HitFPar",
                     "Start2 Hit Finder Parameters",
                     "Start2HitFParProduction"));
   containers->Add(
      new HContainer("Start2CalRunPar",
                     "Start2 offset corrections per run Parameters",
                     "Start2CalRunParProduction"));
   containers->Add(
      new HContainer("Start2GeomPar",
                     "Geometry parameters of the Start Detector",
                     "GeomProduction"));
   containers->Add(
      new HContainer("Start2DigiPar",
                     "Digitization parameters of the Start detector",
                     "Start2DigiProduction"));
   containers->Add(
      new HContainer("Start2Trb3Lookup",
                     "Lookup table for Start2 TRB3 unpacker",
                     "Start2Trb3LookupProduction"));
   containers->Add(
      new HContainer("Start2Trb3Calpar",
                     "TRB3 TDC calibration parameters of the Start detector",
                     "Trb3CalparProduction"));
}

HParSet* HStartContFact::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, "Start2Trb2Lookup") == 0)
      return new HStart2Trb2Lookup(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (strcmp(name, "Start2Calpar") == 0)
      return new HStart2Calpar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (0 == strncmp(name, "Start2HitFPar", strlen("Start2HitFPar")))
      return new HStart2HitFPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (0 == strncmp(name, "Start2CalRunPar", strlen("Start2CalRunPar")))
      return new HStart2CalRunPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (0 == strncmp(name, "Start2GeomPar", strlen("Start2GeomPar")))
      return new HStart2GeomPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (0 == strncmp(name, "Start2DigiPar", strlen("Start2DigiPar")))
      return new HStart2DigiPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (strcmp(name, "Start2Trb3Lookup") == 0)
      return new HStart2Trb3Lookup(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   if (0 == strncmp(name, "Start2Trb3Calpar", strlen("Start2Trb3Calpar")))
      return new HStart2Trb3Calpar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
   return 0;
}
 hstartcontfact.cc:1
 hstartcontfact.cc:2
 hstartcontfact.cc:3
 hstartcontfact.cc:4
 hstartcontfact.cc:5
 hstartcontfact.cc:6
 hstartcontfact.cc:7
 hstartcontfact.cc:8
 hstartcontfact.cc:9
 hstartcontfact.cc:10
 hstartcontfact.cc:11
 hstartcontfact.cc:12
 hstartcontfact.cc:13
 hstartcontfact.cc:14
 hstartcontfact.cc:15
 hstartcontfact.cc:16
 hstartcontfact.cc:17
 hstartcontfact.cc:18
 hstartcontfact.cc:19
 hstartcontfact.cc:20
 hstartcontfact.cc:21
 hstartcontfact.cc:22
 hstartcontfact.cc:23
 hstartcontfact.cc:24
 hstartcontfact.cc:25
 hstartcontfact.cc:26
 hstartcontfact.cc:27
 hstartcontfact.cc:28
 hstartcontfact.cc:29
 hstartcontfact.cc:30
 hstartcontfact.cc:31
 hstartcontfact.cc:32
 hstartcontfact.cc:33
 hstartcontfact.cc:34
 hstartcontfact.cc:35
 hstartcontfact.cc:36
 hstartcontfact.cc:37
 hstartcontfact.cc:38
 hstartcontfact.cc:39
 hstartcontfact.cc:40
 hstartcontfact.cc:41
 hstartcontfact.cc:42
 hstartcontfact.cc:43
 hstartcontfact.cc:44
 hstartcontfact.cc:45
 hstartcontfact.cc:46
 hstartcontfact.cc:47
 hstartcontfact.cc:48
 hstartcontfact.cc:49
 hstartcontfact.cc:50
 hstartcontfact.cc:51
 hstartcontfact.cc:52
 hstartcontfact.cc:53
 hstartcontfact.cc:54
 hstartcontfact.cc:55
 hstartcontfact.cc:56
 hstartcontfact.cc:57
 hstartcontfact.cc:58
 hstartcontfact.cc:59
 hstartcontfact.cc:60
 hstartcontfact.cc:61
 hstartcontfact.cc:62
 hstartcontfact.cc:63
 hstartcontfact.cc:64
 hstartcontfact.cc:65
 hstartcontfact.cc:66
 hstartcontfact.cc:67
 hstartcontfact.cc:68
 hstartcontfact.cc:69
 hstartcontfact.cc:70
 hstartcontfact.cc:71
 hstartcontfact.cc:72
 hstartcontfact.cc:73
 hstartcontfact.cc:74
 hstartcontfact.cc:75
 hstartcontfact.cc:76
 hstartcontfact.cc:77
 hstartcontfact.cc:78
 hstartcontfact.cc:79
 hstartcontfact.cc:80
 hstartcontfact.cc:81
 hstartcontfact.cc:82
 hstartcontfact.cc:83
 hstartcontfact.cc:84
 hstartcontfact.cc:85
 hstartcontfact.cc:86
 hstartcontfact.cc:87
 hstartcontfact.cc:88
 hstartcontfact.cc:89
 hstartcontfact.cc:90
 hstartcontfact.cc:91
 hstartcontfact.cc:92
 hstartcontfact.cc:93
 hstartcontfact.cc:94
 hstartcontfact.cc:95
 hstartcontfact.cc:96
 hstartcontfact.cc:97
 hstartcontfact.cc:98