CbmRoot
Loading...
Searching...
No Matches
CbmCosy2019ContFact.cxx
Go to the documentation of this file.
1/* Copyright (C) 2021 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Florian Uhlig [committer] */
4
6//
7// CbmCosy2019ContFact
8//
9// Factory for the parameter containers in libCosy2019
10//
12
13#include "CbmCosy2019ContFact.h"
14
15#include "CbmCosy2019HodoPar.h"
16
17#include "FairRuntimeDb.h"
18
20
21 static CbmCosy2019ContFact gCbmCosy2019ContFact;
22
24{
25 // Constructor (called when the library is loaded)
26 fName = "CbmCosy2019ContFact";
27 fTitle = "Factory for parameter containers for fles test library";
29 FairRuntimeDb::instance()->addContFactory(this);
30}
31
33{
37 FairContainer* pHodo =
38 new FairContainer("CbmCosy2019HodoPar", "HODO at MCBM 2018 Unpack Parameters", "TestDefaultContext");
39 pHodo->addContext("TestNonDefaultContext");
40 containers->Add(pHodo);
41}
42
43FairParSet* CbmCosy2019ContFact::createContainer(FairContainer* c)
44{
48 const char* name = c->GetName();
49 FairParSet* p = 0;
50
51 if (strcmp(name, "CbmCosy2019HodoPar") == 0) {
52 p = new CbmCosy2019HodoPar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
53 }
54
55 return p;
56}
ClassImp(CbmCosy2019ContFact) static CbmCosy2019ContFact gCbmCosy2019ContFact
FairParSet * createContainer(FairContainer *)