CbmRoot
CbmFieldContFact.cxx
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // ----- CbmFieldContFact source file -----
3 // ----- Created 20/02/06 by V. Friese -----
4 // -------------------------------------------------------------------------
5 #include "CbmFieldContFact.h"
6 
7 #include "CbmFieldPar.h" // for CbmFieldPar
8 
9 #include <FairContFact.h> // for FairContainer
10 #include <FairLogger.h> // for LOG, Logger
11 #include <FairRuntimeDb.h> // for FairRuntimeDb
12 
13 #include <TList.h> // for TList
14 #include <TString.h> // for TString
15 
16 #include <string.h> // for strcmp
17 
19 
20 
21 // ----- Constructor ---------------------------------------------------
23  fName = "CbmFieldContFact";
24  fTitle = "Factory for field parameter containers";
26  FairRuntimeDb::instance()->addContFactory(this);
27 }
28 // -------------------------------------------------------------------------
29 
30 
31 // ----- Destructor ----------------------------------------------------
33 // -------------------------------------------------------------------------
34 
35 
36 // ----- Create containers ---------------------------------------------
37 FairParSet* CbmFieldContFact::createContainer(FairContainer* container) {
38 
39 
40  const char* name = container->GetName();
41  LOG(info) << "create CbmFieldPar container " << name;
42  FairParSet* set = nullptr;
43  if (strcmp(name, "CbmFieldPar") == 0)
44  set = new CbmFieldPar(container->getConcatName().Data(),
45  container->GetTitle(),
46  container->getContext());
47  return set;
48 }
49 // -------------------------------------------------------------------------
50 
51 
52 // ----- Set all containers (private) ----------------------------------
54  FairContainer* container = new FairContainer(
55  "CbmFieldPar", "Field parameter container", "Default field");
56  containers->Add(container);
57 }
58 // -------------------------------------------------------------------------
59 
60 
gCbmFieldContFact
static CbmFieldContFact gCbmFieldContFact
Definition: CbmFieldContFact.cxx:18
CbmFieldContFact::createContainer
FairParSet * createContainer(FairContainer *container)
Definition: CbmFieldContFact.cxx:37
CbmFieldContFact::SetAllContainers
void SetAllContainers()
Definition: CbmFieldContFact.cxx:53
CbmFieldPar.h
CbmFieldContFact::CbmFieldContFact
CbmFieldContFact()
Definition: CbmFieldContFact.cxx:22
CbmFieldContFact.h
ClassImp
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Definition: CbmConverterManager.cxx:12
CbmFieldContFact::~CbmFieldContFact
~CbmFieldContFact()
Definition: CbmFieldContFact.cxx:32
CbmFieldPar
Definition: CbmFieldPar.h:31
CbmFieldContFact
Definition: CbmFieldContFact.h:26