Import Geant4 4.1.0 source tree
This commit is contained in:
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFile.hh,v 1.1 2001/11/06 11:48:04 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFile.hh,v 1.4 2002/02/02 04:00:12 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
|
||||
@@ -21,12 +21,13 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileSceneHandler.hh,v 1.4 2001/11/21 16:48:58 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileSceneHandler.hh,v 1.7 2002/02/02 04:00:14 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
// A base class for a scene handler to dump geometry hierarchy.
|
||||
// Joseph Perl 27th January 2002
|
||||
// A base class for a scene handler to export geometry and trajectories
|
||||
// to the HepRep xml file format.
|
||||
|
||||
#ifndef G4HepRepFileSCENEHANDLER_HH
|
||||
#define G4HepRepFileSCENEHANDLER_HH
|
||||
@@ -105,8 +106,8 @@ public:
|
||||
// void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
// void EndPrimitives();
|
||||
|
||||
// void BeginModeling();
|
||||
// void EndModeling();
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
// Required...
|
||||
@@ -121,9 +122,14 @@ protected:
|
||||
G4int fCurrentDepth; // Current depth of geom. hierarchy.
|
||||
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
|
||||
G4LogicalVolume* fpCurrentLV; // Current logical volume.
|
||||
const G4ModelingParameters* fpOriginalMP; // Keeps pointer to original.
|
||||
G4ModelingParameters* fpNonCullingMP; // For temporary non-culling.
|
||||
|
||||
private:
|
||||
HepRepXMLWriter *hepRepXMLWriter;
|
||||
void AddHepRepInstance(const char* primName,
|
||||
const G4Visible visible);
|
||||
int fileCounter;
|
||||
|
||||
#ifdef G4HEPREPFILEDEBUG
|
||||
void PrintThings();
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4HepRepFileViewer.hh,v 1.2 2001/11/19 15:06:52 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-04-00 $
|
||||
// $Id: G4HepRepFileViewer.hh,v 1.5 2002/02/02 04:00:16 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-04-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 5th April 2001
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "G4VViewer.hh"
|
||||
|
||||
#include "HepRepXMLWriter.hh"
|
||||
#include "G4HepRepFileSceneHandler.hh"
|
||||
|
||||
class G4HepRepFileViewer: public G4VViewer {
|
||||
public:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
//
|
||||
//--------------------------------------------------------------------------
|
||||
// File and Version Information:
|
||||
// $Id: HepRepXMLWriter.hh,v 1.4 2001/12/13 12:04:25 gunter Exp $
|
||||
// $Id: HepRepXMLWriter.hh,v 1.8 2002/02/02 04:00:19 perl Exp $
|
||||
//
|
||||
// Description:
|
||||
// Create a HepRep XML File (HepRep version 1).
|
||||
@@ -47,7 +47,7 @@ class HepRepXMLWriter
|
||||
public:
|
||||
HepRepXMLWriter();
|
||||
|
||||
void addType(const char* name);
|
||||
void addType(const char* name, int newTypeDepth);
|
||||
void addInstance();
|
||||
void addPrimitive();
|
||||
void addPoint(double x, double y, double z);
|
||||
@@ -57,7 +57,6 @@ public:
|
||||
const char* type,
|
||||
const char* extra);
|
||||
|
||||
// Four methods to fill attValues
|
||||
void addAttValue(const char* name,
|
||||
const char* value);
|
||||
|
||||
@@ -77,12 +76,20 @@ public:
|
||||
|
||||
void open(const char* filespec);
|
||||
void close();
|
||||
|
||||
void endTypes();
|
||||
|
||||
bool isOpen;
|
||||
int typeDepth;
|
||||
bool inType[50];
|
||||
bool inInstance[50];
|
||||
char* prevTypeName[50];
|
||||
|
||||
private:
|
||||
G4std::ofstream fout;
|
||||
|
||||
bool inType;
|
||||
bool inInstance;
|
||||
void init();
|
||||
|
||||
bool inPrimitive;
|
||||
bool inPoint;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user