TpcGeoPar.cxx 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. using namespace std;
  2. #include "TObjArray.h"
  3. #include "TpcGeoPar.h"
  4. #include "FairParamList.h"
  5. #include <iostream>
  6. #include <iomanip>
  7. ClassImp(TpcGeoPar)
  8. TpcGeoPar::TpcGeoPar(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. TpcGeoPar::~TpcGeoPar(void)
  15. {
  16. if(fGeoSensNodes) delete fGeoSensNodes;
  17. if(fGeoPassNodes) delete fGeoPassNodes;
  18. }
  19. void TpcGeoPar::clear(void)
  20. {
  21. if(fGeoSensNodes)
  22. delete fGeoSensNodes;
  23. if(fGeoPassNodes)
  24. delete fGeoPassNodes;
  25. fGeoSensNodes = fGeoPassNodes = 0x0; //AZ
  26. }
  27. void TpcGeoPar::putParams(FairParamList* l)
  28. {
  29. if (!l)
  30. return;
  31. //l->addBinary("FairGeoNodes Sensitive List", fGeoSensNodes);
  32. //l->addBinary("FairGeoNodes Passive List", fGeoPassNodes);
  33. l->addObject("FairGeoNodes Sensitive List", fGeoSensNodes);
  34. l->addObject("FairGeoNodes Passive List", fGeoPassNodes);
  35. }
  36. Bool_t TpcGeoPar::getParams(FairParamList* l)
  37. {
  38. if (!l)
  39. return kFALSE;
  40. //if (!l->fillBinary("FairGeoNodes Sensitive List", fGeoSensNodes))
  41. if (!l->fillObject("FairGeoNodes Sensitive List", fGeoSensNodes))
  42. return kFALSE;
  43. //if (!l->fillBinary("FairGeoNodes Passive List", fGeoPassNodes))
  44. if (!l->fillObject("FairGeoNodes Passive List", fGeoPassNodes))
  45. return kFALSE;
  46. return kTRUE;
  47. }