Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4SmartVoxelHeader.cc File Reference
#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"
Include dependency graph for G4SmartVoxelHeader.cc:

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const G4SmartVoxelHeader &h)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const G4SmartVoxelHeader h 
)

Definition at line 1304 of file G4SmartVoxelHeader.cc.

1305 {
1306  os << "Axis = " << G4int(h.faxis) << G4endl;
1307  G4SmartVoxelProxy *collectNode=0, *collectHead=0;
1308  G4int collectNodeNo=0;
1309  G4int collectHeadNo=0;
1310  size_t i, j;
1311  G4bool haveHeaders=false;
1312 
1313  for (i=0; i<h.fslices.size(); i++)
1314  {
1315  os << "Slice #" << i << " = ";
1316  if (h.fslices[i]->IsNode())
1317  {
1318  if (h.fslices[i]!=collectNode)
1319  {
1320  os << "{";
1321  for (G4int k=0; k<h.fslices[i]->GetNode()->GetNoContained(); k++)
1322  {
1323  os << " " << h.fslices[i]->GetNode()->GetVolume(k);
1324  }
1325  os << " }" << G4endl;
1326  collectNode = h.fslices[i];
1327  collectNodeNo = i;
1328  }
1329  else
1330  {
1331  os << "As slice #" << collectNodeNo << G4endl;
1332  }
1333  }
1334  else
1335  {
1336  haveHeaders=true;
1337  if (h.fslices[i] != collectHead)
1338  {
1339  os << "Header" << G4endl;
1340  collectHead = h.fslices[i];
1341  collectHeadNo = i;
1342  }
1343  else
1344  {
1345  os << "As slice #" << collectHeadNo << G4endl;
1346  }
1347  }
1348  }
1349 
1350  if (haveHeaders)
1351  {
1352  collectHead=0;
1353  for (j=0; j<h.fslices.size(); j++)
1354  {
1355  if (h.fslices[j]->IsHeader())
1356  {
1357  os << "Header at Slice #" << j << " = ";
1358  if (h.fslices[j] != collectHead)
1359  {
1360  os << G4endl
1361  << (*(h.fslices[j]->GetHeader()));
1362  collectHead = h.fslices[j];
1363  collectHeadNo = j;
1364  }
1365  else
1366  {
1367  os << "As slice #" << collectHeadNo << G4endl;
1368  }
1369  }
1370  }
1371  }
1372  return os;
1373 }
int G4int
Definition: G4Types.hh:78
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61