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