er  dev
ERGadastGeoPar.cxx
1 #include "ERGadastGeoPar.h"
2 
3 #include "FairParamList.h"
4 
5 #include "TObjArray.h"
6 
7 #include <iostream>
8 //-------------------------------------------------------------------------
9 ERGadastGeoPar::ERGadastGeoPar(const char* name,
10  const char* title,
11  const char* context)
12  : FairParGenericSet(name,title,context),
13  fGeoSensNodes(new TObjArray()),
14  fGeoPassNodes(new TObjArray())
15 {
16 }
17 //-------------------------------------------------------------------------
18 ERGadastGeoPar::~ERGadastGeoPar(void)
19 {
20 }
21 //-------------------------------------------------------------------------
22 void ERGadastGeoPar::clear(void)
23 {
24  if(fGeoSensNodes) { delete fGeoSensNodes; }
25  if(fGeoPassNodes) { delete fGeoPassNodes; }
26 }
27 //-------------------------------------------------------------------------
28 void ERGadastGeoPar::putParams(FairParamList* l)
29 {
30  if (!l) { return; }
31  l->addObject("FairGeoNodes Sensitive List", fGeoSensNodes);
32  l->addObject("FairGeoNodes Passive List", fGeoPassNodes);
33 }
34 //-------------------------------------------------------------------------
35 Bool_t ERGadastGeoPar::getParams(FairParamList* l)
36 {
37  if (!l) { return kFALSE; }
38  if (!l->fillObject("FairGeoNodes Sensitive List", fGeoSensNodes)) { return kFALSE; }
39  if (!l->fillObject("FairGeoNodes Passive List", fGeoPassNodes)) { return kFALSE; }
40  return kTRUE;
41 }
42 //-------------------------------------------------------------------------
43 ClassImp(ERGadastGeoPar)