Geant4-11
|
#include <G4CsvFileManager.hh>
Public Member Functions | |
void | AddFileName (const G4String &fileName) |
virtual void | Clear () final |
void | ClearData () |
virtual G4bool | CloseFile (const G4String &fileName) final |
virtual G4bool | CloseFile (const G4String &fileName)=0 |
virtual G4bool | CloseFiles () final |
G4bool | CloseNtupleFile (CsvNtupleDescription *ntupleDescription) |
G4bool | CloseTFile (const G4String &fileName) |
virtual G4bool | CreateFile (const G4String &fileName) final |
G4bool | CreateNtupleFile (CsvNtupleDescription *ntupleDescription) |
std::shared_ptr< std::ofstream > | CreateTFile (const G4String &fileName) |
virtual G4bool | DeleteEmptyFiles () final |
G4CsvFileManager ()=delete | |
G4CsvFileManager (const G4AnalysisManagerState &state) | |
std::shared_ptr< std::ofstream > | GetFile () const |
G4String | GetFileName () const |
const std::vector< G4String > & | GetFileNames () const |
virtual G4String | GetFileType () const final |
G4String | GetFullFileName (const G4String &baseFileName="", G4bool isPerThread=true) const |
G4String | GetHistoDirectoryName () const |
template<typename HT > | |
std::shared_ptr< G4VTHnFileManager< HT > > | GetHnFileManager () const |
G4String | GetHnFileName (const G4String &hnType, const G4String &hnName) const |
G4String | GetNtupleDirectoryName () const |
G4String | GetNtupleFileName (const G4String &ntupleName) const |
G4String | GetNtupleFileName (G4int ntupleFileNumber) const |
G4String | GetPlotFileName () const |
std::shared_ptr< std::ofstream > | GetTFile (const G4String &fileName, G4bool warn=true) const |
G4bool | IsHistoDirectory () const |
G4bool | IsNtupleDirectory () const |
G4bool | IsOpenFile () const |
void | LockDirectoryNames () |
virtual G4bool | OpenFile (const G4String &fileName) final |
G4bool | OpenFiles () |
virtual G4bool | SetFileName (const G4String &fileName) final |
virtual G4bool | SetHistoDirectoryName (const G4String &dirName) final |
virtual G4bool | SetIsEmpty (const G4String &fileName, G4bool isEmpty) final |
virtual G4bool | SetNtupleDirectoryName (const G4String &dirName) final |
void | UnlockDirectoryNames () |
virtual G4bool | WriteFile (const G4String &fileName) final |
virtual G4bool | WriteFile (const G4String &fileName)=0 |
virtual G4bool | WriteFiles () final |
G4bool | WriteTFile (const G4String &fileName) |
~G4CsvFileManager ()=default | |
Protected Member Functions | |
virtual G4bool | CloseFileImpl (std::shared_ptr< std::ofstream > file) final |
virtual std::shared_ptr< std::ofstream > | CreateFileImpl (const G4String &fileName) final |
void | Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const |
virtual G4bool | WriteFileImpl (std::shared_ptr< std::ofstream > file) final |
Protected Attributes | |
std::shared_ptr< std::ofstream > | fFile |
G4String | fFileName |
std::vector< G4String > | fFileNames |
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 } |
G4String | fHistoDirectoryName |
G4bool | fIsOpenFile { false } |
G4bool | fLockDirectoryNames { false } |
G4String | fNtupleDirectoryName |
std::shared_ptr< G4VTHnFileManager< tools::histo::p1d > > | fP1FileManager { nullptr } |
std::shared_ptr< G4VTHnFileManager< tools::histo::p2d > > | fP2FileManager { nullptr } |
const G4AnalysisManagerState & | fState |
Private Member Functions | |
G4bool | CloseTFile (std::shared_ptr< std::ofstream > file, const G4String &fileName) |
G4bool | DeleteEmptyFile (const G4String &fileName) |
void | FileNotFoundWarning (const G4String &fileName, std::string_view functionName) const |
G4TFileInformation< std::ofstream > * | GetFileInfoInFunction (const G4String &fileName, std::string_view functionName, G4bool warn=true) const |
std::shared_ptr< std::ofstream > | GetFileInFunction (const G4String &fileName, std::string_view functionName, G4bool warn=true) const |
G4String | GetNtupleFileName (CsvNtupleDescription *ntupleDescription) |
G4bool | WriteTFile (std::shared_ptr< std::ofstream > file, const G4String &fileName) |
Private Attributes | |
const G4AnalysisManagerState & | fAMState |
std::map< G4String, G4TFileInformation< std::ofstream > * > | fFileMap |
G4bool | fIsHistoDirectory { false } |
G4bool | fIsNtupleDirectory { false } |
Static Private Attributes | |
static constexpr std::string_view | fkClass { "G4CsvFileManager" } |
Definition at line 45 of file G4CsvFileManager.hh.
|
explicit |
Definition at line 39 of file G4CsvFileManager.cc.
References G4VFileManager::fH1FileManager, G4VFileManager::fH2FileManager, G4VFileManager::fH3FileManager, G4VFileManager::fP1FileManager, and G4VFileManager::fP2FileManager.
|
delete |
|
default |
|
inherited |
Definition at line 44 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileNames, and G4InuclParticleNames::name().
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 65 of file G4VTFileManager.hh.
|
inherited |
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 56 of file G4VTFileManager.hh.
Implements G4VFileManager.
|
finalprotectedvirtual |
Implements G4TFileManager< std::ofstream >.
Definition at line 98 of file G4CsvFileManager.cc.
References geant4_check_module_cycles::file.
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 61 of file G4VTFileManager.hh.
G4bool G4CsvFileManager::CloseNtupleFile | ( | CsvNtupleDescription * | ntupleDescription | ) |
Definition at line 184 of file G4CsvFileManager.cc.
References G4TFileManager< std::ofstream >::CloseTFile(), G4TNtupleDescription< NT, FT >::fFile, G4TNtupleDescription< NT, FT >::fHasFill, GetNtupleFileName(), G4Analysis::kVL2, G4Analysis::kVL4, G4BaseFileManager::Message(), and G4VTFileManager< std::ofstream >::SetIsEmpty().
|
inherited |
|
privateinherited |
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 54 of file G4VTFileManager.hh.
|
finalprotectedvirtual |
Implements G4TFileManager< std::ofstream >.
Definition at line 79 of file G4CsvFileManager.cc.
References geant4_check_module_cycles::file, fkClass, and G4Analysis::Warn().
G4bool G4CsvFileManager::CreateNtupleFile | ( | CsvNtupleDescription * | ntupleDescription | ) |
Definition at line 154 of file G4CsvFileManager.cc.
References G4TFileManager< std::ofstream >::CreateTFile(), G4TNtupleDescription< NT, FT >::fFile, G4TNtupleDescription< NT, FT >::fFileName, fkClass, G4Analysis::GetBaseName(), G4Analysis::GetExtension(), GetNtupleFileName(), G4TFileManager< std::ofstream >::GetTFile(), G4Analysis::kVL2, G4Analysis::kVL4, G4BaseFileManager::Message(), and G4Analysis::Warn().
|
inherited |
|
privateinherited |
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 62 of file G4VTFileManager.hh.
|
privateinherited |
|
inlineinherited |
Definition at line 68 of file G4VTFileManager.hh.
|
privateinherited |
|
privateinherited |
|
inlineinherited |
Definition at line 105 of file G4BaseFileManager.hh.
References G4BaseFileManager::fFileName.
|
inlineinherited |
Definition at line 109 of file G4BaseFileManager.hh.
References G4BaseFileManager::fFileNames.
Referenced by G4GenericFileManager::OpenFiles().
|
inlinefinalvirtual |
Reimplemented from G4BaseFileManager.
Definition at line 62 of file G4CsvFileManager.hh.
Referenced by GetNtupleFileName().
|
inherited |
Definition at line 63 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, G4Analysis::GetBaseName(), and G4InuclParticleNames::name().
Referenced by G4Hdf5FileManager::GetNtupleFileName(), G4RootFileManager::GetNtupleFileName(), G4XmlRFileManager::GetRFile(), G4Hdf5RFileManager::GetRFile(), G4RootRFileManager::GetRFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), G4XmlFileManager::OpenFile(), G4XmlRFileManager::OpenRFile(), G4Hdf5RFileManager::OpenRFile(), and G4RootRFileManager::OpenRFile().
|
inlineinherited |
Definition at line 120 of file G4VFileManager.hh.
References G4VFileManager::fHistoDirectoryName.
Referenced by G4GenericFileManager::CreateFileManager().
|
inherited |
|
inherited |
Definition at line 91 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, G4BaseFileManager::GetFileType(), and G4Analysis::GetHnFileName().
|
inlineinherited |
Definition at line 123 of file G4VFileManager.hh.
References G4VFileManager::fNtupleDirectoryName.
Referenced by G4GenericFileManager::CreateFileManager(), and GetNtupleFileName().
Definition at line 71 of file G4BaseFileManager.cc.
References G4Threading::G4GetThreadId(), and G4InuclParticleNames::name().
|
private |
Definition at line 55 of file G4CsvFileManager.cc.
References G4TNtupleDescription< NT, FT >::fFileName, G4TNtupleDescription< NT, FT >::fNtupleBooking, GetFileType(), G4VFileManager::GetNtupleDirectoryName(), GetNtupleFileName(), G4Analysis::GetTnFileName(), and IsNtupleDirectory().
Referenced by CloseNtupleFile(), CreateNtupleFile(), and GetNtupleFileName().
Definition at line 77 of file G4BaseFileManager.cc.
|
inherited |
Definition at line 110 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, and G4Analysis::GetPlotFileName().
|
inherited |
|
inline |
|
inline |
Definition at line 94 of file G4CsvFileManager.hh.
References fIsNtupleDirectory.
Referenced by GetNtupleFileName().
|
inlineinherited |
|
inlineinherited |
Definition at line 111 of file G4VFileManager.hh.
References G4VFileManager::fLockDirectoryNames.
Referenced by G4GenericFileManager::OpenFile(), G4Hdf5FileManager::OpenFile(), and G4RootFileManager::OpenFile().
|
inlineprotectedinherited |
Definition at line 113 of file G4BaseFileManager.hh.
References geant4_check_module_cycles::action, G4BaseFileManager::fState, and G4AnalysisManagerState::Message().
Referenced by G4GenericFileManager::CloseFiles(), CloseNtupleFile(), G4XmlFileManager::CloseNtupleFile(), G4Hdf5FileManager::CreateDirectory(), G4RootFileManager::CreateDirectory(), G4GenericFileManager::CreateFileManager(), CreateNtupleFile(), G4XmlFileManager::CreateNtupleFile(), G4GenericFileManager::DeleteEmptyFiles(), G4Hdf5RFileManager::OpenDirectory(), G4GenericFileManager::OpenFile(), G4GenericFileManager::OpenFiles(), G4CsvRFileManager::OpenRFile(), G4XmlRFileManager::OpenRFile(), G4Hdf5RFileManager::OpenRFile(), G4RootRFileManager::OpenRFile(), and G4GenericFileManager::WriteFiles().
Implements G4VFileManager.
Definition at line 113 of file G4CsvFileManager.cc.
References G4BaseFileManager::fFileName, and G4VFileManager::fIsOpenFile.
|
inherited |
Reimplemented from G4BaseFileManager.
Definition at line 45 of file G4VFileManager.cc.
References G4VFileManager::fkClass, G4Analysis::GetBaseName(), G4Analysis::GetExtension(), G4BaseFileManager::GetFileType(), G4InuclParticleNames::name(), G4BaseFileManager::SetFileName(), and G4Analysis::Warn().
Referenced by G4GenericFileManager::OpenFile().
Reimplemented from G4VFileManager.
Definition at line 124 of file G4CsvFileManager.cc.
References fIsHistoDirectory, fkClass, G4VFileManager::SetHistoDirectoryName(), and G4Analysis::Warn().
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 57 of file G4VTFileManager.hh.
Reimplemented from G4VFileManager.
Definition at line 139 of file G4CsvFileManager.cc.
References fIsNtupleDirectory, fkClass, G4VFileManager::SetNtupleDirectoryName(), and G4Analysis::Warn().
|
inlineinherited |
Definition at line 114 of file G4VFileManager.hh.
References G4VFileManager::fLockDirectoryNames.
Referenced by G4GenericFileManager::Clear().
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 55 of file G4VTFileManager.hh.
Implements G4VFileManager.
|
finalprotectedvirtual |
Implements G4TFileManager< std::ofstream >.
Definition at line 91 of file G4CsvFileManager.cc.
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 60 of file G4VTFileManager.hh.
|
inherited |
|
privateinherited |
|
privateinherited |
Definition at line 87 of file G4TFileManager.hh.
|
protectedinherited |
Definition at line 73 of file G4VTFileManager.hh.
|
privateinherited |
Definition at line 88 of file G4TFileManager.hh.
|
protectedinherited |
Definition at line 95 of file G4BaseFileManager.hh.
Referenced by G4BaseFileManager::GetFileName(), G4BaseFileManager::GetFullFileName(), G4BaseFileManager::GetHnFileName(), G4BaseFileManager::GetNtupleFileName(), G4RootFileManager::GetNtupleFileName(), G4BaseFileManager::GetPlotFileName(), OpenFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), G4XmlFileManager::OpenFile(), and G4BaseFileManager::SetFileName().
|
protectedinherited |
Definition at line 96 of file G4BaseFileManager.hh.
Referenced by G4BaseFileManager::AddFileName(), and G4BaseFileManager::GetFileNames().
|
protectedinherited |
Definition at line 102 of file G4VFileManager.hh.
Referenced by G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 103 of file G4VFileManager.hh.
Referenced by G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 104 of file G4VFileManager.hh.
Referenced by G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 96 of file G4VFileManager.hh.
Referenced by G4Hdf5FileManager::CreateFileImpl(), G4RootFileManager::CreateFileImpl(), G4VFileManager::GetHistoDirectoryName(), and G4VFileManager::SetHistoDirectoryName().
|
private |
Definition at line 85 of file G4CsvFileManager.hh.
Referenced by IsHistoDirectory(), and SetHistoDirectoryName().
|
private |
Definition at line 86 of file G4CsvFileManager.hh.
Referenced by IsNtupleDirectory(), and SetNtupleDirectoryName().
|
protectedinherited |
Definition at line 98 of file G4VFileManager.hh.
Referenced by G4GenericFileManager::CloseFiles(), G4VFileManager::IsOpenFile(), OpenFile(), G4GenericFileManager::OpenFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), and G4XmlFileManager::OpenFile().
|
staticconstexprprivate |
Definition at line 82 of file G4CsvFileManager.hh.
Referenced by CreateFileImpl(), CreateNtupleFile(), SetHistoDirectoryName(), and SetNtupleDirectoryName().
|
protectedinherited |
Definition at line 99 of file G4VFileManager.hh.
Referenced by G4VFileManager::LockDirectoryNames(), G4VFileManager::SetHistoDirectoryName(), G4VFileManager::SetNtupleDirectoryName(), and G4VFileManager::UnlockDirectoryNames().
|
protectedinherited |
Definition at line 97 of file G4VFileManager.hh.
Referenced by G4Hdf5FileManager::CreateFileImpl(), G4RootFileManager::CreateFileImpl(), G4VFileManager::GetNtupleDirectoryName(), and G4VFileManager::SetNtupleDirectoryName().
|
protectedinherited |
Definition at line 105 of file G4VFileManager.hh.
Referenced by G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 106 of file G4VFileManager.hh.
Referenced by G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 94 of file G4BaseFileManager.hh.
Referenced by G4RootFileManager::CreateFileImpl(), G4GenericFileManager::CreateFileManager(), G4GenericFileManager::CreateNtupleFileManager(), G4BaseFileManager::GetFileType(), G4BaseFileManager::Message(), and G4XmlFileManager::OpenFile().