Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4DAWNFILESceneHandler Class Reference

#include <G4DAWNFILESceneHandler.hh>

+ Inheritance diagram for G4DAWNFILESceneHandler:

Public Member Functions

 G4DAWNFILESceneHandler (G4DAWNFILE &system, const G4String &name="")
 
virtual ~G4DAWNFILESceneHandler ()
 
void AddPrimitive (const G4Polyline &line)
 
void AddPrimitive (const G4Polyhedron &p)
 
void AddPrimitive (const G4NURBS &nurb)
 
void AddPrimitive (const G4Text &)
 
void AddPrimitive (const G4Circle &)
 
void AddPrimitive (const G4Square &)
 
void AddPrimitive (const G4Polymarker &polymarker)
 
void AddPrimitive (const G4Scale &scale)
 
virtual void BeginModeling ()
 
virtual void EndModeling ()
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives ()
 
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 &traj)
 
void AddCompound (const G4VHit &hit)
 
void AddCompound (const G4VDigi &digi)
 
void AddCompound (const G4THitsMap< G4double > &hits)
 
void ClearTransientStore ()
 
void FRBeginModeling ()
 
void FREndModeling ()
 
G4bool FRIsInModeling ()
 
G4bool IsSavingG4Prim (void)
 
void BeginSavingG4Prim (void)
 
void EndSavingG4Prim (void)
 
void SetG4PrimFileName ()
 
G4DAWNFILEGetSystem ()
 
void SendBoundingBox (void)
 
const char * GetG4PrimFileName ()
 
void SendStr (const char *char_string)
 
void SendStrInt (const char *char_string, G4int ival)
 
void SendStrInt3 (const char *char_string, G4int ival1, G4int ival2, G4int ival3)
 
void SendStrInt4 (const char *char_string, G4int ival1, G4int ival2, G4int ival3, G4int ival4)
 
void SendStrDouble (const char *char_string, G4double dval)
 
void SendStrDouble2 (const char *char_string, G4double dval1, G4double dval2)
 
void SendStrDouble3 (const char *char_string, G4double dval1, G4double dval2, G4double dval3)
 
void SendStrDouble4 (const char *char_string, G4double dval1, G4double dval2, G4double dval3, G4double dval4)
 
void SendStrDouble5 (const char *char_string, G4double dval1, G4double dval2, G4double dval3, G4double dval4, G4double dval5)
 
void SendStrDouble6 (const char *char_string, G4double dval1, G4double dval2, G4double dval3, G4double dval4, G4double dval5, G4double dval6)
 
void SendStrDouble7 (const char *char_string, G4double dval1, G4double dval2, G4double dval3, G4double dval4, G4double dval5, G4double dval6, G4double dval7)
 
void SendStrDouble11 (const char *char_string, G4double dval1, G4double dval2, G4double dval3, G4double dval4, G4double dval5, G4double dval6, G4double dval7, G4double dval8, G4double dval9, G4double dval10, G4double dval11)
 
void SendIntDouble3 (G4int ival, G4double dval1, G4double dval2, G4double dval3)
 
void SendInt3Str (G4int ival1, G4int ival2, G4int ival3, const char *char_string)
 
void SendInt4Str (G4int ival1, G4int ival2, G4int ival3, G4int ival4, const char *char_string)
 
void SendStrDouble3Str (const char *char_string1, G4double dval1, G4double dval2, G4double dval3, const char *char_string2)
 
void SendStrDouble6Str (const char *char_string1, G4double dval1, G4double dval2, G4double dval3, G4double dval4, G4double dval5, G4double dval6, const char *char_string2)
 
void SendInt (G4int val)
 
void SendDouble (G4double val)
 
- Public Member Functions inherited from G4VSceneHandler
 G4VSceneHandler (G4VGraphicsSystem &system, G4int id, const G4String &name="")
 
virtual ~G4VSceneHandler ()
 
virtual void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &)
 
virtual void PostAddSolid ()
 
virtual void AddSolid (const G4Box &)
 
virtual void AddSolid (const G4Cons &)
 
virtual void AddSolid (const G4Tubs &)
 
virtual void AddSolid (const G4Trd &)
 
virtual void AddSolid (const G4Trap &)
 
virtual void AddSolid (const G4Sphere &)
 
virtual void AddSolid (const G4Para &)
 
virtual void AddSolid (const G4Torus &)
 
virtual void AddSolid (const G4Polycone &)
 
virtual void AddSolid (const G4Polyhedra &)
 
virtual void AddSolid (const G4VSolid &)
 
virtual void AddCompound (const G4VTrajectory &)
 
virtual void AddCompound (const G4VHit &)
 
virtual void AddCompound (const G4VDigi &)
 
virtual void AddCompound (const G4THitsMap< G4double > &)
 
virtual void BeginModeling ()
 
virtual void EndModeling ()
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives ()
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation)
 
virtual void EndPrimitives2D ()
 
virtual void AddPrimitive (const G4Polyline &)=0
 
virtual void AddPrimitive (const G4Scale &)
 
virtual void AddPrimitive (const G4Text &)=0
 
virtual void AddPrimitive (const G4Circle &)=0
 
virtual void AddPrimitive (const G4Square &)=0
 
virtual void AddPrimitive (const G4Polymarker &)
 
virtual void AddPrimitive (const G4Polyhedron &)=0
 
virtual void AddPrimitive (const G4NURBS &)=0
 
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 ()
 
virtual void PreAddSolid (const G4Transform3D &objectTransformation, const G4VisAttributes &visAttribs)=0
 
virtual void PostAddSolid ()=0
 
virtual void AddSolid (const G4Box &)=0
 
virtual void AddSolid (const G4Cons &)=0
 
virtual void AddSolid (const G4Tubs &)=0
 
virtual void AddSolid (const G4Trd &)=0
 
virtual void AddSolid (const G4Trap &)=0
 
virtual void AddSolid (const G4Sphere &)=0
 
virtual void AddSolid (const G4Para &)=0
 
virtual void AddSolid (const G4Torus &)=0
 
virtual void AddSolid (const G4Polycone &)=0
 
virtual void AddSolid (const G4Polyhedra &)=0
 
virtual void AddSolid (const G4VSolid &)=0
 
virtual void AddCompound (const G4VTrajectory &)=0
 
virtual void AddCompound (const G4VHit &)=0
 
virtual void AddCompound (const G4VDigi &)=0
 
virtual void AddCompound (const G4THitsMap< G4double > &)=0
 
virtual void BeginPrimitives (const G4Transform3D &objectTransformation=G4Transform3D())=0
 
virtual void EndPrimitives ()=0
 
virtual void BeginPrimitives2D (const G4Transform3D &objectTransformation=G4Transform3D())=0
 
virtual void EndPrimitives2D ()=0
 
virtual void AddPrimitive (const G4Polyline &)=0
 
virtual void AddPrimitive (const G4Scale &)=0
 
virtual void AddPrimitive (const G4Text &)=0
 
virtual void AddPrimitive (const G4Circle &)=0
 
virtual void AddPrimitive (const G4Square &)=0
 
virtual void AddPrimitive (const G4Polymarker &)=0
 
virtual void AddPrimitive (const G4Polyhedron &)=0
 
virtual void AddPrimitive (const G4NURBS &)=0
 

Friends

class G4DAWNFILEViewer
 

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

Definition at line 47 of file G4DAWNFILESceneHandler.hh.

Constructor & Destructor Documentation

◆ G4DAWNFILESceneHandler()

G4DAWNFILESceneHandler::G4DAWNFILESceneHandler ( G4DAWNFILE system,
const G4String name = "" 
)

Definition at line 85 of file G4DAWNFILESceneHandler.cc.

85 :
86G4VSceneHandler (system, fSceneIdCount++, name) ,
87fSystem (system) ,
88fPrimDest () ,
89FRflag_in_modeling (false) ,
90flag_saving_g4_prim (false) ,
91COMMAND_BUF_SIZE (G4FRofstream::SEND_BUFMAX),
92fPrec (9), fPrec2 (16)
93{
94 // g4.prim filename and its directory
95 if ( getenv( "G4DAWNFILE_DEST_DIR" ) == NULL ) {
96 strcpy( fG4PrimDestDir , "" ) ; // output dir
97 strcpy( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME ); // filename
98 } else {
99 strcpy( fG4PrimDestDir , getenv( "G4DAWNFILE_DEST_DIR" ) ); // output dir
100 strcpy( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME ); // filename
101 }
102
103 // maximum number of g4.prim files in the dest directory
104 fMaxFileNum = FR_MAX_FILE_NUM ; // initialization
105 if ( getenv( "G4DAWNFILE_MAX_FILE_NUM" ) != NULL ) {
106
107 sscanf( getenv("G4DAWNFILE_MAX_FILE_NUM"), "%d", &fMaxFileNum ) ;
108
109 } else {
110 fMaxFileNum = FR_MAX_FILE_NUM ;
111 }
112 if( fMaxFileNum < 1 ) { fMaxFileNum = 1 ; }
113
114
115 //----- precision control
116 if( getenv( "G4DAWNFILE_PRECISION" ) != NULL ) {
117 sscanf( getenv("G4DAWNFILE_PRECISION"), "%d", &fPrec ) ;
118 } else {
119 fPrec = 9 ;
120 }
121 fPrec2 = fPrec + 7 ;
122
123}
const int FR_MAX_FILE_NUM
const char DEFAULT_G4PRIM_FILE_NAME[]

◆ ~G4DAWNFILESceneHandler()

G4DAWNFILESceneHandler::~G4DAWNFILESceneHandler ( )
virtual

Definition at line 127 of file G4DAWNFILESceneHandler.cc.

128{
129#if defined DEBUG_FR_SCENE
131 G4cout << "***** ~G4DAWNFILESceneHandler" << G4endl;
132#endif
133 if (fPrimDest.IsOpen())
134 {
135 //----- End of modeling
136 // !EndModeling, !DrawAll, !CloseDevice,
137 // close g4.prim
139 }
140}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout
G4bool IsOpen()
Definition: G4FRofstream.hh:60
static Verbosity GetVerbosity()

Member Function Documentation

◆ AddCompound() [1/4]

void G4DAWNFILESceneHandler::AddCompound ( const G4THitsMap< G4double > &  hits)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 102 of file G4DAWNFILESceneHandler.hh.

102 {
104 }
virtual void AddCompound(const G4VTrajectory &)

◆ AddCompound() [2/4]

void G4DAWNFILESceneHandler::AddCompound ( const G4VDigi digi)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 99 of file G4DAWNFILESceneHandler.hh.

99 {
101 }

◆ AddCompound() [3/4]

void G4DAWNFILESceneHandler::AddCompound ( const G4VHit hit)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 96 of file G4DAWNFILESceneHandler.hh.

96 {
98 }

◆ AddCompound() [4/4]

void G4DAWNFILESceneHandler::AddCompound ( const G4VTrajectory traj)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 93 of file G4DAWNFILESceneHandler.hh.

93 {
95 }

◆ AddPrimitive() [1/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Circle )
virtual

Implements G4VSceneHandler.

◆ AddPrimitive() [2/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4NURBS nurb)
virtual

Implements G4VSceneHandler.

◆ AddPrimitive() [3/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Polyhedron p)
virtual

Implements G4VSceneHandler.

◆ AddPrimitive() [4/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Polyline line)
virtual

Implements G4VSceneHandler.

◆ AddPrimitive() [5/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Polymarker polymarker)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 67 of file G4DAWNFILESceneHandler.hh.

68 { G4VSceneHandler::AddPrimitive (polymarker); }
virtual void AddPrimitive(const G4Polyline &)=0

◆ AddPrimitive() [6/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Scale scale)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 69 of file G4DAWNFILESceneHandler.hh.

◆ AddPrimitive() [7/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Square )
virtual

Implements G4VSceneHandler.

◆ AddPrimitive() [8/8]

void G4DAWNFILESceneHandler::AddPrimitive ( const G4Text )
virtual

Implements G4VSceneHandler.

◆ AddSolid() [1/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Box box)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [2/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Cons cons)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [3/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Para para)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [4/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Polycone polycone)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 86 of file G4DAWNFILESceneHandler.hh.

86 {
88 }
virtual void AddSolid(const G4Box &)

◆ AddSolid() [5/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Polyhedra polyhedra)
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 89 of file G4DAWNFILESceneHandler.hh.

89 {
90 G4VSceneHandler::AddSolid (polyhedra);
91 }

◆ AddSolid() [6/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Sphere sphere)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [7/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Torus torus)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [8/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Trap trap)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [9/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Trd trd)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [10/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4Tubs tubs)
virtual

Reimplemented from G4VSceneHandler.

◆ AddSolid() [11/11]

void G4DAWNFILESceneHandler::AddSolid ( const G4VSolid solid)
virtual

Reimplemented from G4VSceneHandler.

◆ BeginModeling()

virtual void G4DAWNFILESceneHandler::BeginModeling ( )
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 72 of file G4DAWNFILESceneHandler.hh.

◆ BeginPrimitives()

virtual void G4DAWNFILESceneHandler::BeginPrimitives ( const G4Transform3D objectTransformation)
virtual

Reimplemented from G4VSceneHandler.

◆ BeginSavingG4Prim()

void G4DAWNFILESceneHandler::BeginSavingG4Prim ( void  )

Definition at line 209 of file G4DAWNFILESceneHandler.cc.

210{
211#if defined DEBUG_FR_SCENE
213 G4cout << "***** BeginSavingG4Prim (called)\n";
214#endif
215
216 if( !IsSavingG4Prim() )
217 {
218#if defined DEBUG_FR_SCENE
220 G4cout << "***** (started) " ;
221 G4cout << "(open g4.prim, ##)" << G4endl;
222 }
223#endif
224 SetG4PrimFileName() ; // result set to fG4PrimFileName
225 fPrimDest.Open(fG4PrimFileName) ;
226
228 flag_saving_g4_prim = true ;
229 }
230}
const char FR_G4_PRIM_HEADER[]
Definition: G4FRConst.hh:38
void SendStr(const char *char_string)
void Open(const char *filename)
Definition: G4FRofstream.hh:74

Referenced by FRBeginModeling().

◆ ClearTransientStore()

void G4DAWNFILESceneHandler::ClearTransientStore ( )
virtual

Reimplemented from G4VSceneHandler.

◆ EndModeling()

virtual void G4DAWNFILESceneHandler::EndModeling ( )
inlinevirtual

Reimplemented from G4VSceneHandler.

Definition at line 73 of file G4DAWNFILESceneHandler.hh.

◆ EndPrimitives()

virtual void G4DAWNFILESceneHandler::EndPrimitives ( )
virtual

Reimplemented from G4VSceneHandler.

◆ EndSavingG4Prim()

void G4DAWNFILESceneHandler::EndSavingG4Prim ( void  )

Definition at line 232 of file G4DAWNFILESceneHandler.cc.

233{
234#if defined DEBUG_FR_SCENE
236 G4cout << "***** EndSavingG4Prim (called)\n";
237#endif
238
239 if( IsSavingG4Prim() )
240 {
241#if defined DEBUG_FR_SCENE
243 G4cout << "***** (started) (close g4.prim)" << G4endl;
244#endif
245 fPrimDest.Close() ;
246 flag_saving_g4_prim = false ;
247 }
248}

◆ FRBeginModeling()

void G4DAWNFILESceneHandler::FRBeginModeling ( void  )

Definition at line 252 of file G4DAWNFILESceneHandler.cc.

253{
254 if( !FRIsInModeling() )
255 {
256#if defined DEBUG_FR_SCENE
258 G4cout << "***** G4DAWNFILESceneHandler::FRBeginModeling (called & started)" << G4endl;
259#endif
260
261 //----- Send saving command and heading comment
263
264 //----- Send bounding box command
266
267 //----- send SET_CAMERA command
268#if defined DEBUG_FR_SCENE
270 G4cout << "***** (!SetCamera in FRBeginModeling())" << G4endl;
271#endif
273
274 //----- open device
275#if defined DEBUG_FR_SCENE
277 G4cout << "***** (!OpenDevice in FRBeginModeling())" << G4endl;
278#endif
280
281 //----- begin sending primitives
282#if defined DEBUG_FR_SCENE
284 G4cout << "***** (!BeginModeling in FRBeginModeling())" << G4endl;
285#endif
286 SendStr( FR_BEGIN_MODELING ); FRflag_in_modeling = true ;
287
288 } // if
289
290}
const char FR_OPEN_DEVICE[]
Definition: G4FRConst.hh:46
const char FR_BEGIN_MODELING[]
Definition: G4FRConst.hh:64
const char FR_SET_CAMERA[]
Definition: G4FRConst.hh:45
void SendBoundingBox(void)

Referenced by G4DAWNFILEViewer::ClearView(), and G4DAWNFILEViewer::DrawView().

◆ FREndModeling()

void G4DAWNFILESceneHandler::FREndModeling ( )

◆ FRIsInModeling()

G4bool G4DAWNFILESceneHandler::FRIsInModeling ( )
inline

Definition at line 111 of file G4DAWNFILESceneHandler.hh.

111{ return FRflag_in_modeling ; }

Referenced by FRBeginModeling(), and G4DAWNFILEViewer::ShowView().

◆ GetG4PrimFileName()

const char * G4DAWNFILESceneHandler::GetG4PrimFileName ( )
inline

Definition at line 120 of file G4DAWNFILESceneHandler.hh.

120{ return fG4PrimFileName ; }

Referenced by G4DAWNFILEViewer::G4DAWNFILEViewer(), and G4DAWNFILEViewer::ShowView().

◆ GetSystem()

G4DAWNFILE & G4DAWNFILESceneHandler::GetSystem ( )
inline

Definition at line 118 of file G4DAWNFILESceneHandler.hh.

118{ return fSystem ; }

◆ IsSavingG4Prim()

G4bool G4DAWNFILESceneHandler::IsSavingG4Prim ( void  )
inline

Definition at line 113 of file G4DAWNFILESceneHandler.hh.

113{ return flag_saving_g4_prim ; }

Referenced by BeginSavingG4Prim(), and EndSavingG4Prim().

◆ SendBoundingBox()

void G4DAWNFILESceneHandler::SendBoundingBox ( void  )

Referenced by FRBeginModeling().

◆ SendDouble()

void G4DAWNFILESceneHandler::SendDouble ( G4double  val)

◆ SendInt()

void G4DAWNFILESceneHandler::SendInt ( G4int  val)

◆ SendInt3Str()

void G4DAWNFILESceneHandler::SendInt3Str ( G4int  ival1,
G4int  ival2,
G4int  ival3,
const char *  char_string 
)

◆ SendInt4Str()

void G4DAWNFILESceneHandler::SendInt4Str ( G4int  ival1,
G4int  ival2,
G4int  ival3,
G4int  ival4,
const char *  char_string 
)

◆ SendIntDouble3()

void G4DAWNFILESceneHandler::SendIntDouble3 ( G4int  ival,
G4double  dval1,
G4double  dval2,
G4double  dval3 
)

◆ SendStr()

void G4DAWNFILESceneHandler::SendStr ( const char *  char_string)

◆ SendStrDouble()

void G4DAWNFILESceneHandler::SendStrDouble ( const char *  char_string,
G4double  dval 
)

◆ SendStrDouble11()

void G4DAWNFILESceneHandler::SendStrDouble11 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4,
G4double  dval5,
G4double  dval6,
G4double  dval7,
G4double  dval8,
G4double  dval9,
G4double  dval10,
G4double  dval11 
)

◆ SendStrDouble2()

void G4DAWNFILESceneHandler::SendStrDouble2 ( const char *  char_string,
G4double  dval1,
G4double  dval2 
)

◆ SendStrDouble3()

void G4DAWNFILESceneHandler::SendStrDouble3 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3 
)

◆ SendStrDouble3Str()

void G4DAWNFILESceneHandler::SendStrDouble3Str ( const char *  char_string1,
G4double  dval1,
G4double  dval2,
G4double  dval3,
const char *  char_string2 
)

◆ SendStrDouble4()

void G4DAWNFILESceneHandler::SendStrDouble4 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4 
)

◆ SendStrDouble5()

void G4DAWNFILESceneHandler::SendStrDouble5 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4,
G4double  dval5 
)

◆ SendStrDouble6()

void G4DAWNFILESceneHandler::SendStrDouble6 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4,
G4double  dval5,
G4double  dval6 
)

◆ SendStrDouble6Str()

void G4DAWNFILESceneHandler::SendStrDouble6Str ( const char *  char_string1,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4,
G4double  dval5,
G4double  dval6,
const char *  char_string2 
)

◆ SendStrDouble7()

void G4DAWNFILESceneHandler::SendStrDouble7 ( const char *  char_string,
G4double  dval1,
G4double  dval2,
G4double  dval3,
G4double  dval4,
G4double  dval5,
G4double  dval6,
G4double  dval7 
)

◆ SendStrInt()

void G4DAWNFILESceneHandler::SendStrInt ( const char *  char_string,
G4int  ival 
)

◆ SendStrInt3()

void G4DAWNFILESceneHandler::SendStrInt3 ( const char *  char_string,
G4int  ival1,
G4int  ival2,
G4int  ival3 
)

◆ SendStrInt4()

void G4DAWNFILESceneHandler::SendStrInt4 ( const char *  char_string,
G4int  ival1,
G4int  ival2,
G4int  ival3,
G4int  ival4 
)

◆ SetG4PrimFileName()

void G4DAWNFILESceneHandler::SetG4PrimFileName ( )

Definition at line 143 of file G4DAWNFILESceneHandler.cc.

144{
145 // g4_00.prim, g4_01.prim, ..., g4_MAX_FILE_INDEX.prim
146 const int MAX_FILE_INDEX = fMaxFileNum - 1 ;
147
148 // dest directory (null if no environmental variables is set)
149 strcpy ( fG4PrimFileName, fG4PrimDestDir) ;
150
151 // create full path name (default)
152 strcat ( fG4PrimFileName, DEFAULT_G4PRIM_FILE_NAME );
153
154 // Automatic updation of file names
155 for( int i = 0 ; i < fMaxFileNum ; i++) {
156
157 // Message in the final execution
158 if( i == MAX_FILE_INDEX )
159 {
161 G4cout << "===========================================" << G4endl;
162 G4cout << "WARNING MESSAGE from DAWNFILE driver: " << G4endl;
163 G4cout << " This file name is the final one in the " << G4endl;
164 G4cout << " automatic updation of the output file name." << G4endl;
165 G4cout << " You may overwrite existing files, i.e. " << G4endl;
166 G4cout << " g4_XX.prim and g4_XX.eps " << G4endl;
167 G4cout << "===========================================" << G4endl;
168 }
169 }
170
171 // re-determine file name as G4DAWNFILE_DEST_DIR/g4_XX.prim
172 if( i >= 0 && i <= 9 ) {
173 sprintf( fG4PrimFileName, "%s%s%s%d.prim" , fG4PrimDestDir, G4PRIM_FILE_HEADER, "0", i );
174 } else {
175 sprintf( fG4PrimFileName, "%s%s%d.prim" , fG4PrimDestDir, G4PRIM_FILE_HEADER, i );
176 }
177
178 // check validity of the file name
179 std::ifstream fin ;
180 fin.open(fG4PrimFileName) ;
181 if(!fin) {
182 // new file
183 fin.close();
184 break;
185 } else {
186 // already exists (try next)
187 fin.close();
188 }
189
190 } // for
191
192 G4cout << "=========================================== " << G4endl;
193 G4cout << "Output file: " << fG4PrimFileName << G4endl;
194 G4cout << "Destination directory (current dir if NULL): " << fG4PrimDestDir << G4endl;
195 G4cout << "Maximal number of files in the destination directory: " << fMaxFileNum << G4endl;
196 G4cout << "Note: " << G4endl;
197 G4cout << " * The maximal number is customizable as: " << G4endl;
198 G4cout << " % setenv G4DAWNFILE_MAX_FILE_NUM number " << G4endl;
199 G4cout << " * The destination directory is customizable as:" << G4endl;
200 G4cout << " % setenv G4DAWNFILE_DEST_DIR dir_name/ " << G4endl;
201 G4cout << " ** Do not forget \"/\" at the end of the " << G4endl;
202 G4cout << " dir_name, e.g. \"./tmp/\". " << G4endl;
203 G4cout << "=========================================== " << G4endl;
204
205} // G4DAWNFILESceneHandler::SetG4PrimFileName()
const char G4PRIM_FILE_HEADER[]

Referenced by BeginSavingG4Prim().

Friends And Related Function Documentation

◆ G4DAWNFILEViewer

friend class G4DAWNFILEViewer
friend

Definition at line 49 of file G4DAWNFILESceneHandler.hh.


The documentation for this class was generated from the following files: