EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EicContFact.cxx
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file EicContFact.cxx
1 //
2 // AYK (ayk@bnl.gov), 2013/06/12
3 //
4 // FairRoot-style EIC container factory definitions; eventually will need
5 // to figure out how to make real use of all this stuff;
6 //
7 
8 #include <iostream>
9 #include <iomanip>
10 
11 #include "FairRuntimeDb.h"
12 #include "FairParRootFileIo.h"
13 #include "FairParAsciiFileIo.h"
14 
15 #include "EicContFact.h"
16 #include "EicDetector.h"
17 
18 // ---------------------------------------------------------------------------------------
19 
20 EicContFact::EicContFact(EicDetector *det, const char *_fName, const char *_fTitle,
21  const char* name, const char* title, const char* context) {
22  fName = strdup(_fName);
23  fTitle = strdup(_fTitle);
24 
25  FairContainer* p= new FairContainer(name, title, context);
26  containers->Add(p);
27 
28  fGeoParName = strdup(name);
29  backDoorDetPtr = det;
30 
32 } // EicContFact::EicContFact()
33 
34 // ---------------------------------------------------------------------------------------
35 
37  const char* name=c->GetName();
38  FairParSet* p = NULL;
39 
40  if (strcmp(name, fGeoParName) == 0) p = backDoorDetPtr->EicGeoParAllocator(c);
41 
42  return p;
43 } // EicContFact::createContainer()
44 
45 // ---------------------------------------------------------------------------------------
46