Geant4  10.00
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
G4HepRepSceneHandler Class Reference
Inheritance diagram for G4HepRepSceneHandler:
G4VSceneHandler G4VGraphicsScene

Public Member Functions

 G4HepRepSceneHandler (G4VGraphicsSystem &system, const G4String &name="")
 
virtual ~G4HepRepSceneHandler ()
 
void AddSolid (const G4Box &box)
 
void AddSolid (const G4Cons &cons)
 
void AddSolid (const G4Tubs &tubs)
 
void AddSolid (const G4Trd &trd)
 
void AddSolid (const G4Trap &trap)
 
void AddSolid (const G4Sphere &sphere)
 
void AddSolid (const G4Para &para)
 
void AddSolid (const G4Torus &torus)
 
void AddSolid (const G4Polycone &polycone)
 
void AddSolid (const G4Polyhedra &polyhedra)
 
void AddSolid (const G4VSolid &solid)
 
void AddCompound (const G4VTrajectory &)
 
void AddCompound (const G4VHit &hit)
 
void AddCompound (const G4VDigi &digi)
 
void AddCompound (const G4THitsMap< G4double > &hits)
 
void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)
 
void PostAddSolid ()
 
void AddPrimitive (const G4Polyline &)
 
void AddPrimitive (const G4Text &)
 
void AddPrimitive (const G4Circle &)
 
void AddPrimitive (const G4Square &)
 
void AddPrimitive (const G4Polyhedron &)
 
void AddPrimitive (const G4Polymarker &)
 
void AddPrimitive (const G4Scale &scale)
 
void BeginPrimitives (const G4Transform3D &objectTransformation)
 
void EndPrimitives ()
 
void BeginModeling ()
 
void EndModeling ()
 
void openHepRep ()
 
bool closeHepRep (bool final=false)
 
void openFile (G4String name)
 
void closeFile ()
 
- Public Member Functions inherited from G4VSceneHandler
 G4VSceneHandler (G4VGraphicsSystem &system, G4int id, const G4String &name="")
 
virtual ~G4VSceneHandler ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives2D ()
 
virtual const G4VisExtentGetExtent () const
 
const G4StringGetName () const
 
G4int GetSceneHandlerId () const
 
G4int GetViewCount () const
 
G4VGraphicsSystemGetGraphicsSystem () const
 
G4SceneGetScene () const
 
const G4ViewerListGetViewerList () const
 
G4VModelGetModel () const
 
G4VViewerGetCurrentViewer () const
 
G4bool GetMarkForClearingTransientStore () const
 
G4bool IsReadyForTransients () const
 
G4bool GetTransientsDrawnThisEvent () const
 
G4bool GetTransientsDrawnThisRun () const
 
const G4Transform3DGetObjectTransformation () const
 
void SetName (const G4String &)
 
void SetCurrentViewer (G4VViewer *)
 
virtual void SetScene (G4Scene *)
 
G4ViewerListSetViewerList ()
 
void SetModel (G4VModel *)
 
void SetMarkForClearingTransientStore (G4bool)
 
void SetTransientsDrawnThisEvent (G4bool)
 
void SetTransientsDrawnThisRun (G4bool)
 
void SetObjectTransformation (const G4Transform3D &)
 
const G4ColourGetColour (const G4Visible &)
 
const G4ColourGetColor (const G4Visible &)
 
const G4ColourGetTextColour (const G4Text &)
 
const G4ColourGetTextColor (const G4Text &)
 
G4double GetLineWidth (const G4VisAttributes *)
 
G4ViewParameters::DrawingStyle GetDrawingStyle (const G4VisAttributes *)
 
G4bool GetAuxEdgeVisible (const G4VisAttributes *)
 
G4int GetNoOfSides (const G4VisAttributes *)
 
G4double GetMarkerSize (const G4VMarker &, MarkerSizeType &)
 
G4double GetMarkerDiameter (const G4VMarker &, MarkerSizeType &)
 
G4double GetMarkerRadius (const G4VMarker &, MarkerSizeType &)
 
G4ModelingParametersCreateModelingParameters ()
 
void DrawEvent (const G4Event *)
 
void DrawEndOfRunModels ()
 
G4int IncrementViewCount ()
 
virtual void ClearStore ()
 
virtual void ClearTransientStore ()
 
void AddViewerToList (G4VViewer *pView)
 
void RemoveViewerFromList (G4VViewer *pView)
 
- Public Member Functions inherited from G4VGraphicsScene
 G4VGraphicsScene ()
 
virtual ~G4VGraphicsScene ()
 

Private Member Functions

 G4HepRepSceneHandler (const G4HepRepSceneHandler &)
 
G4HepRepSceneHandleroperator= (const G4HepRepSceneHandler &)
 
G4bool dontWrite ()
 
void setColor (HEPREP::HepRepAttribute *attribute, const G4Color &color, const G4String &key=G4String("Color"))
 
G4Color getColorFor (const G4Visible &visible)
 
G4Color getColorFor (const G4VSolid &solid)
 
void setVisibility (HEPREP::HepRepAttribute *attribute, const G4VSolid &solid)
 
void setLine (HEPREP::HepRepAttribute *attribute, const G4VSolid &solid)
 
void setVisibility (HEPREP::HepRepAttribute *attribute, const G4Visible &visible)
 
void setLine (HEPREP::HepRepAttribute *attribute, const G4Visible &visible)
 
void setMarker (HEPREP::HepRepAttribute *attribute, const G4VMarker &marker)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, char *value)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, G4String value)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, bool value)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, double value)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, int value)
 
void setAttribute (HEPREP::HepRepAttribute *attribute, G4String name, double red, double green, double blue, double alpha)
 
bool isEventData ()
 
void open (G4String name)
 
void close ()
 
void writeLayers (HEPREP::HepRep *heprep)
 
void addAttributes (HEPREP::HepRepInstance *instance, HEPREP::HepRepType *type)
 
void addAttDefs (HEPREP::HepRepDefinition *definition, const std::map< G4String, G4AttDef > *attDefs)
 
void addAttVals (HEPREP::HepRepAttribute *attribute, const std::map< G4String, G4AttDef > *attDefs, std::vector< G4AttValue > *attValues)
 
void addTopLevelAttributes (HEPREP::HepRepType *type)
 
HEPREP::HepRepInstancegetGeometryOrEventInstance (HEPREP::HepRepType *type)
 
HEPREP::HepRepgetHepRep ()
 
HEPREP::HepRepgetHepRepGeometry ()
 
HEPREP::HepRepInstanceTreegetGeometryInstanceTree ()
 
HEPREP::HepRepInstancegetGeometryInstance (G4LogicalVolume *volume, G4Material *material, int depth)
 
HEPREP::HepRepInstancegetGeometryInstance (G4String volumeName, int depth)
 
HEPREP::HepRepInstancegetGeometryRootInstance ()
 
HEPREP::HepRepTypeTreegetGeometryTypeTree ()
 
HEPREP::HepRepTypegetGeometryType (G4String volumeName, int depth)
 
HEPREP::HepRepTypegetGeometryRootType ()
 
HEPREP::HepRepInstanceTreegetEventInstanceTree ()
 
HEPREP::HepRepInstancegetEventInstance ()
 
HEPREP::HepRepTypeTreegetEventTypeTree ()
 
HEPREP::HepRepTypegetEventType ()
 
HEPREP::HepRepTypegetTrajectoryType ()
 
HEPREP::HepRepTypegetHitType ()
 
HEPREP::HepRepTypegetCalHitType ()
 
HEPREP::HepRepTypegetCalHitFaceType ()
 
G4String getFullTypeName (G4String volumeName, int depth)
 
G4String getParentTypeName (int currentDepth)
 

Private Attributes

G4Transform3D transform
 
std::ostream * out
 
HEPREP::HepRepFactoryfactory
 
HEPREP::HepRepWriterwriter
 
G4String geometryLayer
 
G4String eventLayer
 
G4String calHitLayer
 
G4String trajectoryLayer
 
G4String hitLayer
 
G4String rootVolumeName
 
G4String baseName
 
G4String eventNumberPrefix
 
G4String eventNumberSuffix
 
G4int eventNumber
 
G4int eventNumberWidth
 
G4String extension
 
G4bool writeBinary
 
G4bool writeZip
 
G4bool writeGZ
 
G4bool writeMultipleFiles
 
const G4VHitcurrentHit
 
const G4VTrajectorycurrentTrack
 
HEPREP::HepRep_heprep
 
HEPREP::HepRep_heprepGeometry
 
HEPREP::HepRepInstanceTree_geometryInstanceTree
 
std::vector
< HEPREP::HepRepInstance * > 
_geometryInstance
 
HEPREP::HepRepInstance_geometryRootInstance
 
HEPREP::HepRepTypeTree_geometryTypeTree
 
std::vector< G4String_geometryTypeName
 
std::map< G4String,
HEPREP::HepRepType * > 
_geometryType
 
HEPREP::HepRepType_geometryRootType
 
HEPREP::HepRepInstanceTree_eventInstanceTree
 
HEPREP::HepRepInstance_eventInstance
 
HEPREP::HepRepTypeTree_eventTypeTree
 
HEPREP::HepRepType_eventType
 
HEPREP::HepRepType_trajectoryType
 
HEPREP::HepRepType_hitType
 
HEPREP::HepRepType_calHitType
 
HEPREP::HepRepType_calHitFaceType
 
std::map< int, G4StringmaterialState
 

Static Private Attributes

static G4int sceneIdCount
 

Additional Inherited Members

- Public Types inherited from G4VSceneHandler
enum  MarkerSizeType { world, screen }
 
- Protected Member Functions inherited from G4VSceneHandler
virtual void ProcessScene ()
 
virtual void RequestPrimitives (const G4VSolid &solid)
 
virtual G4VSolidCreateSectionSolid ()
 
virtual G4VSolidCreateCutawaySolid ()
 
void LoadAtts (const G4Visible &, G4AttHolder *)
 
- Protected Attributes inherited from G4VSceneHandler
G4VGraphicsSystemfSystem
 
const G4int fSceneHandlerId
 
G4String fName
 
G4int fViewCount
 
G4ViewerList fViewerList
 
G4VViewerfpViewer
 
G4ScenefpScene
 
G4bool fMarkForClearingTransientStore
 
G4bool fReadyForTransients
 
G4bool fTransientsDrawnThisEvent
 
G4bool fTransientsDrawnThisRun
 
G4bool fProcessingSolid
 
G4bool fProcessing2D
 
G4VModelfpModel
 
G4Transform3D fObjectTransformation
 
G4int fNestingDepth
 
const G4VisAttributesfpVisAttribs
 
const G4Transform3D fIdentityTransformation
 

Detailed Description

Author
Mark Donszelmann

Constructor & Destructor Documentation

G4HepRepSceneHandler ( G4VGraphicsSystem system,
const G4String name = "" 
)
virtual ~G4HepRepSceneHandler ( )
virtual

Member Function Documentation

void AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Cons cons)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Tubs tubs)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Trd trd)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Trap trap)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Sphere sphere)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Para para)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Torus torus)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Polycone polycone)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4Polyhedra polyhedra)
virtual

Reimplemented from G4VSceneHandler.

void AddSolid ( const G4VSolid solid)
virtual

Reimplemented from G4VSceneHandler.

void AddCompound ( const G4VTrajectory )
virtual

Reimplemented from G4VSceneHandler.

void AddCompound ( const G4VHit hit)
virtual

Reimplemented from G4VSceneHandler.

void AddCompound ( const G4VDigi digi)
virtual

Reimplemented from G4VSceneHandler.

References G4VSceneHandler::AddCompound().

void AddCompound ( const G4THitsMap< G4double > &  hits)
virtual

Reimplemented from G4VSceneHandler.

References G4VSceneHandler::AddCompound().

void PreAddSolid ( const G4Transform3D objectTransformation,
const G4VisAttributes visAttribs 
)
virtual

Reimplemented from G4VSceneHandler.

void PostAddSolid ( )
virtual

Reimplemented from G4VSceneHandler.

void AddPrimitive ( const G4Polyline )
virtual

Implements G4VSceneHandler.

void AddPrimitive ( const G4Text )
virtual

Implements G4VSceneHandler.

void AddPrimitive ( const G4Circle )
virtual

Implements G4VSceneHandler.

void AddPrimitive ( const G4Square )
virtual

Implements G4VSceneHandler.

void AddPrimitive ( const G4Polyhedron )
virtual

Implements G4VSceneHandler.

void AddPrimitive ( const G4Polymarker )
virtual

Reimplemented from G4VSceneHandler.

void AddPrimitive ( const G4Scale scale)
virtual

Reimplemented from G4VSceneHandler.

void BeginPrimitives ( const G4Transform3D objectTransformation)
virtual

Reimplemented from G4VSceneHandler.

void EndPrimitives ( )
virtual

Reimplemented from G4VSceneHandler.

void BeginModeling ( )
virtual

Reimplemented from G4VSceneHandler.

void EndModeling ( )
virtual

Reimplemented from G4VSceneHandler.

void openHepRep ( )
bool closeHepRep ( bool  final = false)
void openFile ( G4String  name)
void closeFile ( )
G4HepRepSceneHandler& operator= ( const G4HepRepSceneHandler )
private
G4bool dontWrite ( )
private
void setColor ( HEPREP::HepRepAttribute attribute,
const G4Color color,
const G4String key = G4String("Color") 
)
private
G4Color getColorFor ( const G4Visible visible)
private
G4Color getColorFor ( const G4VSolid solid)
private
void setVisibility ( HEPREP::HepRepAttribute attribute,
const G4VSolid solid 
)
private
void setLine ( HEPREP::HepRepAttribute attribute,
const G4VSolid solid 
)
private
void setVisibility ( HEPREP::HepRepAttribute attribute,
const G4Visible visible 
)
private
void setLine ( HEPREP::HepRepAttribute attribute,
const G4Visible visible 
)
private
void setMarker ( HEPREP::HepRepAttribute attribute,
const G4VMarker marker 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
char *  value 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
G4String  value 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
bool  value 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
double  value 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
int  value 
)
private
void setAttribute ( HEPREP::HepRepAttribute attribute,
G4String  name,
double  red,
double  green,
double  blue,
double  alpha 
)
private
bool isEventData ( )
private
void open ( G4String  name)
private
void close ( )
private
void writeLayers ( HEPREP::HepRep heprep)
private
void addAttributes ( HEPREP::HepRepInstance instance,
HEPREP::HepRepType type 
)
private
void addAttDefs ( HEPREP::HepRepDefinition definition,
const std::map< G4String, G4AttDef > *  attDefs 
)
private
void addAttVals ( HEPREP::HepRepAttribute attribute,
const std::map< G4String, G4AttDef > *  attDefs,
std::vector< G4AttValue > *  attValues 
)
private
void addTopLevelAttributes ( HEPREP::HepRepType type)
private
HEPREP::HepRepInstance* getGeometryOrEventInstance ( HEPREP::HepRepType type)
private
HEPREP::HepRep* getHepRep ( )
private
HEPREP::HepRep* getHepRepGeometry ( )
private
HEPREP::HepRepInstanceTree* getGeometryInstanceTree ( )
private
HEPREP::HepRepInstance* getGeometryInstance ( G4LogicalVolume volume,
G4Material material,
int  depth 
)
private
HEPREP::HepRepInstance* getGeometryInstance ( G4String  volumeName,
int  depth 
)
private
HEPREP::HepRepInstance* getGeometryRootInstance ( )
private
HEPREP::HepRepTypeTree* getGeometryTypeTree ( )
private
HEPREP::HepRepType* getGeometryType ( G4String  volumeName,
int  depth 
)
private
HEPREP::HepRepType* getGeometryRootType ( )
private
HEPREP::HepRepInstanceTree* getEventInstanceTree ( )
private
HEPREP::HepRepInstance* getEventInstance ( )
private
HEPREP::HepRepTypeTree* getEventTypeTree ( )
private
HEPREP::HepRepType* getEventType ( )
private
HEPREP::HepRepType* getTrajectoryType ( )
private
HEPREP::HepRepType* getHitType ( )
private
HEPREP::HepRepType* getCalHitType ( )
private
HEPREP::HepRepType* getCalHitFaceType ( )
private
G4String getFullTypeName ( G4String  volumeName,
int  depth 
)
private
G4String getParentTypeName ( int  currentDepth)
private

Member Data Documentation

G4int sceneIdCount
staticprivate
G4Transform3D transform
private
std::ostream* out
private
HEPREP::HepRepFactory* factory
private
HEPREP::HepRepWriter* writer
private
G4String geometryLayer
private
G4String eventLayer
private
G4String calHitLayer
private
G4String trajectoryLayer
private
G4String hitLayer
private
G4String rootVolumeName
private
G4String baseName
private
G4String eventNumberPrefix
private
G4String eventNumberSuffix
private
G4int eventNumber
private
G4int eventNumberWidth
private
G4String extension
private
G4bool writeBinary
private
G4bool writeZip
private
G4bool writeGZ
private
G4bool writeMultipleFiles
private
const G4VHit* currentHit
private
const G4VTrajectory* currentTrack
private
HEPREP::HepRep* _heprep
private
HEPREP::HepRep* _heprepGeometry
private
HEPREP::HepRepInstanceTree* _geometryInstanceTree
private
std::vector<HEPREP::HepRepInstance*> _geometryInstance
private
HEPREP::HepRepInstance* _geometryRootInstance
private
HEPREP::HepRepTypeTree* _geometryTypeTree
private
std::vector<G4String> _geometryTypeName
private
std::map<G4String, HEPREP::HepRepType*> _geometryType
private
HEPREP::HepRepType* _geometryRootType
private
HEPREP::HepRepInstanceTree* _eventInstanceTree
private
HEPREP::HepRepInstance* _eventInstance
private
HEPREP::HepRepTypeTree* _eventTypeTree
private
HEPREP::HepRepType* _eventType
private
HEPREP::HepRepType* _trajectoryType
private
HEPREP::HepRepType* _hitType
private
HEPREP::HepRepType* _calHitType
private
HEPREP::HepRepType* _calHitFaceType
private
std::map<int, G4String> materialState
private