13 #include "FairGeoBasicShape.h"
14 #include "FairGeoMedia.h"
15 #include "FairGeoMedium.h"
16 #include "FairGeoNode.h"
17 #include "FairGeoShapes.h"
26 : FairGeoSet(), name(
"cave") {
35 if (!media)
return kFALSE;
36 const Int_t maxbuf = 256;
38 FairGeoNode* volu = 0;
39 FairGeoMedium* medium;
42 fin.getline(buf, maxbuf);
43 if (buf[0] !=
'\0' && buf[0] !=
'/' && !fin.eof()) {
44 if (strcmp(buf,
name) == 0) {
45 volu =
new FairGeoNode;
47 volu->setVolumeType(kFairGeoTopNode);
49 fin.getline(buf, maxbuf);
51 FairGeoBasicShape* sh = pShapes->selectShape(
shape);
56 fin.getline(buf, maxbuf);
57 medium = media->getMedium(buf);
59 medium =
new FairGeoMedium();
60 media->addMedium(medium);
62 volu->setMedium(medium);
64 if (sh) n = sh->readPoints(&fin, volu);
65 if (n <= 0) rc = kFALSE;
69 }
while (rc && !volu && !fin.eof());
72 masterNodes->Add(
new FairGeoNode(*volu));
83 FairGeoNode* volu = getVolume(
name);
84 if (volu) masterNodes->Add(
new FairGeoNode(*volu));
89 fout.setf(ios::fixed, ios::floatfield);
90 FairGeoNode* volu = getVolume(
name);
92 FairGeoBasicShape* sh = volu->getShapePointer();
93 FairGeoMedium* med = volu->getMedium();
95 fout << volu->GetName() <<
'\n'
96 << sh->GetName() <<
'\n'
97 << med->GetName() <<
'\n';
98 sh->writePoints(&fout, volu);
105 FairGeoNode* volu = getVolume(
name);
107 FairGeoBasicShape* sh = volu->getShapePointer();
108 FairGeoMedium* med = volu->getMedium();
110 cout << volu->GetName() <<
'\n'
111 << sh->GetName() <<
'\n'
112 << med->GetName() <<
'\n';
113 sh->printPoints(volu);