44 , volumes(new TList())
45 , masterNodes(nullptr)
119 Int_t
s1 = -1, s2 = 0;
125 for (Int_t s =
s1; s < s2 && rc; s++) {
132 Bool_t containsActiveModule = kFALSE;
133 for (Int_t s =
s1; s < s2; s++) {
135 containsActiveModule = kTRUE;
140 rc =
readModule(fin, media, modName, eleName, containsActiveModule);
151 }
while (
c ==
' ' ||
c ==
'\n');
152 if (
c !=
'0' &&
c !=
'1') {
165 fin >> t[0] >> t[1] >> t[2];
166 for (Int_t
i = 0;
i < 9;
i++) {
170 tf.setTransVector(t);
177 if (volu == 0 || media == 0 || refVolumes == 0) {
180 const Int_t maxbuf = 256;
182 TString
name(volu->GetName());
183 Int_t nameLength =
name.Length();
184 Bool_t isCopy = kFALSE;
209 Warning(
"readVolumeParams",
"Mother volume %s not found!",
buf);
215 if (nameLength > 4) {
219 }
while (
c ==
' ' ||
c ==
'\n');
220 Int_t
i =
static_cast<Int_t
>(
c);
226 refName =
name(0, 4);
227 refNode =
static_cast<FairGeoCopyNode*
>(refVolumes->FindObject(refName));
240 for (Int_t k = 0; k <
n; k++) {
248 Ssiz_t l =
name.Last(
'#');
253 }
while (
c ==
' ' ||
c ==
'\n');
254 Int_t
i =
static_cast<Int_t
>(
c);
259 refName =
name(0, l);
260 refNode =
static_cast<FairGeoCopyNode*
>(refVolumes->FindObject(refName));
273 for (Int_t k = 0; k <
n; k++) {
291 Error(
"readVolumeParams",
"Medium %s not found in list of media",
buf);
296 fin.getline(
buf, maxbuf);
312 fin.seekg(0, ios::beg);
316 const Int_t maxbuf = 256;
318 while (rc && !volu && !fin.eof()) {
321 fin.getline(
buf, maxbuf);
322 }
else if (!fin.eof()) {
331 fin.getline(
buf, maxbuf);
332 }
while (!fin.eof() &&
buf[0] !=
'/');
350 Bool_t containsActiveMod)
353 const Int_t maxbuf = 256;
356 fin.seekg(0, ios::beg);
361 while (rc && !fin.eof()) {
364 fin.getline(
buf, maxbuf);
365 }
else if (!fin.eof()) {
368 if (
name.BeginsWith(modName)) {
383 Error(
"readModule",
"Failed for module %s\n", volu->GetName());
387 }
else if (!eleName.IsNull() &&
name.BeginsWith(eleName)) {
396 Error(
"readModule",
"Failed for %s\n", volu->GetName());
402 fin.getline(
buf, maxbuf);
403 }
while (!fin.eof() &&
buf[0] !=
'/');
415 cout <<
"//Author: " <<
author <<
'\n';
421 cout <<
"//----------------------------------------------------------\n";
423 std::ios_base::fmtflags tmp = cout.setf(ios::fixed, ios::floatfield);
426 while ((volu =
static_cast<FairGeoNode*
>(iter.Next()))) {
436 fout <<
"//Author: " <<
author <<
'\n';
441 fout <<
"//----------------------------------------------------------\n";
442 std::ios_base::fmtflags tmp = fout.setf(ios::fixed, ios::floatfield);
446 while ((volu =
static_cast<FairGeoNode*
>(iter.Next())) && rc) {
447 rc = volu->
write(fout);
461 while ((volu =
static_cast<FairGeoNode*
>(iter.Next())) && rc) {
478 Error(
"create",
"Creation of %s failed!", volu->GetName());
488 if (fName.CompareTo(rset.GetName()) != 0) {
489 Error(
"compare",
"Sets have different type");
494 Int_t
n = 0, nnf = 0, nDiff = 0;
495 cout <<
"name\t mother medium shape points pos rot\n";
496 cout <<
"------------------------------------------------\n";
497 while ((volu =
static_cast<FairGeoNode*
>(iter.Next()))) {
502 }
else if (volu->
compare(*rNode) > 0) {
506 cout <<
"Number of volumes in first list: " <<
n <<
'\n';
507 cout <<
"Number of different volumes: " << nDiff << endl;
508 cout <<
"Number of volumes not found in second list: " << nnf <<
'\n';
510 if (rlist->GetSize() != (
n - nnf)) {
512 TListIter riter(rlist);
513 while ((volu =
static_cast<FairGeoNode*
>(riter.Next()))) {
522 cout <<
"Number of additional volumes in second list: " << nnf <<
'\n';
header::DataDescription description
virtual Int_t readPoints(std::fstream *, FairGeoVolume *)
virtual Bool_t createNode(FairGeoNode *, Int_t hadFormat=0)=0
Int_t compare(FairGeoNode &)
void setActive(Bool_t a=kTRUE)
void setMedium(FairGeoMedium *med)
Bool_t write(std::fstream &)
FairGeoBasicShape * getShapePointer()
void setVolumeType(EFairGeoNodeType t)
FairGeoTransform & getCenterPosition()
TGeoVolume * getRootVolume()
void setCopyNode(FairGeoNode *p)
FairGeoMedium * getMedium()
void setShape(FairGeoBasicShape *s)
void setMother(FairGeoNode *s)
void compare(FairGeoSet &)
virtual Bool_t create(FairGeoBuilder *)
virtual const char * getModuleName(Int_t)
virtual const char * getKeepinName(Int_t, Int_t)
TList * getListOfVolumes()
void readTransform(std::fstream &, FairGeoTransform &)
Bool_t readModule(std::fstream &, FairGeoMedia *, TString &, TString &, Bool_t a=kFALSE)
void setModules(Int_t, Int_t *)
Bool_t readKeepIn(std::fstream &, FairGeoMedia *, TString &)
virtual void write(std::fstream &)
virtual Int_t getModNumInMod(const TString &)
void readInout(std::fstream &)
virtual Int_t getSecNumInMod(const TString &)
virtual const char * getEleName(Int_t)
Bool_t readVolumeParams(std::fstream &, FairGeoMedia *, FairGeoNode *, TList *l=0)
Int_t getModule(Int_t, Int_t)
FairGeoNode * getMasterNode(const char *name)
FairGeoNode * getVolume(const char *name)
virtual Bool_t read(std::fstream &, FairGeoMedia *)
FairGeoBasicShape * selectShape(FairGeoVolume *)
FairGeoVector * getPoint(const Int_t n)
void setPoint(const Int_t, const Double_t, const Double_t, const Double_t)
FairGeoTransform & getTransform()
void createPoints(const Int_t)
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
GLuint const GLchar * name
GLboolean GLboolean GLboolean GLboolean a
GLenum GLuint GLenum GLsizei const GLchar * buf
std::unique_ptr< GPUReconstructionTimeframe > tf