FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairMQExParamsContFact.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 
10 
11 #include "FairMQExParamsParOne.h"
12 #include "FairRuntimeDb.h"
13 
14 #include <cstring> // strcmp
15 
16 static FairMQExParamsContFact gFairMQExParamsContFact;
17 
19 {
20  fName = "FairMQExParamsContFact";
21  fTitle = "Factory for parameter containers in FairMQ Example 7";
22  setAllContainers();
24 }
25 
26 void FairMQExParamsContFact::setAllContainers()
27 {
28  FairContainer* container =
29  new FairContainer("FairMQExParamsParOne", "FairMQExParamsParOne Parameters", "TestDefaultContext");
30  container->addContext("TestNonDefaultContext");
31 
32  containers->Add(container);
33 }
34 
36 {
37  const char* name = container->GetName();
38  FairParSet* p = nullptr;
39 
40  if (strcmp(name, "FairMQExParamsParOne") == 0) {
41  p = new FairMQExParamsParOne(container->getConcatName().Data(), container->GetTitle(), container->getContext());
42  }
43 
44  return p;
45 }
46 
static FairRuntimeDb * instance(void)
ClassImp(FairEventBuilder)
FairParSet * createContainer(FairContainer *)
TList * containers
Definition: FairContFact.h:62
const char * getContext()
TString getConcatName()
void addContFactory(FairContFact *)
void addContext(const char *)