Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4FRofstream Class Reference

#include <G4FRofstream.hh>

Public Types

enum  { SEND_BUFMAX = 1024 }
 

Public Member Functions

 G4FRofstream ()
 
 G4FRofstream (const char *filename)
 
virtual ~G4FRofstream ()
 
void Open (const char *filename)
 
void Close ()
 
G4bool IsOpen ()
 
void SendLine (const char *string)
 

Static Public Member Functions

static G4bool DoesFileExist (const char *filename)
 

Protected Attributes

G4bool flag_file_open
 
std::ofstream fout
 

Detailed Description

Definition at line 43 of file G4FRofstream.hh.

Member Enumeration Documentation

anonymous enum
Enumerator
SEND_BUFMAX 

Definition at line 46 of file G4FRofstream.hh.

Constructor & Destructor Documentation

G4FRofstream::G4FRofstream ( )
inline

Definition at line 51 of file G4FRofstream.hh.

51 { flag_file_open = false ; }
G4bool flag_file_open
Definition: G4FRofstream.hh:69
G4FRofstream::G4FRofstream ( const char *  filename)
inline

Definition at line 112 of file G4FRofstream.hh.

113 {
114  flag_file_open = false ;
115  Open( filename );
116 }
void Open(const char *filename)
Definition: G4FRofstream.hh:74
G4bool flag_file_open
Definition: G4FRofstream.hh:69

Here is the call graph for this function:

G4FRofstream::~G4FRofstream ( )
inlinevirtual

Definition at line 119 of file G4FRofstream.hh.

120 {
121  Close() ;
122 }

Here is the call graph for this function:

Member Function Documentation

void G4FRofstream::Close ( )
inline

Definition at line 83 of file G4FRofstream.hh.

84 {
85  if( IsOpen() ) {
86  fout.close();
87  flag_file_open = false ;
88  }
89 }
G4bool IsOpen()
Definition: G4FRofstream.hh:60
G4bool flag_file_open
Definition: G4FRofstream.hh:69
std::ofstream fout
Definition: G4FRofstream.hh:70

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4FRofstream::DoesFileExist ( const char *  filename)
inlinestatic

Definition at line 99 of file G4FRofstream.hh.

100 {
101  G4bool status = false ;
102 
103  std::ifstream fout_tmp( filename ) ;
104  if( fout_tmp ) { status = true ; }
105  fout_tmp.close();
106 
107  return status ;
108 }
bool G4bool
Definition: G4Types.hh:79

Here is the caller graph for this function:

G4bool G4FRofstream::IsOpen ( )
inline

Definition at line 60 of file G4FRofstream.hh.

60 { return flag_file_open ;}
G4bool flag_file_open
Definition: G4FRofstream.hh:69

Here is the caller graph for this function:

void G4FRofstream::Open ( const char *  filename)
inline

Definition at line 74 of file G4FRofstream.hh.

75 {
76  if( !IsOpen() ) {
77  fout.open( filename ) ;
78  flag_file_open = true ;
79  }
80 }
G4bool IsOpen()
Definition: G4FRofstream.hh:60
G4bool flag_file_open
Definition: G4FRofstream.hh:69
std::ofstream fout
Definition: G4FRofstream.hh:70

Here is the call graph for this function:

Here is the caller graph for this function:

void G4FRofstream::SendLine ( const char *  string)
inline

Definition at line 91 of file G4FRofstream.hh.

92 {
93  if ( IsOpen() ) {
94  fout << message << G4endl;
95  }
96 }
G4bool IsOpen()
Definition: G4FRofstream.hh:60
#define G4endl
Definition: G4ios.hh:61
std::ofstream fout
Definition: G4FRofstream.hh:70

Here is the call graph for this function:

Member Data Documentation

G4bool G4FRofstream::flag_file_open
protected

Definition at line 69 of file G4FRofstream.hh.

std::ofstream G4FRofstream::fout
protected

Definition at line 70 of file G4FRofstream.hh.


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