#include <ShipGeoCave.h>
Definition at line 14 of file ShipGeoCave.h.
◆ ShipGeoCave()
ShipGeoCave::ShipGeoCave |
( |
| ) |
|
◆ ~ShipGeoCave()
ShipGeoCave::~ShipGeoCave |
( |
| ) |
|
|
inline |
◆ addRefNodes()
void ShipGeoCave::addRefNodes |
( |
| ) |
|
Definition at line 80 of file ShipGeoCave.cxx.
81{
82
83 FairGeoNode* volu=getVolume(
name);
84 if (volu) { masterNodes->Add(new FairGeoNode(*volu)); }
85}
◆ getModuleName()
const char * ShipGeoCave::getModuleName |
( |
Int_t |
| ) |
|
|
inline |
◆ print()
void ShipGeoCave::print |
( |
| ) |
|
Definition at line 102 of file ShipGeoCave.cxx.
103{
104
105 FairGeoNode* volu=getVolume(
name);
106 if (volu) {
107 FairGeoBasicShape* sh=volu->getShapePointer();
108 FairGeoMedium* med=volu->getMedium();
109 if (sh&&med) {
110 cout<<volu->GetName()<<'\n'<<sh->GetName()<<'\n'<<med->GetName()<<'\n';
111 sh->printPoints(volu);
112 }
113 }
114}
◆ read()
Bool_t ShipGeoCave::read |
( |
std::fstream & |
, |
|
|
FairGeoMedia * |
|
|
) |
| |
Definition at line 34 of file ShipGeoCave.cxx.
35{
36
37 if (!media) { return kFALSE; }
38 const Int_t maxbuf=256;
39 char buf[maxbuf];
40 FairGeoNode* volu=0;
41 FairGeoMedium* medium;
43 do {
44 fin.getline(buf,maxbuf);
45 if (buf[0]!=
'\0' && buf[0]!=
'/' && !
fin.eof()) {
46 if (strcmp(buf,
name)==0) {
47 volu=new FairGeoNode;
48 volu->SetName(buf);
49 volu->setVolumeType(kFairGeoTopNode);
50 volu->setActive();
51 fin.getline(buf,maxbuf);
53 FairGeoBasicShape* sh=pShapes->selectShape(shape);
54 if (sh) { volu->setShape(sh); }
56 fin.getline(buf,maxbuf);
57 medium=media->getMedium(buf);
58 if (!medium) {
59 medium=new FairGeoMedium();
60 media->addMedium(medium);
61 }
62 volu->setMedium(medium);
64 if (sh) {
n=sh->readPoints(&fin,volu); }
65 if (n<=0) {
rc=kFALSE; }
67 }
68 }
while (rc && !volu && !
fin.eof());
69 if (volu && rc) {
70 volumes->Add(volu);
71 masterNodes->Add(new FairGeoNode(*volu));
72 } else {
73 delete volu;
74 volu=0;
76 }
78}
◆ write()
void ShipGeoCave::write |
( |
std::fstream & |
| ) |
|
Definition at line 87 of file ShipGeoCave.cxx.
88{
89
90 fout.setf(ios::fixed,ios::floatfield);
91 FairGeoNode* volu=getVolume(
name);
92 if (volu) {
93 FairGeoBasicShape* sh=volu->getShapePointer();
94 FairGeoMedium* med=volu->getMedium();
95 if (sh&&med) {
96 fout<<volu->GetName()<<
'\n'<<sh->GetName()<<
'\n'<<med->GetName()<<
'\n';
97 sh->writePoints(&fout,volu);
98 }
99 }
100}
◆ name
TString ShipGeoCave::name |
|
protected |
The documentation for this class was generated from the following files: