Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VFileManager Class Referenceabstract

#include <G4VFileManager.hh>

Inheritance diagram for G4VFileManager:
Collaboration diagram for G4VFileManager:

Public Member Functions

 G4VFileManager (const G4AnalysisManagerState &state)
 
virtual ~G4VFileManager ()
 
virtual G4bool OpenFile (const G4String &fileName)=0
 
virtual G4bool WriteFile ()=0
 
virtual G4bool CloseFile ()=0
 
virtual G4bool SetFileName (const G4String &fileName) final
 
void LockHistoDirectoryName ()
 
void LockNtupleDirectoryName ()
 
G4bool SetHistoDirectoryName (const G4String &dirName)
 
G4bool SetNtupleDirectoryName (const G4String &dirName)
 
G4bool IsOpenFile () const
 
G4String GetHistoDirectoryName () const
 
G4String GetNtupleDirectoryName () const
 
- Public Member Functions inherited from G4BaseFileManager
 G4BaseFileManager (const G4AnalysisManagerState &state)
 
virtual ~G4BaseFileManager ()
 
G4String GetFileName () const
 
G4String GetFullFileName (const G4String &baseFileName="", G4bool isPerThread=true) const
 
G4String GetHnFileName (const G4String &hnType, const G4String &hnName) const
 
G4String GetNtupleFileName (const G4String &ntupleName) const
 
G4String GetNtupleFileName (G4int ntupleFileNumber) const
 
G4String GetPlotFileName () const
 
G4String GetFileType () const
 

Protected Attributes

G4bool fIsOpenFile
 
G4String fHistoDirectoryName
 
G4String fNtupleDirectoryName
 
G4bool fLockFileName
 
G4bool fLockHistoDirectoryName
 
G4bool fLockNtupleDirectoryName
 
- Protected Attributes inherited from G4BaseFileManager
const G4AnalysisManagerStatefState
 
G4String fFileName
 

Additional Inherited Members

- Protected Member Functions inherited from G4BaseFileManager
G4String TakeOffExtension (G4String &name) const
 

Detailed Description

Definition at line 38 of file G4VFileManager.hh.

Constructor & Destructor Documentation

G4VFileManager::G4VFileManager ( const G4AnalysisManagerState state)
explicit

Definition at line 36 of file G4VFileManager.cc.

37  : G4BaseFileManager(state),
38  fIsOpenFile(false),
41  fLockFileName(false),
44 {}
G4bool fLockHistoDirectoryName
G4String fNtupleDirectoryName
G4String fHistoDirectoryName
G4BaseFileManager(const G4AnalysisManagerState &state)
G4bool fLockNtupleDirectoryName
G4VFileManager::~G4VFileManager ( )
virtual

Definition at line 47 of file G4VFileManager.cc.

48 {}

Member Function Documentation

virtual G4bool G4VFileManager::CloseFile ( )
pure virtual
G4String G4VFileManager::GetHistoDirectoryName ( ) const
inline

Definition at line 85 of file G4VFileManager.hh.

85  {
86  return fHistoDirectoryName;
87 }
G4String fHistoDirectoryName
G4String G4VFileManager::GetNtupleDirectoryName ( ) const
inline

Definition at line 89 of file G4VFileManager.hh.

89  {
90  return fNtupleDirectoryName;
91 }
G4String fNtupleDirectoryName
G4bool G4VFileManager::IsOpenFile ( ) const
inline

Definition at line 75 of file G4VFileManager.hh.

76 { return fIsOpenFile; }
void G4VFileManager::LockHistoDirectoryName ( )
inline

Definition at line 78 of file G4VFileManager.hh.

79 { fLockHistoDirectoryName = true; }
G4bool fLockHistoDirectoryName
void G4VFileManager::LockNtupleDirectoryName ( )
inline

Definition at line 81 of file G4VFileManager.hh.

82 { fLockNtupleDirectoryName = true; }
G4bool fLockNtupleDirectoryName
virtual G4bool G4VFileManager::OpenFile ( const G4String fileName)
pure virtual
G4bool G4VFileManager::SetFileName ( const G4String fileName)
finalvirtual

Reimplemented from G4BaseFileManager.

Definition at line 55 of file G4VFileManager.cc.

56 {
57  if ( fLockFileName ) {
58  G4ExceptionDescription description;
59  description
60  << "Cannot set File name as its value was already used.";
61  G4Exception("G4VFileManager::SetFileName()",
62  "Analysis_W012", JustWarning, description);
63  return false;
64  }
65 
66  return G4BaseFileManager::SetFileName(fileName);
67 }
virtual G4bool SetFileName(const G4String &fileName)
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

G4bool G4VFileManager::SetHistoDirectoryName ( const G4String dirName)

Definition at line 70 of file G4VFileManager.cc.

71 {
73  G4ExceptionDescription description;
74  description
75  << "Cannot set Histo directory name as its value was already used.";
76  G4Exception("G4VFileManager::SetHistoDirectoryName()",
77  "Analysis_W012", JustWarning, description);
78  return false;
79  }
80 
81  fHistoDirectoryName = dirName;
82  return true;
83 }
G4bool fLockHistoDirectoryName
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4String fHistoDirectoryName
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41

Here is the call graph for this function:

G4bool G4VFileManager::SetNtupleDirectoryName ( const G4String dirName)

Definition at line 86 of file G4VFileManager.cc.

87 {
89  G4ExceptionDescription description;
90  description
91  << "Cannot set Ntuple directory name as its value was already used.";
92  G4Exception("G4VFileManager::SetNtupleDirectoryName()",
93  "Analysis_W012", JustWarning, description);
94  return false;
95  }
96 
97  fNtupleDirectoryName = dirName;
98  return true;
99 }
G4String fNtupleDirectoryName
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
G4bool fLockNtupleDirectoryName

Here is the call graph for this function:

virtual G4bool G4VFileManager::WriteFile ( )
pure virtual

Member Data Documentation

G4String G4VFileManager::fHistoDirectoryName
protected

Definition at line 66 of file G4VFileManager.hh.

G4bool G4VFileManager::fIsOpenFile
protected

Definition at line 65 of file G4VFileManager.hh.

G4bool G4VFileManager::fLockFileName
protected

Definition at line 68 of file G4VFileManager.hh.

G4bool G4VFileManager::fLockHistoDirectoryName
protected

Definition at line 69 of file G4VFileManager.hh.

G4bool G4VFileManager::fLockNtupleDirectoryName
protected

Definition at line 70 of file G4VFileManager.hh.

G4String G4VFileManager::fNtupleDirectoryName
protected

Definition at line 67 of file G4VFileManager.hh.


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