#include <ShipGeoCave.h>
Definition at line 17 of file ShipGeoCave.h.
◆ ShipGeoCave()
| ShipGeoCave::ShipGeoCave |
( |
| ) |
|
Definition at line 27 of file ShipGeoCave.cxx.
27 : FairGeoSet(),
name(
"cave") {
28
29 fName = "cave";
31 maxModules = 1;
32}
◆ ~ShipGeoCave()
| ShipGeoCave::~ShipGeoCave |
( |
| ) |
|
|
overridedefault |
◆ addRefNodes()
| void ShipGeoCave::addRefNodes |
( |
| ) |
|
|
override |
Definition at line 90 of file ShipGeoCave.cxx.
90 {
91
92 FairGeoNode* volu = getVolume(
name);
93 if (volu) {
94 masterNodes->Add(new FairGeoNode(*volu));
95 }
96}
◆ getModuleName()
| const char * ShipGeoCave::getModuleName |
( |
Int_t | | ) |
|
|
inlineoverride |
◆ print()
| void ShipGeoCave::print |
( |
| ) |
|
|
override |
Definition at line 114 of file ShipGeoCave.cxx.
114 {
115
116 FairGeoNode* volu = getVolume(
name);
117 if (volu) {
118 FairGeoBasicShape* sh = volu->getShapePointer();
119 FairGeoMedium* med = volu->getMedium();
120 if (sh && med) {
121 cout << volu->GetName() << '\n'
122 << sh->GetName() << '\n'
123 << med->GetName() << '\n';
124 sh->printPoints(volu);
125 }
126 }
127}
◆ read()
| Bool_t ShipGeoCave::read |
( |
std::fstream & | fin, |
|
|
FairGeoMedia * | media ) |
|
override |
Definition at line 34 of file ShipGeoCave.cxx.
34 {
35
36 if (!media) {
37 return kFALSE;
38 }
39 const Int_t maxbuf = 256;
40 char buf[maxbuf];
41 FairGeoNode* volu = nullptr;
42 FairGeoMedium* medium;
44 do {
45 fin.getline(buf, maxbuf);
46 if (buf[0] !=
'\0' && buf[0] !=
'/' && !
fin.eof()) {
47 if (strcmp(buf,
name) == 0) {
48 volu = new FairGeoNode;
49 volu->SetName(buf);
50 volu->setVolumeType(kFairGeoTopNode);
51 volu->setActive();
52 fin.getline(buf, maxbuf);
53 TString shape(buf);
54 FairGeoBasicShape* sh = pShapes->selectShape(shape);
55 if (sh) {
56 volu->setShape(sh);
57 } else {
59 }
60 fin.getline(buf, maxbuf);
61 medium = media->getMedium(buf);
62 if (!medium) {
63 medium = new FairGeoMedium();
64 media->addMedium(medium);
65 }
66 volu->setMedium(medium);
68 if (sh) {
69 n = sh->readPoints(&fin, volu);
70 }
71 if (n <= 0) {
73 }
74 } else {
76 }
77 }
78 }
while (rc && !volu && !
fin.eof());
79 if (volu && rc) {
80 volumes->Add(volu);
81 masterNodes->Add(new FairGeoNode(*volu));
82 } else {
83 delete volu;
84 volu = nullptr;
86 }
88}
◆ write()
| void ShipGeoCave::write |
( |
std::fstream & | fout | ) |
|
|
override |
Definition at line 98 of file ShipGeoCave.cxx.
98 {
99
100 fout.setf(ios::fixed, ios::floatfield);
101 FairGeoNode* volu = getVolume(
name);
102 if (volu) {
103 FairGeoBasicShape* sh = volu->getShapePointer();
104 FairGeoMedium* med = volu->getMedium();
105 if (sh && med) {
106 fout << volu->GetName() <<
'\n'
107 << sh->GetName() << '\n'
108 << med->GetName() << '\n';
109 sh->writePoints(&fout, volu);
110 }
111 }
112}
◆ name
| TString ShipGeoCave::name |
|
protected |
The documentation for this class was generated from the following files: