ROOT logo
//*-- AUTHOR :  Pablo Cabanelas
//*-- Created : 11/10/2005
//*-- Modified: 11/09/2006
//*-- Modified: 18/08/2007

//_HADES_CLASS_DESCRIPTION
/////////////////////////////////////////////////////////////
//
//  HRpcContFact
//
//  Factory for the parameter containers in libRpc
//
/////////////////////////////////////////////////////////////

#include "hrpccontfact.h"
#include "hruntimedb.h"
#include "hrpcdigipar.h"
#include "hrpcwtoqpar.h"
#include "hrpccalpar.h"
#include "hrpccellstatuspar.h"
#include "hrpcgeomcellpar.h"
#include "hrpchitfpar.h"
#include "hrpcclusfpar.h"
#include "hrpcgeompar.h"
#include "hrpctrb2lookup.h"
#include "hrpctrb3lookup.h"
#include "hrpcslewingpar.h"
#include "hrpctimepospar.h"
#include "hrpcchargeoffsetpar.h"




ClassImp(HRpcContFact)

  static HRpcContFact gHRpcContFact;

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

void HRpcContFact::setAllContainers(void) {
  // Creates the Container objects with all accepted contexts and adds them to
  // the list of containers for the Rpc library.

  containers->Add(
		  new HContainer("RpcDigiPar",
				 "Digitization parameters for the Rpc Detector",
				 "RpcDigiProduction"));
  containers->Add(
		  new HContainer("RpcWtoQPar",
				 "Width to Charge conversion parameters for the Rpc Detector",
				 "RpcWtoQProduction"));
  containers->Add(
		  new HContainer("RpcCalPar",
				 "Calibration parameters for the Rpc Detector",
				 "RpcCalProduction"));
  containers->Add(
		  new HContainer("RpcCellStatusPar",
				 "Cell status parameters for the Rpc Detector",
				 "RpcCellStatusProduction"));
  containers->Add(
		  new HContainer("RpcHitFPar",
				 "Hit finder parameters for the Rpc Detector",
				 "RpcHitFProduction"));
  containers->Add(
		  new HContainer("RpcClusFPar",
				 "Cluster finder parameters for the Rpc Detector",
				 "RpcClusFProduction"));
  containers->Add(
		  new HContainer("RpcGeomCellPar",
				 "Geometry parameters of cells for the Rpc Detector",
				 "RpcGeomCellProduction"));
  containers->Add(
		  new HContainer("RpcGeomPar",
				 "Geometry parameters of the Rpc Detector",
				 "GeomProduction"));
  containers->Add(
      new HContainer("RpcTrb2Lookup",
                     "Lookup table for the TRB2 unpacker of the RPC detector",
		     "RpcTrb2LookupProduction"));
  containers->Add(
      new HContainer("RpcTrb3Lookup",
                     "Lookup table for the TRB3 unpacker of the RPC detector",
		     "RpcTrb3LookupProduction"));
  containers->Add(
		  new HContainer("RpcTimePosPar",
				 "Time-position correction parameters for the Rpc Detector",
				 "RpcTimePosParProduction"));
  containers->Add(
		  new HContainer("RpcSlewingPar",
				 "Slewing correciton parameters for the Rpc Detector",
				 "RpcSlewingParProduction"));
  containers->Add(
		  new HContainer("RpcChargeOffsetPar",
				 "Correction of RPC charge offsets",
				 "RpcChargeOffsetParProduction"));




}

HParSet* HRpcContFact::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,"RpcDigiPar")==0)
    return new HRpcDigiPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcWtoQPar")==0)
    return new HRpcWtoQPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcCalPar")==0)
    return new HRpcCalPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcCellStatusPar")==0)
    return new HRpcCellStatusPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcHitFPar")==0)
    return new HRpcHitFPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcClusFPar")==0)
    return new HRpcClusFPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcGeomCellPar")==0)
    return new HRpcGeomCellPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcGeomPar")==0)
    return new HRpcGeomPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcTrb2Lookup")==0)
    return new HRpcTrb2Lookup(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcTrb3Lookup")==0)
    return new HRpcTrb3Lookup(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcTimePosPar")==0)
      return new HRpcTimePosPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcSlewingPar")==0)
      return new HRpcSlewingPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());
  if (strcmp(name,"RpcChargeOffsetPar")==0)
      return new HRpcChargeOffsetPar(c->getConcatName().Data(),c->GetTitle(),c->getContext());


  return 0;
}

 hrpccontfact.cc:1
 hrpccontfact.cc:2
 hrpccontfact.cc:3
 hrpccontfact.cc:4
 hrpccontfact.cc:5
 hrpccontfact.cc:6
 hrpccontfact.cc:7
 hrpccontfact.cc:8
 hrpccontfact.cc:9
 hrpccontfact.cc:10
 hrpccontfact.cc:11
 hrpccontfact.cc:12
 hrpccontfact.cc:13
 hrpccontfact.cc:14
 hrpccontfact.cc:15
 hrpccontfact.cc:16
 hrpccontfact.cc:17
 hrpccontfact.cc:18
 hrpccontfact.cc:19
 hrpccontfact.cc:20
 hrpccontfact.cc:21
 hrpccontfact.cc:22
 hrpccontfact.cc:23
 hrpccontfact.cc:24
 hrpccontfact.cc:25
 hrpccontfact.cc:26
 hrpccontfact.cc:27
 hrpccontfact.cc:28
 hrpccontfact.cc:29
 hrpccontfact.cc:30
 hrpccontfact.cc:31
 hrpccontfact.cc:32
 hrpccontfact.cc:33
 hrpccontfact.cc:34
 hrpccontfact.cc:35
 hrpccontfact.cc:36
 hrpccontfact.cc:37
 hrpccontfact.cc:38
 hrpccontfact.cc:39
 hrpccontfact.cc:40
 hrpccontfact.cc:41
 hrpccontfact.cc:42
 hrpccontfact.cc:43
 hrpccontfact.cc:44
 hrpccontfact.cc:45
 hrpccontfact.cc:46
 hrpccontfact.cc:47
 hrpccontfact.cc:48
 hrpccontfact.cc:49
 hrpccontfact.cc:50
 hrpccontfact.cc:51
 hrpccontfact.cc:52
 hrpccontfact.cc:53
 hrpccontfact.cc:54
 hrpccontfact.cc:55
 hrpccontfact.cc:56
 hrpccontfact.cc:57
 hrpccontfact.cc:58
 hrpccontfact.cc:59
 hrpccontfact.cc:60
 hrpccontfact.cc:61
 hrpccontfact.cc:62
 hrpccontfact.cc:63
 hrpccontfact.cc:64
 hrpccontfact.cc:65
 hrpccontfact.cc:66
 hrpccontfact.cc:67
 hrpccontfact.cc:68
 hrpccontfact.cc:69
 hrpccontfact.cc:70
 hrpccontfact.cc:71
 hrpccontfact.cc:72
 hrpccontfact.cc:73
 hrpccontfact.cc:74
 hrpccontfact.cc:75
 hrpccontfact.cc:76
 hrpccontfact.cc:77
 hrpccontfact.cc:78
 hrpccontfact.cc:79
 hrpccontfact.cc:80
 hrpccontfact.cc:81
 hrpccontfact.cc:82
 hrpccontfact.cc:83
 hrpccontfact.cc:84
 hrpccontfact.cc:85
 hrpccontfact.cc:86
 hrpccontfact.cc:87
 hrpccontfact.cc:88
 hrpccontfact.cc:89
 hrpccontfact.cc:90
 hrpccontfact.cc:91
 hrpccontfact.cc:92
 hrpccontfact.cc:93
 hrpccontfact.cc:94
 hrpccontfact.cc:95
 hrpccontfact.cc:96
 hrpccontfact.cc:97
 hrpccontfact.cc:98
 hrpccontfact.cc:99
 hrpccontfact.cc:100
 hrpccontfact.cc:101
 hrpccontfact.cc:102
 hrpccontfact.cc:103
 hrpccontfact.cc:104
 hrpccontfact.cc:105
 hrpccontfact.cc:106
 hrpccontfact.cc:107
 hrpccontfact.cc:108
 hrpccontfact.cc:109
 hrpccontfact.cc:110
 hrpccontfact.cc:111
 hrpccontfact.cc:112
 hrpccontfact.cc:113
 hrpccontfact.cc:114
 hrpccontfact.cc:115
 hrpccontfact.cc:116
 hrpccontfact.cc:117
 hrpccontfact.cc:118
 hrpccontfact.cc:119
 hrpccontfact.cc:120
 hrpccontfact.cc:121
 hrpccontfact.cc:122
 hrpccontfact.cc:123
 hrpccontfact.cc:124
 hrpccontfact.cc:125
 hrpccontfact.cc:126
 hrpccontfact.cc:127
 hrpccontfact.cc:128
 hrpccontfact.cc:129
 hrpccontfact.cc:130
 hrpccontfact.cc:131
 hrpccontfact.cc:132
 hrpccontfact.cc:133
 hrpccontfact.cc:134
 hrpccontfact.cc:135
 hrpccontfact.cc:136
 hrpccontfact.cc:137
 hrpccontfact.cc:138
 hrpccontfact.cc:139
 hrpccontfact.cc:140
 hrpccontfact.cc:141
 hrpccontfact.cc:142
 hrpccontfact.cc:143