CbmRoot
Loading...
Searching...
No Matches
CbmPassiveContFact.cxx
Go to the documentation of this file.
1/* Copyright (C) 2006-2012 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Denis Bertini [committer], Florian Uhlig */
4
5//*-- AUTHOR : Denis Bertini
6//*-- Created : 21/06/2005
7
9//
10// CbmPassiveContFact
11//
12// Factory for the parameter containers in libPassive
13//
15
16#include "CbmPassiveContFact.h"
17
18#include "CbmGeoPassivePar.h"
19
20#include "FairRuntimeDb.h"
21
22//#include <iostream>
23//#include <iomanip>
24
26
27 static CbmPassiveContFact gCbmPassiveContFact;
28
30{
31 // Constructor (called when the library is loaded)
32 fName = "CbmPassiveContFact";
33 fTitle = "Factory for parameter containers in libPassive";
35 FairRuntimeDb::instance()->addContFactory(this);
36}
37
39{
43 FairContainer* p = new FairContainer("CbmGeoPassivePar", "Passive Geometry Parameters", "TestDefaultContext");
44 p->addContext("TestNonDefaultContext");
45
46 containers->Add(p);
47}
48
49FairParSet* CbmPassiveContFact::createContainer(FairContainer* c)
50{
54 const char* name = c->GetName();
55 FairParSet* p = NULL;
56 if (strcmp(name, "CbmGeoPassivePar") == 0) {
57 p = new CbmGeoPassivePar(c->getConcatName().Data(), c->GetTitle(), c->getContext());
58 }
59 return p;
60}
ClassImp(CbmPassiveContFact) static CbmPassiveContFact gCbmPassiveContFact
FairParSet * createContainer(FairContainer *)