ROOT logo
//*-- AUTHOR : Ilse Koenig
//*-- Modified last : 09/05/2002 by Ilse Koenig

//_HADES_CLASS_DESCRIPTION
/////////////////////////////////////////////////////////////
//
//  HMdcContFact
//
//  Factory for the parameter containers in libMdc
//
/////////////////////////////////////////////////////////////
using namespace std;
#include "hmdccontfact.h"
#include "hruntimedb.h"
#include "hmdccal2par.h"
#include "hmdccal2parsim.h"
#include "hmdccalparraw.h"
#include "hmdctdcthreshold.h"
#include "hmdctdcchannel.h"
#include "hmdccelleff.h"
#include "hmdcwirestat.h"
#include "hmdcdigitpar.h"
#include "hmdcgeomstruct.h"
#include "hmdcgeompar.h"
#include "hmdclookupgeom.h"
#include "hmdclookupraw.h"
#include "hmdcrawstruct.h"
#include "hmdctimecut.h"
#include "hmdcsetup.h"
#include "hmdclayergeompar.h"
#include "hmdcbitflipcorpar.h"
#include "hmdcunpackerpar.h"
#include "hmdcoepaddrcorrpar.h"

#include <iostream>
#include <iomanip>

ClassImp(HMdcContFact)

static HMdcContFact gHMdcContFact;

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

void HMdcContFact::setAllContainers() {
  // Creates the Container objects with all accepted contexts and adds them to
  // the list of containers for the MDC library.
    HContainer* cal2par= new HContainer("MdcCal2Par",
                   "cal2 calibration parameters for Mdc [time->distance]","MdcCal2ParSimProduction");
    //cal2par->addContext("");
    containers->Add(cal2par);

    HContainer* cal2parsim=new HContainer("MdcCal2ParSim",
                   "cal2 calibration parameters for Mdc [distance->time]","MdcCal2ParSimProduction");
    containers->Add(cal2parsim);

    HContainer* calparraw=new HContainer("MdcCalParRaw",
                   "raw calibration parameters for Mdc",
                   "MdcCalParRawProduction");
    containers->Add(calparraw);

    HContainer* tdcthreshold=new HContainer("MdcTdcThreshold",
                   "threshold parameters for Mdc",
                   "MdcTdcThresholdProduction");
    containers->Add(tdcthreshold);

    HContainer* tdcchannelmask=new HContainer("MdcTdcChannel",
                   "TDC channel masks for Mdc",
                   "MdcTdcChannelProduction");
    containers->Add(tdcchannelmask);

    HContainer* celleff= new HContainer("MdcCellEff",
                   "cell efficiency parameters for MdcDigitizer",
                   "MdcCellEffProduction");
    containers->Add(celleff);

    HContainer* wirestat= new HContainer("MdcWireStat",
                   "wire status parameters for MdcDigitizer",
                   "MdcWireStatProduction");
    containers->Add(wirestat);

    HContainer* digitpar=new HContainer("MdcDigitPar",
                   "digitisation parameters for Mdc","MdcDigitParProduction");
    containers->Add(digitpar);

    HContainer* geompar=new HContainer("MdcGeomPar",
                   "Mdc geometry parameters","GeomProduction");
    containers->Add(geompar);

    HContainer* geomstruct=new HContainer("MdcGeomStruct",
                   "Mdc parameters for geometry structure","");
    containers->Add(geomstruct);

    HContainer* layergeompar=new HContainer("MdcLayerGeomPar",
                   "geometry parameters for Mdc layers","MdcLayerGeomParProduction");
    containers->Add(layergeompar);

    HContainer* lookupgeom=new HContainer("MdcLookupGeom",
                   "Mdc lookup table from raw to cal1","");
    containers->Add(lookupgeom);

    HContainer* lookupraw=new HContainer("MdcLookupRaw",
                   "Mdc lookup table from cal1 to raw","");
    containers->Add(lookupraw);

    HContainer* rawstruct= new HContainer("MdcRawStruct",
                   "Mdc parameters for hardware structure","");
    containers->Add(rawstruct);

   HContainer* timecut= new HContainer("MdcTimeCut",
                   "cut on time1, time2 & time2-time1","MdcTimeCutProduction");
    timecut->addContext("MdcTimeCutProductionSim");
    containers->Add(timecut);

    HContainer* setup=new HContainer("MdcSetup",
                   "Setup parameters for HMdcTaskSet","MdcSetupProduction");
    containers->Add(setup);

    HContainer* bitflipcorpar=new HContainer("MdcBitFlipCorPar",
                   "Setup parameters for HMdcBitFlipCorPar","MdcBitFlipCorParProduction");
    containers->Add(bitflipcorpar);

    HContainer* unpackerpar = new HContainer("MdcUnpackerPar","Mdc unpacker lookuptable for data recovery","MdcUnpackerParProduction");
    containers->Add(unpackerpar);

    HContainer* oepAddrCorrPar = new HContainer("MdcOepAddrCorrPar","MDC OEP address correction lookup table","MdcOepAddrCorrParProduction");
    containers->Add(oepAddrCorrPar);
}

HParSet* HMdcContFact::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,"MdcCal2Par")==0)
    return new HMdcCal2Par(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcCal2ParSim")==0)
    return new HMdcCal2ParSim(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcCalParRaw")==0)
    return new HMdcCalParRaw(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcTdcThreshold")==0)
    return new HMdcTdcThreshold(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcTdcChannel")==0)
    return new HMdcTdcChannel(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcCellEff")==0)
    return new HMdcCellEff(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcWireStat")==0)
    return new HMdcWireStat(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcDigitPar")==0)
    return new HMdcDigitPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcGeomPar")==0)
    return new HMdcGeomPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcGeomStruct")==0)
    return new HMdcGeomStruct(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcLayerGeomPar")==0)
    return new HMdcLayerGeomPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcLookupGeom")==0)
    return new HMdcLookupGeom(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcLookupRaw")==0)
    return new HMdcLookupRaw(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcRawStruct")==0)
    return new HMdcRawStruct(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcTimeCut")==0)
    return new HMdcTimeCut(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcSetup")==0)
    return new HMdcSetup(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"MdcBitFlipCorPar")==0)
    return new HMdcBitFlipCorPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if(strcmp(name,"MdcUnpackerPar")==0)
    return new HMdcUnpackerPar("MdcUnpackerPar","Mdc unpacker lookuptable for data recovery","MdcUnpackerParProduction");
  if(strcmp(name,"MdcOepAddrCorrPar")==0)
    return new HMdcOepAddrCorrPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  return 0;
}

 hmdccontfact.cc:1
 hmdccontfact.cc:2
 hmdccontfact.cc:3
 hmdccontfact.cc:4
 hmdccontfact.cc:5
 hmdccontfact.cc:6
 hmdccontfact.cc:7
 hmdccontfact.cc:8
 hmdccontfact.cc:9
 hmdccontfact.cc:10
 hmdccontfact.cc:11
 hmdccontfact.cc:12
 hmdccontfact.cc:13
 hmdccontfact.cc:14
 hmdccontfact.cc:15
 hmdccontfact.cc:16
 hmdccontfact.cc:17
 hmdccontfact.cc:18
 hmdccontfact.cc:19
 hmdccontfact.cc:20
 hmdccontfact.cc:21
 hmdccontfact.cc:22
 hmdccontfact.cc:23
 hmdccontfact.cc:24
 hmdccontfact.cc:25
 hmdccontfact.cc:26
 hmdccontfact.cc:27
 hmdccontfact.cc:28
 hmdccontfact.cc:29
 hmdccontfact.cc:30
 hmdccontfact.cc:31
 hmdccontfact.cc:32
 hmdccontfact.cc:33
 hmdccontfact.cc:34
 hmdccontfact.cc:35
 hmdccontfact.cc:36
 hmdccontfact.cc:37
 hmdccontfact.cc:38
 hmdccontfact.cc:39
 hmdccontfact.cc:40
 hmdccontfact.cc:41
 hmdccontfact.cc:42
 hmdccontfact.cc:43
 hmdccontfact.cc:44
 hmdccontfact.cc:45
 hmdccontfact.cc:46
 hmdccontfact.cc:47
 hmdccontfact.cc:48
 hmdccontfact.cc:49
 hmdccontfact.cc:50
 hmdccontfact.cc:51
 hmdccontfact.cc:52
 hmdccontfact.cc:53
 hmdccontfact.cc:54
 hmdccontfact.cc:55
 hmdccontfact.cc:56
 hmdccontfact.cc:57
 hmdccontfact.cc:58
 hmdccontfact.cc:59
 hmdccontfact.cc:60
 hmdccontfact.cc:61
 hmdccontfact.cc:62
 hmdccontfact.cc:63
 hmdccontfact.cc:64
 hmdccontfact.cc:65
 hmdccontfact.cc:66
 hmdccontfact.cc:67
 hmdccontfact.cc:68
 hmdccontfact.cc:69
 hmdccontfact.cc:70
 hmdccontfact.cc:71
 hmdccontfact.cc:72
 hmdccontfact.cc:73
 hmdccontfact.cc:74
 hmdccontfact.cc:75
 hmdccontfact.cc:76
 hmdccontfact.cc:77
 hmdccontfact.cc:78
 hmdccontfact.cc:79
 hmdccontfact.cc:80
 hmdccontfact.cc:81
 hmdccontfact.cc:82
 hmdccontfact.cc:83
 hmdccontfact.cc:84
 hmdccontfact.cc:85
 hmdccontfact.cc:86
 hmdccontfact.cc:87
 hmdccontfact.cc:88
 hmdccontfact.cc:89
 hmdccontfact.cc:90
 hmdccontfact.cc:91
 hmdccontfact.cc:92
 hmdccontfact.cc:93
 hmdccontfact.cc:94
 hmdccontfact.cc:95
 hmdccontfact.cc:96
 hmdccontfact.cc:97
 hmdccontfact.cc:98
 hmdccontfact.cc:99
 hmdccontfact.cc:100
 hmdccontfact.cc:101
 hmdccontfact.cc:102
 hmdccontfact.cc:103
 hmdccontfact.cc:104
 hmdccontfact.cc:105
 hmdccontfact.cc:106
 hmdccontfact.cc:107
 hmdccontfact.cc:108
 hmdccontfact.cc:109
 hmdccontfact.cc:110
 hmdccontfact.cc:111
 hmdccontfact.cc:112
 hmdccontfact.cc:113
 hmdccontfact.cc:114
 hmdccontfact.cc:115
 hmdccontfact.cc:116
 hmdccontfact.cc:117
 hmdccontfact.cc:118
 hmdccontfact.cc:119
 hmdccontfact.cc:120
 hmdccontfact.cc:121
 hmdccontfact.cc:122
 hmdccontfact.cc:123
 hmdccontfact.cc:124
 hmdccontfact.cc:125
 hmdccontfact.cc:126
 hmdccontfact.cc:127
 hmdccontfact.cc:128
 hmdccontfact.cc:129
 hmdccontfact.cc:130
 hmdccontfact.cc:131
 hmdccontfact.cc:132
 hmdccontfact.cc:133
 hmdccontfact.cc:134
 hmdccontfact.cc:135
 hmdccontfact.cc:136
 hmdccontfact.cc:137
 hmdccontfact.cc:138
 hmdccontfact.cc:139
 hmdccontfact.cc:140
 hmdccontfact.cc:141
 hmdccontfact.cc:142
 hmdccontfact.cc:143
 hmdccontfact.cc:144
 hmdccontfact.cc:145
 hmdccontfact.cc:146
 hmdccontfact.cc:147
 hmdccontfact.cc:148
 hmdccontfact.cc:149
 hmdccontfact.cc:150
 hmdccontfact.cc:151
 hmdccontfact.cc:152
 hmdccontfact.cc:153
 hmdccontfact.cc:154
 hmdccontfact.cc:155
 hmdccontfact.cc:156
 hmdccontfact.cc:157
 hmdccontfact.cc:158
 hmdccontfact.cc:159
 hmdccontfact.cc:160
 hmdccontfact.cc:161
 hmdccontfact.cc:162
 hmdccontfact.cc:163
 hmdccontfact.cc:164
 hmdccontfact.cc:165
 hmdccontfact.cc:166
 hmdccontfact.cc:167
 hmdccontfact.cc:168
 hmdccontfact.cc:169
 hmdccontfact.cc:170
 hmdccontfact.cc:171
 hmdccontfact.cc:172
 hmdccontfact.cc:173
 hmdccontfact.cc:174
 hmdccontfact.cc:175
 hmdccontfact.cc:176
 hmdccontfact.cc:177
 hmdccontfact.cc:178
 hmdccontfact.cc:179
 hmdccontfact.cc:180