BmdGeoPar.cxx 1.1 KB

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