39 if (!media)
return kFALSE;
40 const Int_t maxbuf = 256;
42 FairGeoNode* volu = 0;
43 FairGeoMedium* medium;
46 fin.getline(buf, maxbuf);
47 if (buf[0] !=
'\0' && buf[0] !=
'/' && !fin.eof()) {
48 if (strcmp(buf,
name) == 0) {
49 volu =
new FairGeoNode;
51 volu->setVolumeType(kFairGeoTopNode);
53 fin.getline(buf, maxbuf);
55 FairGeoBasicShape* sh = pShapes->selectShape(
shape);
56 if (sh) volu->setShape(sh);
59 fin.getline(buf, maxbuf);
60 medium = media->getMedium(buf);
62 medium =
new FairGeoMedium();
63 media->addMedium(medium);
65 volu->setMedium(medium);
67 if (sh) n = sh->readPoints(&fin, volu);
68 if (n <= 0) rc = kFALSE;
73 }
while (rc && !volu && !fin.eof());
76 masterNodes->Add(
new FairGeoNode(*volu));
96 fout.setf(ios::fixed, ios::floatfield);
97 FairGeoNode* volu = getVolume(
name);
99 FairGeoBasicShape* sh = volu->getShapePointer();
100 FairGeoMedium* med = volu->getMedium();
102 fout << volu->GetName() <<
'\n' << sh->GetName() <<
'\n' << med->GetName() <<
'\n';
103 sh->writePoints(&fout, volu);