FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairRutherfordContFact.cxx
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
9 
10 #include "FairRuntimeDb.h" // for FairRuntimeDb
11 #include "FairRutherfordGeoPar.h" // for FairRutherfordGeoPar
12 
13 #include <TList.h> // for TList
14 #include <TString.h> // for TString
15 #include <cstring> // for strcmp
16 
17 class FairParSet;
18 
20 
21 static FairRutherfordContFact gFairRutherfordContFact;
22 
24  : FairContFact()
25 {
27  fName = "FairRutherfordContFact";
28  fTitle = "Factory for parameter containers in libFairRutherford";
29  setAllContainers();
31 }
32 
33 void FairRutherfordContFact::setAllContainers()
34 {
40  FairContainer* p =
41  new FairContainer("FairRutherfordGeoPar", "FairRutherford Geometry Parameters", "TestDefaultContext");
42  p->addContext("TestNonDefaultContext");
43 
44  containers->Add(p);
45 }
46 
48 {
54  const char* name = c->GetName();
55  FairParSet* p = nullptr;
56  if (strcmp(name, "FairRutherfordGeoPar") == 0) {
57  p = new FairRutherfordGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
58  }
59  return p;
60 }
TString fName
Definition: FairParSet.h:21
static FairRuntimeDb * instance(void)
FairParSet * createContainer(FairContainer *)
ClassImp(FairEventBuilder)
TList * containers
Definition: FairContFact.h:62
const char * getContext()
TString getConcatName()
void addContFactory(FairContFact *)
void addContext(const char *)
TString fTitle
Definition: FairParSet.h:22