77 inPrimitives2D =
false;
78 warnedAbout3DText =
false;
79 warnedAbout2DMarkers =
false;
111 #ifdef G4HEPREPFILEDEBUG
112 G4cout <<
"G4HepRepFileSceneHandler::BeginPrimitives2D() " <<
G4endl;
114 inPrimitives2D =
true;
119 #ifdef G4HEPREPFILEDEBUG
120 G4cout <<
"G4HepRepFileSceneHandler::EndPrimitives2D() " <<
G4endl;
123 inPrimitives2D =
false;
127 #ifdef G4HEPREPFILEDEBUG
128 void G4HepRepFileSceneHandler::PrintThings() {
130 " with transformation "
139 "\n current physical volume: "
141 "\n current logical volume: "
143 "\n current depth of geometry tree: "
152 #ifdef G4HEPREPFILEDEBUG
154 "G4HepRepFileSceneHandler::AddSolid(const G4Box& box) called for "
167 AddHepRepInstance(
"Prism", NULL);
198 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
199 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
200 hepRepXMLWriter->
addPoint(vertex3.
x(), vertex3.
y(), vertex3.
z());
201 hepRepXMLWriter->
addPoint(vertex4.
x(), vertex4.
y(), vertex4.
z());
202 hepRepXMLWriter->
addPoint(vertex5.
x(), vertex5.
y(), vertex5.
z());
203 hepRepXMLWriter->
addPoint(vertex6.
x(), vertex6.
y(), vertex6.
z());
204 hepRepXMLWriter->
addPoint(vertex7.
x(), vertex7.
y(), vertex7.
z());
205 hepRepXMLWriter->
addPoint(vertex8.
x(), vertex8.
y(), vertex8.
z());
210 #ifdef G4HEPREPFILEDEBUG
212 "G4HepRepFileSceneHandler::AddSolid(const G4Cons& cons) called for "
221 G4bool linedUpWithAnAxis = (std::fabs(r.
phiX())<=.001 ||
222 std::fabs(r.
phiY())<=.001 ||
223 std::fabs(r.
phiZ())<=.001 ||
224 std::fabs(r.
phiX()-
pi)<=.001 ||
225 std::fabs(r.
phiY()-
pi)<=.001 ||
226 std::fabs(r.
phiZ()-
pi)<=.001);
246 AddHepRepInstance(
"Cylinder", NULL);
261 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
262 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
268 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
269 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
275 #ifdef G4HEPREPFILEDEBUG
277 "G4HepRepFileSceneHandler::AddSolid(const G4Tubs& tubs) called for "
286 G4bool linedUpWithAnAxis = (std::fabs(r.
phiX())<=.001 ||
287 std::fabs(r.
phiY())<=.001 ||
288 std::fabs(r.
phiZ())<=.001 ||
289 std::fabs(r.
phiX()-
pi)<=.001 ||
290 std::fabs(r.
phiY()-
pi)<=.001 ||
291 std::fabs(r.
phiZ()-
pi)<=.001);
311 AddHepRepInstance(
"Cylinder", NULL);
326 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
327 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
334 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
335 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
342 #ifdef G4HEPREPFILEDEBUG
344 "G4HepRepFileSceneHandler::AddSolid(const G4Trd& trd) called for "
357 AddHepRepInstance(
"Prism", NULL);
390 hepRepXMLWriter->
addPoint(vertex1.
x(), vertex1.
y(), vertex1.
z());
391 hepRepXMLWriter->
addPoint(vertex2.
x(), vertex2.
y(), vertex2.
z());
392 hepRepXMLWriter->
addPoint(vertex3.
x(), vertex3.
y(), vertex3.
z());
393 hepRepXMLWriter->
addPoint(vertex4.
x(), vertex4.
y(), vertex4.
z());
394 hepRepXMLWriter->
addPoint(vertex5.
x(), vertex5.
y(), vertex5.
z());
395 hepRepXMLWriter->
addPoint(vertex6.
x(), vertex6.
y(), vertex6.
z());
396 hepRepXMLWriter->
addPoint(vertex7.
x(), vertex7.
y(), vertex7.
z());
397 hepRepXMLWriter->
addPoint(vertex8.
x(), vertex8.
y(), vertex8.
z());
402 #ifdef G4HEPREPFILEDEBUG
404 "G4HepRepFileSceneHandler::AddSolid(const G4Trap& trap) called for "
414 #ifdef G4HEPREPFILEDEBUG
416 "G4HepRepFileSceneHandler::AddSolid(const G4Sphere& sphere) called for "
426 #ifdef G4HEPREPFILEDEBUG
428 "G4HepRepFileSceneHandler::AddSolid(const G4Para& para) called for "
438 #ifdef G4HEPREPFILEDEBUG
440 "G4HepRepFileSceneHandler::AddSolid(const G4Torus& torus) called for "
450 #ifdef G4HEPREPFILEDEBUG
452 "G4HepRepFileSceneHandler::AddSolid(const G4Polycone& polycone) called for "
462 #ifdef G4HEPREPFILEDEBUG
464 "G4HepRepFileSceneHandler::AddSolid(const G4Polyhedra& polyhedra) called for "
474 #ifdef G4HEPREPFILEDEBUG
476 "G4HepRepFileSceneHandler::AddSolid(const G4Solid& solid) called for "
486 #ifdef G4HEPREPFILEDEBUG
487 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(const G4VTrajectory&) " <<
G4endl;
493 (
"G4HepRepFileSceneHandler::AddCompound(const G4VTrajectory&)",
499 new std::vector<G4AttValue>;
501 new std::map<G4String,G4AttDef>;
504 std::vector<G4AttValue>::iterator iAttVal;
505 std::map<G4String,G4AttDef>::const_iterator iAttDef;
510 if (rawTrajAttValues) {
512 traj.
GetAttDefs()).Standard(trajAttValues,trajAttDefs);
514 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(traj):"
515 "\nERROR found during conversion to standard trajectory attributes."
518 #ifdef G4HEPREPFILEDEBUG
520 "G4HepRepFileSceneHandler::AddCompound(traj): standardised attributes:\n"
523 delete rawTrajAttValues;
530 if (strcmp(
"Event Data",hepRepXMLWriter->
prevTypeName[0])!=0) {
531 hepRepXMLWriter->
addType(
"Event Data",0);
537 hepRepXMLWriter->
addType(
"Trajectories",1);
541 if (strcmp(
"Trajectories",previousName)!=0) {
548 if (trajAttValues && trajAttDefs) {
549 for (iAttVal = trajAttValues->begin();
550 iAttVal != trajAttValues->end(); ++iAttVal) {
551 iAttDef = trajAttDefs->find(iAttVal->GetName());
552 if (iAttDef != trajAttDefs->end()) {
555 G4String category = iAttDef->second.GetCategory();
556 if (strcmp(category,
"Draw")!=0 &&
557 strcmp(category,
"Physics")!=0 &&
558 strcmp(category,
"Association")!=0 &&
559 strcmp(category,
"PickAction")!=0)
560 category =
"Physics";
561 hepRepXMLWriter->
addAttDef(iAttVal->GetName(), iAttDef->second.GetDesc(),
562 category, iAttDef->second.GetExtra());
575 std::vector<G4AttValue>* rawPointAttValues = aTrajectoryPoint->
CreateAttValues();
576 std::vector<G4AttValue>* pointAttValues =
577 new std::vector<G4AttValue>;
578 std::map<G4String,G4AttDef>* pointAttDefs =
579 new std::map<G4String,G4AttDef>;
583 if (rawPointAttValues) {
585 aTrajectoryPoint->
GetAttDefs()).Standard(pointAttValues,pointAttDefs);
587 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(traj):"
588 "\nERROR found during conversion to standard first point attributes." <<
G4endl;
592 if (pointAttValues && pointAttDefs) {
593 for (iAttVal = pointAttValues->begin();
594 iAttVal != pointAttValues->end(); ++iAttVal) {
596 pointAttDefs->find(iAttVal->GetName());
597 if (iAttDef != pointAttDefs->end()) {
600 G4String category = iAttDef->second.GetCategory();
601 if (strcmp(category,
"Draw")!=0 &&
602 strcmp(category,
"Physics")!=0 &&
603 strcmp(category,
"Association")!=0 &&
604 strcmp(category,
"PickAction")!=0)
605 category =
"Physics";
609 if (strcmp(iAttVal->GetName(),
"Aux-X")!=0 &&
610 strcmp(iAttVal->GetName(),
"Aux-Y")!=0 &&
611 strcmp(iAttVal->GetName(),
"Aux-Z")!=0 &&
612 strcmp(iAttVal->GetName(),
"Pos-X")!=0 &&
613 strcmp(iAttVal->GetName(),
"Pos-Y")!=0 &&
614 strcmp(iAttVal->GetName(),
"Pos-Z")!=0)
615 hepRepXMLWriter->
addAttDef(iAttVal->GetName(), iAttDef->second.GetDesc(),
616 category, iAttDef->second.GetExtra());
620 delete rawPointAttValues;
625 delete pointAttValues;
640 doneInitTraj =
false;
653 hepRepXMLWriter->
addType(
"Trajectory Step Points",2);
662 redness = colour.
GetRed();
670 if (redness==0. && greenness==0. && blueness==0.) {
677 if (strcmp(
"Trajectory Step Points",previousName)!=0) {
679 hepRepXMLWriter->
addAttValue(
"MarkColor", redness, greenness, blueness);
682 hepRepXMLWriter->
addAttValue(
"Visibility",visible);
697 std::vector<G4AttValue>* rawPointAttValues = aTrajectoryPoint->
CreateAttValues();
698 std::vector<G4AttValue>* pointAttValues =
699 new std::vector<G4AttValue>;
700 std::map<G4String,G4AttDef>* pointAttDefs =
701 new std::map<G4String,G4AttDef>;
705 if (rawPointAttValues) {
707 aTrajectoryPoint->
GetAttDefs()).Standard(pointAttValues,pointAttDefs);
709 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(traj):"
710 "\nERROR found during conversion to standard point attributes." <<
G4endl;
714 if (pointAttValues) {
715 for (iAttVal = pointAttValues->begin();
716 iAttVal != pointAttValues->end(); ++iAttVal)
720 if (strcmp(iAttVal->GetName(),
"Aux-X")!=0 &&
721 strcmp(iAttVal->GetName(),
"Aux-Y")!=0 &&
722 strcmp(iAttVal->GetName(),
"Aux-Z")!=0 &&
723 strcmp(iAttVal->GetName(),
"Pos-X")!=0 &&
724 strcmp(iAttVal->GetName(),
"Pos-Y")!=0 &&
725 strcmp(iAttVal->GetName(),
"Pos-Z")!=0)
726 hepRepXMLWriter->
addAttValue(iAttVal->GetName(), iAttVal->GetValue());
732 delete pointAttValues;
733 delete rawPointAttValues;
738 hepRepXMLWriter->
addPoint(vertex.
x(), vertex.
y(), vertex.
z());
751 hepRepXMLWriter->
addType(
"Trajectory Auxiliary Points",2);
760 redness = colour.
GetRed();
768 if (redness==0. && greenness==0. && blueness==0.) {
775 if (strcmp(
"Trajectory Auxiliary Points",previousName)!=0) {
777 hepRepXMLWriter->
addAttValue(
"MarkColor", redness, greenness, blueness);
780 hepRepXMLWriter->
addAttValue(
"Visibility",visible);
795 std::vector<G4AttValue>* rawPointAttValues = aTrajectoryPoint->
CreateAttValues();
796 std::vector<G4AttValue>* pointAttValues =
797 new std::vector<G4AttValue>;
798 std::map<G4String,G4AttDef>* pointAttDefs =
799 new std::map<G4String,G4AttDef>;
803 if (rawPointAttValues) {
805 aTrajectoryPoint->
GetAttDefs()).Standard(pointAttValues,pointAttDefs);
807 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(traj):"
808 "\nERROR found during conversion to standard point attributes." <<
G4endl;
812 if (pointAttValues) {
813 for (iAttVal = pointAttValues->begin();
814 iAttVal != pointAttValues->end(); ++iAttVal)
818 if (strcmp(iAttVal->GetName(),
"Aux-X")!=0 &&
819 strcmp(iAttVal->GetName(),
"Aux-Y")!=0 &&
820 strcmp(iAttVal->GetName(),
"Aux-Z")!=0 &&
821 strcmp(iAttVal->GetName(),
"Pos-X")!=0 &&
822 strcmp(iAttVal->GetName(),
"Pos-Y")!=0 &&
823 strcmp(iAttVal->GetName(),
"Pos-Z")!=0)
824 hepRepXMLWriter->
addAttValue(iAttVal->GetName(), iAttVal->GetValue());
830 delete pointAttValues;
831 delete rawPointAttValues;
837 const std::vector<G4ThreeVector>* auxiliaries = aTrajectoryPoint->
GetAuxiliaryPoints();
838 if (0 != auxiliaries) {
839 for (
size_t iAux=0; iAux<auxiliaries->size(); ++iAux) {
842 hepRepXMLWriter->
addPoint(auxPos.
x(), auxPos.
y(), auxPos.
z());
851 #ifdef G4HEPREPFILEDEBUG
852 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(G4VHit&) " <<
G4endl;
858 new std::vector<G4AttValue>;
860 new std::map<G4String,G4AttDef>;
863 std::vector<G4AttValue>::iterator iAttVal;
864 std::map<G4String,G4AttDef>::const_iterator iAttDef;
868 if (rawHitAttValues) {
870 hit.
GetAttDefs()).Standard(hitAttValues,hitAttDefs);
872 G4cout <<
"G4HepRepFileSceneHandler::AddCompound(hit):"
873 "\nERROR found during conversion to standard hit attributes."
876 #ifdef G4HEPREPFILEDEBUG
878 "G4HepRepFileSceneHandler::AddCompound(hit): standardised attributes:\n"
881 delete rawHitAttValues;
888 if (strcmp(
"Event Data",hepRepXMLWriter->
prevTypeName[0])!=0) {
889 hepRepXMLWriter->
addType(
"Event Data",0);
897 for (iAttVal = hitAttValues->begin();
898 iAttVal != hitAttValues->end() && !found; ++iAttVal) {
899 if (strcmp(iAttVal->GetName(),
"HitType")==0) {
900 hitType = iAttVal->GetValue();
908 hepRepXMLWriter->
addType(hitType,1);
912 if (strcmp(hitType,previousName)!=0) {
919 if (hitAttValues && hitAttDefs) {
920 for (iAttVal = hitAttValues->begin();
921 iAttVal != hitAttValues->end(); ++iAttVal) {
922 iAttDef = hitAttDefs->find(iAttVal->GetName());
923 if (iAttDef != hitAttDefs->end()) {
926 G4String category = iAttDef->second.GetCategory();
927 if (strcmp(category,
"Draw")!=0 &&
928 strcmp(category,
"Physics")!=0 &&
929 strcmp(category,
"Association")!=0 &&
930 strcmp(category,
"PickAction")!=0)
931 category =
"Physics";
932 hepRepXMLWriter->
addAttDef(iAttVal->GetName(), iAttDef->second.GetDesc(),
933 category, iAttDef->second.GetExtra());
955 std::vector<G4AttValue>::iterator iAttVal;
956 for (iAttVal = trajAttValues->begin();
957 iAttVal != trajAttValues->end(); ++iAttVal)
958 hepRepXMLWriter->
addAttValue(iAttVal->GetName(), iAttVal->GetValue());
959 delete trajAttValues;
978 std::vector<G4AttValue>::iterator iAttVal;
979 for (iAttVal = hitAttValues->begin();
980 iAttVal != hitAttValues->end(); ++iAttVal)
981 hepRepXMLWriter->
addAttValue(iAttVal->GetName(), iAttVal->GetValue());
995 #ifdef G4HEPREPFILEDEBUG
997 "G4HepRepFileSceneHandler::AddPrimitive(const G4Polyline& polyline) called:"
998 "\n polyline: " << polyline
1008 if (inPrimitives2D) {
1009 if (!warnedAbout2DMarkers) {
1010 G4cout <<
"HepRepFile does not currently support 2D lines." <<
G4endl;
1011 warnedAbout2DMarkers =
true;
1023 AddHepRepInstance(
"Line", polyline);
1027 for (
size_t i=0; i < polyline.size(); i++) {
1029 hepRepXMLWriter->
addPoint(vertex.
x(), vertex.
y(), vertex.
z());
1036 #ifdef G4HEPREPFILEDEBUG
1038 "G4HepRepFileSceneHandler::AddPrimitive(const G4Polymarker& line) called"
1048 if (inPrimitives2D) {
1049 if (!warnedAbout2DMarkers) {
1050 G4cout <<
"HepRepFile does not currently support 2D lines." <<
G4endl;
1051 warnedAbout2DMarkers =
true;
1058 if (sizeType==
world)
1068 AddHepRepInstance(
"Point", line);
1075 for (
size_t i=0; i < line.size(); i++) {
1077 hepRepXMLWriter->
addPoint(vertex.
x(), vertex.
y(), vertex.
z());
1083 #ifdef G4HEPREPFILEDEBUG
1085 "G4HepRepFileSceneHandler::AddPrimitive(const G4Text& text) called:"
1091 if (!inPrimitives2D) {
1092 if (!warnedAbout3DText) {
1093 G4cout <<
"HepRepFile does not currently support 3D text." <<
G4endl;
1094 G4cout <<
"HepRep browsers can directly display text attributes on request." <<
G4endl;
1095 G4cout <<
"See Application Developers Guide for how to attach attributes to viewable objects." <<
G4endl;
1096 warnedAbout3DText =
true;
1103 if (sizeType==
world)
1107 AddHepRepInstance(
"Text", text);
1111 hepRepXMLWriter->
addAttValue(
"FontName",
"Arial");
1112 hepRepXMLWriter->
addAttValue(
"FontStyle",
"Plain");
1114 hepRepXMLWriter->
addAttValue(
"FontHasBanner",
"TRUE");
1115 hepRepXMLWriter->
addAttValue(
"FontBannerColor",
"0,0,0");
1118 float redness = colour.
GetRed();
1119 float greenness = colour.
GetGreen();
1120 float blueness = colour.
GetBlue();
1123 if (redness==0. && greenness==0. && blueness==0.) {
1128 hepRepXMLWriter->
addAttValue(
"FontColor",redness,greenness,blueness);
1139 #ifdef G4HEPREPFILEDEBUG
1141 "G4HepRepFileSceneHandler::AddPrimitive(const G4Circle& circle) called:"
1152 if (inPrimitives2D) {
1153 if (!warnedAbout2DMarkers) {
1154 G4cout <<
"HepRepFile does not currently support 2D circles." <<
G4endl;
1155 warnedAbout2DMarkers =
true;
1162 if (sizeType==
world)
1172 AddHepRepInstance(
"Point", circle);
1180 hepRepXMLWriter->
addPoint(center.
x(), center.
y(), center.
z());
1185 #ifdef G4HEPREPFILEDEBUG
1187 "G4HepRepFileSceneHandler::AddPrimitive(const G4Square& square) called:"
1198 if (inPrimitives2D) {
1199 if (!warnedAbout2DMarkers) {
1200 G4cout <<
"HepRepFile does not currently support 2D squares." <<
G4endl;
1201 warnedAbout2DMarkers =
true;
1208 if (sizeType==
world)
1218 AddHepRepInstance(
"Point", square);
1220 hepRepXMLWriter->
addAttValue(
"MarkName",
"Square");
1226 hepRepXMLWriter->
addPoint(center.
x(), center.
y(), center.
z());
1231 #ifdef G4HEPREPFILEDEBUG
1233 "G4HepRepFileSceneHandler::AddPrimitive(const G4Polyhedron& polyhedron) called."
1252 AddHepRepInstance(
"Polygon", polyhedron);
1267 hepRepXMLWriter->
addPoint(vertex.
x(), vertex.
y(), vertex.
z());
1268 }
while (notLastEdge);
1269 }
while (notLastFace);
1274 return hepRepXMLWriter;
1278 void G4HepRepFileSceneHandler::AddHepRepInstance(
const char* primName,
1280 #ifdef G4HEPREPFILEDEBUG
1282 "G4HepRepFileSceneHandler::AddHepRepInstance called."
1291 G4int currentDepth = 0;
1299 #ifdef G4HEPREPFILEDEBUG
1305 if (drawingTraj || drawingHit) {
1310 if (strcmp(
"Event Data",hepRepXMLWriter->
prevTypeName[0])!=0) {
1311 hepRepXMLWriter->
addType(
"Event Data",0);
1331 if (strcmp(
"Text",primName)==0) {
1332 hepRepXMLWriter->
addType(
"EventID",1);
1334 if (strcmp(
"Line",primName)==0) {
1335 hepRepXMLWriter->
addType(
"TransientPolylines",1);
1338 if (strcmp(hepRepXMLWriter->
prevTypeName[1],
"TransientPolylines")==0 &&
1339 strcmp(
"Square",primName)==0)
1341 hepRepXMLWriter->
addType(
"AuxiliaryPoints",2);
1344 if (strcmp(hepRepXMLWriter->
prevTypeName[1],
"TransientPolylines")==0 &&
1345 strcmp(
"Circle",primName)==0)
1347 hepRepXMLWriter->
addType(
"StepPoints",2);
1350 hepRepXMLWriter->
addType(
"Hits",1);
1361 }
else if (pCurrentPV==0) {
1362 if (strcmp(
"AxesEtc",hepRepXMLWriter->
prevTypeName[0])!=0) {
1363 hepRepXMLWriter->
addType(
"AxesEtc",0);
1369 if (strcmp(
"Text",primName)==0) {
1370 hepRepXMLWriter->
addType(
"Text",1);
1372 if (strcmp(
"Line",primName)==0) {
1373 hepRepXMLWriter->
addType(
"Polylines",1);
1376 hepRepXMLWriter->
addType(
"Points",1);
1390 if (strcmp(
"Detector Geometry",hepRepXMLWriter->
prevTypeName[0])!=0) {
1392 hepRepXMLWriter->
addType(
"Detector Geometry",0);
1401 typedef std::vector<PVNodeID>
PVPath;
1403 PVPath::const_reverse_iterator ri = ++drawnPVPath.rbegin();
1404 G4int drawnMotherDepth;
1405 if (ri != drawnPVPath.rend()) {
1407 drawnMotherDepth = ri->GetNonCulledDepth();
1411 drawnMotherDepth = -1;
1415 while (drawnMotherDepth < (currentDepth-1)) {
1416 G4String culledParentName =
"Culled parent of " + pCurrentPV->
GetName();
1418 hepRepXMLWriter->
addType(culledParentName, drawnMotherDepth+2);
1420 drawnMotherDepth ++;
1438 hepRepXMLWriter->
addAttValue(
"Region", regionName);
1444 hepRepXMLWriter->
addAttValue(
"Material", matName);
1473 redness = colour.
GetRed();
1478 if (redness==0. && greenness==0. && blueness==0.) {
1484 #ifdef G4HEPREPFILEDEBUG
1486 "G4HepRepFileSceneHandler::AddHepRepInstance using default colour."
1495 if (strcmp(primName,
"Point")==0)
1496 hepRepXMLWriter->
addAttValue(
"MarkColor",redness,greenness,blueness);
1498 hepRepXMLWriter->
addAttValue(
"LineColor",redness,greenness,blueness);
1500 hepRepXMLWriter->
addAttValue(
"Visibility",isVisible);
1504 void G4HepRepFileSceneHandler::CheckFileOpen() {
1505 #ifdef G4HEPREPFILEDEBUG
1507 "G4HepRepFileSceneHandler::CheckFileOpen called."
1511 if (!hepRepXMLWriter->
isOpen) {
1522 G4cout <<
"HepRepFile writing to " << newFileSpec <<
G4endl;
1524 hepRepXMLWriter->
open(newFileSpec);
1529 hepRepXMLWriter->
addAttDef(
"Generator",
"HepRep Data Generator",
"Physics",
"");
1530 G4String versionString = G4Version;
1531 versionString = versionString.substr(1,versionString.size()-2);
1532 versionString =
" Geant4 version " + versionString +
" " + G4Date;
1533 hepRepXMLWriter->
addAttValue(
"Generator", versionString);
1535 hepRepXMLWriter->
addAttDef(
"LVol",
"Logical Volume",
"Physics",
"");
1536 hepRepXMLWriter->
addAttDef(
"Region",
"Cuts Region",
"Physics",
"");
1537 hepRepXMLWriter->
addAttDef(
"RootRegion",
"Root Region",
"Physics",
"");
1538 hepRepXMLWriter->
addAttDef(
"Solid",
"Solid Name",
"Physics",
"");
1539 hepRepXMLWriter->
addAttDef(
"EType",
"Entity Type",
"Physics",
"");
1540 hepRepXMLWriter->
addAttDef(
"Material",
"Material Name",
"Physics",
"");
1541 hepRepXMLWriter->
addAttDef(
"Density",
"Material Density",
"Physics",
"kg/m3");
1542 hepRepXMLWriter->
addAttDef(
"State",
"Material State",
"Physics",
"");
1543 hepRepXMLWriter->
addAttDef(
"Radlen",
"Material Radiation Length",
"Physics",
"m");
G4double GetWorldRadius() const
virtual G4double getScale()
G4double GetXHalfLength() const
virtual void AddSolid(const G4Box &)
virtual G4String getFileName()
const G4String & GetName() const
void AddCompound(const G4VTrajectory &)
G4double GetYHalfLength1() const
G4HepRepFileSceneHandler(G4VGraphicsSystem &system, const G4String &name)
G4double GetStepPtsSize() const
virtual void BeginModeling()
virtual G4bool renderCylAsPolygons()
virtual const std::vector< G4ThreeVector > * GetAuxiliaryPoints() const
G4bool GetNextNormal(G4Normal3D &normal) const
const G4String & GetName() const
G4double GetAuxPtsSize() const
virtual G4VTrajectoryPoint * GetPoint(G4int i) const =0
G4Material * GetCurrentMaterial() const
void AddPrimitive(const G4Polyline &)
void addAttValue(const char *name, const char *value)
G4double GetDensity() const
void AddSolid(const G4Box &)
const G4Colour & GetColour() const
static G4String ConvertToString(G4bool boolVal)
G4Transform3D fObjectTransformation
HepGeom::Point3D< G4double > G4Point3D
G4double GetOuterRadiusMinusZ() const
G4Point3D GetPosition() const
const G4VisAttributes * GetVisAttributes() const
G4Region * GetRegion() const
G4Colour GetAuxPtsColour() const
G4Polymarker::MarkerType GetAuxPtsType() const
virtual G4GeometryType GetEntityType() const =0
const std::vector< G4PhysicalVolumeNodeID > & GetDrawnPVPath() const
G4double GetZHalfLength() const
G4int GetCurrentDepth() const
G4double GetZHalfLength() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
const G4VTrajectoryModel * CurrentTrajDrawModel() const
virtual std::vector< G4AttValue > * CreateAttValues() const
const G4VisTrajContext & GetContext() const
G4double GetXHalfLength2() const
G4bool GetAuxPtsVisible() const
virtual G4bool getOverwrite()
virtual G4String getFileDir()
virtual int GetPointEntries() const =0
G4double GetYOffset() const
G4GLOB_DLL std::ostream G4cout
void addPoint(double x, double y, double z)
void addAttDef(const char *name, const char *desc, const char *type, const char *extra)
G4double GetDeltaPhiAngle() const
const G4String & GetName() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
G4double GetGreen() const
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
G4bool IsRootRegion() const
virtual G4bool getCullInvisibles()
const XML_Char XML_Content * model
virtual void EndModeling()
static G4HepRepMessenger * GetInstance()
G4double GetYHalfLength() const
virtual ~G4HepRepFileSceneHandler()
std::vector< PVNodeID > PVPath
G4double GetYHalfLength2() const
G4double GetInnerRadiusPlusZ() const
G4bool GetDrawStepPts() const
G4double GetInnerRadius() const
G4double GetRadlen() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual void BeginPrimitives2D(const G4Transform3D &objectTransformation)
virtual const G4ThreeVector GetPosition() const =0
G4double GetXOffset() const
const G4VisAttributes * fpVisAttribs
G4Colour GetStepPtsColour() const
virtual void AddCompound(const G4VTrajectory &)
virtual std::vector< G4AttValue > * CreateAttValues() const
virtual const std::map< G4String, G4AttDef > * GetAttDefs() const
static G4int fSceneIdCount
system("rm -rf dna.root")
void BeginPrimitives2D(const G4Transform3D &objectTransformation)
G4double GetMarkerSize(const G4VMarker &, MarkerSizeType &)
G4double GetZHalfLength() const
virtual std::vector< G4AttValue > * CreateAttValues() const
G4Polymarker::MarkerType GetStepPtsType() const
const G4Colour & GetColour(const G4Visible &)
G4double GetXHalfLength1() const
G4bool fReadyForTransients
void addType(const char *name, int newTypeDepth)
G4bool GetDrawAuxPts() const
G4bool GetStepPtsVisible() const
G4double GetInnerRadiusMinusZ() const
G4bool GetNextVertex(G4Point3D &vertex, G4int &edgeFlag) const
G4LogicalVolume * GetCurrentLV() const
void open(const char *filespec)
G4VPhysicalVolume * GetCurrentPV() const
G4int GetNoFacets() const
G4HepRepFileXMLWriter * GetHepRepXMLWriter()
G4double GetOuterRadiusPlusZ() const
G4double GetZHalfLength() const
G4VSolid * GetSolid() const
G4double GetOuterRadius() const
virtual void EndPrimitives2D()
void ClearTransientStore()
const G4Colour & GetTextColour(const G4Text &)
G4double GetDeltaPhiAngle() const