Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4VTFileManager< FT > Class Template Reference

#include <G4VTFileManager.hh>

+ Inheritance diagram for G4VTFileManager< FT >:

Public Member Functions

 G4VTFileManager (const G4AnalysisManagerState &state)
 
 ~G4VTFileManager () override=default
 
G4bool CreateFile (const G4String &fileName) final
 
G4bool WriteFile (const G4String &fileName) final
 
G4bool CloseFile (const G4String &fileName) final
 
G4bool SetIsEmpty (const G4String &fileName, G4bool isEmpty) final
 
G4bool OpenFiles () final
 
G4bool WriteFiles () final
 
G4bool CloseFiles () final
 
G4bool DeleteEmptyFiles () final
 
void Clear () final
 
std::shared_ptr< FT > GetFile () const
 
virtual G4bool WriteFile (const G4String &fileName)=0
 
virtual G4bool CloseFile (const G4String &fileName)=0
 
- Public Member Functions inherited from G4VFileManager
 G4VFileManager (const G4AnalysisManagerState &state)
 
 G4VFileManager ()=delete
 
 ~G4VFileManager () override=default
 
virtual G4bool OpenFile (const G4String &fileName)=0
 
virtual G4bool CreateFile (const G4String &fileName)=0
 
virtual G4bool WriteFile (const G4String &fileName)=0
 
virtual G4bool CloseFile (const G4String &fileName)=0
 
virtual G4bool SetIsEmpty (const G4String &fileName, G4bool isEmpty)=0
 
virtual G4bool OpenFiles ()=0
 
virtual G4bool WriteFiles ()=0
 
virtual G4bool CloseFiles ()=0
 
virtual G4bool DeleteEmptyFiles ()=0
 
virtual void Clear ()=0
 
G4bool SetFileName (const G4String &fileName) final
 
virtual G4bool SetHistoDirectoryName (const G4String &dirName)
 
virtual G4bool SetNtupleDirectoryName (const G4String &dirName)
 
void LockDirectoryNames ()
 
void UnlockDirectoryNames ()
 
G4bool IsOpenFile () const
 
G4String GetHistoDirectoryName () const
 
G4String GetNtupleDirectoryName () const
 
G4int GetCycle () const
 
template<typename HT >
std::shared_ptr< G4VTHnFileManager< HT > > GetHnFileManager () const
 
- Public Member Functions inherited from G4BaseFileManager
 G4BaseFileManager (const G4AnalysisManagerState &state)
 
 G4BaseFileManager ()=delete
 
virtual ~G4BaseFileManager ()=default
 
virtual G4bool SetFileName (const G4String &fileName)
 
virtual G4String GetFileType () const
 
virtual G4bool HasCycles () const
 
void AddFileName (const G4String &fileName)
 
G4String GetFileName () const
 
G4String GetFullFileName (const G4String &baseFileName="", G4bool isPerThread=true) const
 
const std::vector< G4String > & GetFileNames () const
 
G4String GetHnFileName (const G4String &hnType, const G4String &hnName) const
 
G4String GetHnFileName (const G4String &fileName, G4int cycle=0) const
 
G4String GetNtupleFileName (const G4String &ntupleName, G4int cycle=0) const
 
G4String GetNtupleFileName (G4int ntupleFileNumber, G4int cycle=0) const
 
G4String GetPlotFileName () const
 
- Public Member Functions inherited from G4TFileManager< FT >
 G4TFileManager (const G4AnalysisManagerState &state)
 
 G4TFileManager ()=delete
 
virtual ~G4TFileManager ()
 
std::shared_ptr< FT > CreateTFile (const G4String &fileName)
 
G4bool WriteTFile (const G4String &fileName)
 
G4bool CloseTFile (const G4String &fileName)
 
G4bool SetIsEmpty (const G4String &fileName, G4bool isEmpty)
 
std::shared_ptr< FT > GetTFile (const G4String &fileName, G4bool warn=true) const
 
G4bool OpenFiles ()
 
G4bool WriteFiles ()
 
G4bool CloseFiles ()
 
G4bool DeleteEmptyFiles ()
 
void ClearData ()
 

Protected Attributes

std::shared_ptr< FT > fFile { nullptr }
 
- Protected Attributes inherited from G4VFileManager
G4String fHistoDirectoryName
 
G4String fNtupleDirectoryName
 
G4bool fIsOpenFile { false }
 
G4bool fLockDirectoryNames { false }
 
std::shared_ptr< G4VTHnFileManager< tools::histo::h1d > > fH1FileManager { nullptr }
 
std::shared_ptr< G4VTHnFileManager< tools::histo::h2d > > fH2FileManager { nullptr }
 
std::shared_ptr< G4VTHnFileManager< tools::histo::h3d > > fH3FileManager { nullptr }
 
std::shared_ptr< G4VTHnFileManager< tools::histo::p1d > > fP1FileManager { nullptr }
 
std::shared_ptr< G4VTHnFileManager< tools::histo::p2d > > fP2FileManager { nullptr }
 
- Protected Attributes inherited from G4BaseFileManager
const G4AnalysisManagerStatefState
 
G4String fFileName
 
std::vector< G4StringfFileNames
 

Additional Inherited Members

- Protected Member Functions inherited from G4BaseFileManager
void Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
 
- Protected Member Functions inherited from G4TFileManager< FT >
virtual std::shared_ptr< FT > CreateFileImpl (const G4String &fileName)=0
 
virtual G4bool WriteFileImpl (std::shared_ptr< FT > file)=0
 
virtual G4bool CloseFileImpl (std::shared_ptr< FT > file)=0
 
- Static Protected Attributes inherited from G4VFileManager
static constexpr std::string_view fkClass { "G4VFileManager" }
 

Detailed Description

template<typename FT>
class G4VTFileManager< FT >

Definition at line 42 of file G4VTFileManager.hh.

Constructor & Destructor Documentation

◆ G4VTFileManager()

template<typename FT >
G4VTFileManager< FT >::G4VTFileManager ( const G4AnalysisManagerState state)
inlineexplicit

Definition at line 46 of file G4VTFileManager.hh.

◆ ~G4VTFileManager()

template<typename FT >
G4VTFileManager< FT >::~G4VTFileManager ( )
overridedefault

Member Function Documentation

◆ Clear()

template<typename FT >
void G4VTFileManager< FT >::Clear
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 149 of file G4VTFileManager.hh.

◆ CloseFile() [1/2]

template<typename FT >
G4bool G4VTFileManager< FT >::CloseFile ( const G4String fileName)
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 96 of file G4VTFileManager.hh.

97{
98 return G4TFileManager<FT>::CloseTFile(fileName);
99}
G4bool CloseTFile(const G4String &fileName)

◆ CloseFile() [2/2]

template<typename FT >
virtual G4bool G4VFileManager::CloseFile ( const G4String fileName)
virtual

Implements G4VFileManager.

◆ CloseFiles()

template<typename FT >
G4bool G4VTFileManager< FT >::CloseFiles
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 128 of file G4VTFileManager.hh.

129{
130 auto result = G4TFileManager<FT>::CloseFiles();
131
132 fIsOpenFile = false;
133 fFile.reset();
134
135 return result;
136}
G4bool CloseFiles()
std::shared_ptr< FT > fFile

◆ CreateFile()

template<typename FT >
G4bool G4VTFileManager< FT >::CreateFile ( const G4String fileName)
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 80 of file G4VTFileManager.hh.

81{
82 return (G4TFileManager<FT>::CreateTFile(fileName) != nullptr);
83}

◆ DeleteEmptyFiles()

template<typename FT >
G4bool G4VTFileManager< FT >::DeleteEmptyFiles
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 141 of file G4VTFileManager.hh.

142{
144}
G4bool DeleteEmptyFiles()

◆ GetFile()

template<typename FT >
std::shared_ptr< FT > G4VTFileManager< FT >::GetFile
inline

Definition at line 157 of file G4VTFileManager.hh.

158{
159 return fFile;
160}

◆ OpenFiles()

template<typename FT >
G4bool G4VTFileManager< FT >::OpenFiles
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 112 of file G4VTFileManager.hh.

113{
115}
G4bool OpenFiles()

◆ SetIsEmpty()

template<typename FT >
G4bool G4VTFileManager< FT >::SetIsEmpty ( const G4String fileName,
G4bool  isEmpty 
)
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 104 of file G4VTFileManager.hh.

105{
106 return G4TFileManager<FT>::SetIsEmpty(fileName, isEmpty);
107}
G4bool SetIsEmpty(const G4String &fileName, G4bool isEmpty)

◆ WriteFile() [1/2]

template<typename FT >
G4bool G4VTFileManager< FT >::WriteFile ( const G4String fileName)
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 88 of file G4VTFileManager.hh.

89{
90 return G4TFileManager<FT>::WriteTFile(fileName);
91}
G4bool WriteTFile(const G4String &fileName)

◆ WriteFile() [2/2]

template<typename FT >
virtual G4bool G4VFileManager::WriteFile ( const G4String fileName)
virtual

Implements G4VFileManager.

◆ WriteFiles()

template<typename FT >
G4bool G4VTFileManager< FT >::WriteFiles
inlinefinalvirtual

Implements G4VFileManager.

Definition at line 120 of file G4VTFileManager.hh.

121{
123}
G4bool WriteFiles()

Member Data Documentation

◆ fFile

template<typename FT >
std::shared_ptr<FT> G4VTFileManager< FT >::fFile { nullptr }
protected

Definition at line 74 of file G4VTFileManager.hh.


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