FairGeoPassivePar.cxx 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /********************************************************************************
  2. * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
  3. * *
  4. * This software is distributed under the terms of the *
  5. * GNU Lesser General Public Licence version 3 (LGPL) version 3, *
  6. * copied verbatim in the file "LICENSE" *
  7. ********************************************************************************/
  8. //*-- AUTHOR : Denis Bertini
  9. //*-- Created : 21/06/2005
  10. #include "FairGeoPassivePar.h"
  11. #include "FairParamList.h" // for FairParamList
  12. #include "TObjArray.h" // for TObjArray
  13. using namespace std;
  14. ClassImp(FairGeoPassivePar)
  15. FairGeoPassivePar::FairGeoPassivePar(const char* name,const char* title,const char* context)
  16. : FairParGenericSet(name,title,context),
  17. fGeoSensNodes(new TObjArray()),
  18. fGeoPassNodes(new TObjArray())
  19. {
  20. }
  21. FairGeoPassivePar::~FairGeoPassivePar(void)
  22. {
  23. }
  24. void FairGeoPassivePar::clear(void)
  25. {
  26. if(fGeoSensNodes) { delete fGeoSensNodes; }
  27. if(fGeoPassNodes) { delete fGeoPassNodes; }
  28. }
  29. void FairGeoPassivePar::putParams(FairParamList* l)
  30. {
  31. if (!l) { return; }
  32. l->addObject("FairGeoNodes Sensitive List", fGeoSensNodes);
  33. l->addObject("FairGeoNodes Passive List", fGeoPassNodes);
  34. }
  35. Bool_t FairGeoPassivePar::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. }