106 for (Int_t
s=s1;
s<
s2&&rc;
s++) {
113 Bool_t containsActiveModule=kFALSE;
114 for (Int_t
s=s1;
s<
s2;
s++) {
115 if (
getModule(
s,
m)) { containsActiveModule=kTRUE; }
119 rc=
readModule(fin,media,modName,eleName,containsActiveModule);
130 }
while (c==
' ' || c==
'\n');
131 if (c!=
'0'&&c!=
'1') { fin.putback(c); }
142 fin>>t[0]>>t[1]>>t[2];
143 for(Int_t i=0; i<9; i++) { fin>>r[i]; }
153 if (volu==0||media==0||refVolumes==0) {
return kFALSE; }
154 const Int_t maxbuf=256;
156 TString
name(volu->GetName());
157 Int_t nameLength=
name.Length();
158 Bool_t isCopy=kFALSE;
175 if (!mother) { Warning(
"readVolumeParams",
"Mother volume %s not found!",buf); }
184 }
while (c==
' ' || c==
'\n');
188 if (!isalpha(i)) { isCopy=kTRUE; }
192 if (isCopy) {
return kFALSE; }
207 Ssiz_t l=
name.Last(
'#');
212 }
while (c==
' ' || c==
'\n');
215 if (!isalpha(i)) { isCopy=kTRUE; }
219 if (isCopy) {
return kFALSE; }
238 else {
return kFALSE; }
242 Error(
"readVolumeParams",
"Medium %s not found in list of media",buf);
247 fin.getline(buf,maxbuf);
249 if (n<=0) {
return kFALSE; }
259 fin.seekg(0, ios::beg);
263 const Int_t maxbuf=256;
265 while(rc && !volu && !fin.eof()) {
267 if (buf[0]==
'/') { fin.getline(buf,maxbuf); }
268 else if (!fin.eof()) {
269 if (strcmp(buf,name)==0) {
277 fin.getline(buf,maxbuf);
278 }
while(!fin.eof()&&buf[0]!=
'/');
282 if (rc) {
volumes->Add(volu); }
292 TString& eleName,Bool_t containsActiveMod)
295 const Int_t maxbuf=256;
298 fin.seekg(0,ios::beg);
303 while(rc && !fin.eof()) {
305 if (buf[0]==
'/') { fin.getline(buf,maxbuf); }
306 else if (!fin.eof()) {
309 if (name.BeginsWith(modName)) {
318 if (rc) {
volumes->Add(volu); }
320 Error(
"readModule",
"Failed for module %s\n",volu->GetName());
324 }
else if (!eleName.IsNull()&&name.BeginsWith(eleName)) {
330 if (rc) {
volumes->Add(volu); }
332 Error(
"readModule",
"Failed for %s\n",volu->GetName());
338 fin.getline(buf,maxbuf);
339 }
while(!fin.eof()&&buf[0]!=
'/');
350 if (!
author.IsNull()) { cout<<
"//Author: "<<
author<<
'\n'; }
353 cout<<
"//----------------------------------------------------------\n";
355 cout.setf(ios::fixed,ios::floatfield);
366 if (!
author.IsNull()) { fout<<
"//Author: "<<
author<<
'\n'; }
368 fout<<
"//----------------------------------------------------------\n";
369 fout.setf(ios::fixed,ios::floatfield);
374 rc=volu->
write(fout);
381 if (!builder) {
return kFALSE; }
398 }
else { Error(
"create",
"Creation of %s failed!",volu->GetName()); }
407 if (fName.CompareTo(rset.GetName())!=0) {
408 Error(
"compare",
"Sets have different type");
413 Int_t
n=0, nnf=0, nDiff=0;
414 cout<<
"name\t mother medium shape points pos rot\n";
415 cout<<
"------------------------------------------------\n";
419 if (!rNode) { nnf++; }
420 else if (volu->
compare(*rNode)>0) { nDiff++; }
422 cout<<
"Number of volumes in first list: "<<n<<
'\n';
423 cout<<
"Number of different volumes: "<<nDiff<<endl;
424 cout<<
"Number of volumes not found in second list: "<<nnf<<
'\n';
426 if (rlist->GetSize()!=(n-nnf)) {
428 TListIter riter(rlist);
431 if (!rNode) { nnf++; }
434 cout<<
"Number of additional volumes in second list: "<<nnf<<
'\n';