#include "G4SmartVoxelHeader.hh"
#include "G4ios.hh"
#include "G4LogicalVolume.hh"
#include "G4VPhysicalVolume.hh"
#include "G4VoxelLimits.hh"
#include "voxeldefs.hh"
#include "G4AffineTransform.hh"
#include "G4VSolid.hh"
#include "G4VPVParameterisation.hh"
Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &os, const G4SmartVoxelHeader &h) |
std::ostream& operator<< | ( | std::ostream & | os, | |
const G4SmartVoxelHeader & | h | |||
) |
Definition at line 1304 of file G4SmartVoxelHeader.cc.
References G4SmartVoxelHeader::faxis, G4SmartVoxelHeader::fslices, and G4endl.
01305 { 01306 os << "Axis = " << G4int(h.faxis) << G4endl; 01307 G4SmartVoxelProxy *collectNode=0, *collectHead=0; 01308 G4int collectNodeNo=0; 01309 G4int collectHeadNo=0; 01310 size_t i, j; 01311 G4bool haveHeaders=false; 01312 01313 for (i=0; i<h.fslices.size(); i++) 01314 { 01315 os << "Slice #" << i << " = "; 01316 if (h.fslices[i]->IsNode()) 01317 { 01318 if (h.fslices[i]!=collectNode) 01319 { 01320 os << "{"; 01321 for (G4int k=0; k<h.fslices[i]->GetNode()->GetNoContained(); k++) 01322 { 01323 os << " " << h.fslices[i]->GetNode()->GetVolume(k); 01324 } 01325 os << " }" << G4endl; 01326 collectNode = h.fslices[i]; 01327 collectNodeNo = i; 01328 } 01329 else 01330 { 01331 os << "As slice #" << collectNodeNo << G4endl; 01332 } 01333 } 01334 else 01335 { 01336 haveHeaders=true; 01337 if (h.fslices[i] != collectHead) 01338 { 01339 os << "Header" << G4endl; 01340 collectHead = h.fslices[i]; 01341 collectHeadNo = i; 01342 } 01343 else 01344 { 01345 os << "As slice #" << collectHeadNo << G4endl; 01346 } 01347 } 01348 } 01349 01350 if (haveHeaders) 01351 { 01352 collectHead=0; 01353 for (j=0; j<h.fslices.size(); j++) 01354 { 01355 if (h.fslices[j]->IsHeader()) 01356 { 01357 os << "Header at Slice #" << j << " = "; 01358 if (h.fslices[j] != collectHead) 01359 { 01360 os << G4endl 01361 << (*(h.fslices[j]->GetHeader())); 01362 collectHead = h.fslices[j]; 01363 collectHeadNo = j; 01364 } 01365 else 01366 { 01367 os << "As slice #" << collectHeadNo << G4endl; 01368 } 01369 } 01370 } 01371 } 01372 return os; 01373 }