FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NewDetectorContFact.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  ********************************************************************************/
8 #include "NewDetectorContFact.h"
9 
10 #include "FairRuntimeDb.h"
11 #include "NewDetectorGeoPar.h"
12 
13 #include <iostream>
14 
16 
17 static NewDetectorContFact gNewDetectorContFact;
18 
20  : FairContFact()
21 {
23  fName = "NewDetectorContFact";
24  fTitle = "Factory for parameter containers in libNewDetector";
25  setAllContainers();
27 }
28 
29 void NewDetectorContFact::setAllContainers()
30 {
36  FairContainer* p = new FairContainer("NewDetectorGeoPar", "NewDetector Geometry Parameters", "TestDefaultContext");
37  p->addContext("TestNonDefaultContext");
38 
39  containers->Add(p);
40 }
41 
43 {
49  const char* name = c->GetName();
50  FairParSet* p = NULL;
51  if (strcmp(name, "NewDetectorGeoPar") == 0) {
52  p = new NewDetectorGeoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
53  }
54  return p;
55 }
static FairRuntimeDb * instance(void)
ClassImp(FairEventBuilder)
TList * containers
Definition: FairContFact.h:62
const char * getContext()
TString getConcatName()
FairParSet * createContainer(FairContainer *)
void addContFactory(FairContFact *)
void addContext(const char *)