MpdTofGeoPar.cxx 2.2 KB

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