BmnRoot
Loading...
Searching...
No Matches
CbmMvdGeoPar.cxx
Go to the documentation of this file.
1// -------------------------------------------------------------------------
2// ----- CbmMvdGeoPar source file -----
3// ----- Created 07/11/06 by V. Friese -----
4// ----- Copied from CbmGeostsPar.cxx (D. Bertini) -----
5// -------------------------------------------------------------------------
6
7#include "CbmMvdGeoPar.h"
8
9#include "FairParamList.h"
10#include "FairGeoNode.h"
11
12#include "TObjArray.h"
13
14#include <iostream>
15#include <iomanip>
16using std::cout;
17using std::endl;
18
19// ----- Constructor ---------------------------------------------------
20CbmMvdGeoPar::CbmMvdGeoPar(const char* name, const char* title,
21 const char* context)
22 : FairParGenericSet(name, title, context),
23 fGeoSensNodes(new TObjArray()),
24 fGeoPassNodes(new TObjArray())
25{
26}
27// -------------------------------------------------------------------------
28
29
30
31// ----- Destructor ----------------------------------------------------
33{
34 /* commented due to problems during destruction
35 // somehow it is not possible to delete the last volume
36 // even if one get a correct pointer
37 if ( fGeoSensNodes ) {
38 fGeoSensNodes->Delete();
39 delete fGeoSensNodes;
40 }
41
42 if ( fGeoPassNodes ) {
43 fGeoPassNodes->Delete();
44 delete fGeoPassNodes;
45 }
46
47 */
48}
49// -------------------------------------------------------------------------
50
51
52
53// ----- Virtual public method clear -----------------------------------
55 if(fGeoSensNodes) delete fGeoSensNodes;
56 if(fGeoPassNodes) delete fGeoPassNodes;
57}
58// -------------------------------------------------------------------------
59
60
61
62// ----- Virtual public method putParams -------------------------------
63void CbmMvdGeoPar::putParams(FairParamList* parList) {
64 if ( ! parList ) return;
65 parList->addObject("FairGeoNodes Sensitive List", fGeoSensNodes);
66 parList->addObject("FairGeoNodes Passive List", fGeoPassNodes);
67}
68// -------------------------------------------------------------------------
69
70
71
72// ----- Virtual public method getParams -------------------------------
73Bool_t CbmMvdGeoPar::getParams(FairParamList* parList) {
74 if ( ! parList ) return kFALSE;
75 if ( ! parList->fillObject("FairGeoNodes Sensitive List", fGeoSensNodes))
76 return kFALSE;
77 if ( ! parList->fillObject("FairGeoNodes Passive List", fGeoPassNodes))
78 return kFALSE;
79 return kTRUE;
80}
81// -------------------------------------------------------------------------
CbmMvdGeoPar(const char *name="CbmMvdGeoPar", const char *title="MVD Geometry Parameters", const char *context="Default")
virtual void clear()
virtual ~CbmMvdGeoPar()
virtual void putParams(FairParamList *parList)
virtual Bool_t getParams(FairParamList *parList)