Geant4-11
|
#include <G4XmlFileManager.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 (XmlNtupleDescription *ntupleDescription) |
G4bool | CloseTFile (const G4String &fileName) |
virtual G4bool | CreateFile (const G4String &fileName) final |
G4bool | CreateNtupleFile (XmlNtupleDescription *ntupleDescription) |
std::shared_ptr< std::ofstream > | CreateTFile (const G4String &fileName) |
virtual G4bool | DeleteEmptyFiles () final |
G4XmlFileManager ()=delete | |
G4XmlFileManager (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 | 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) |
virtual G4bool | SetIsEmpty (const G4String &fileName, G4bool isEmpty) final |
virtual G4bool | SetNtupleDirectoryName (const G4String &dirName) |
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) |
virtual | ~G4XmlFileManager ()=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 (XmlNtupleDescription *ntupleDescription) |
G4bool | WriteTFile (std::shared_ptr< std::ofstream > file, const G4String &fileName) |
Private Attributes | |
const G4AnalysisManagerState & | fAMState |
std::map< G4String, G4TFileInformation< std::ofstream > * > | fFileMap |
Static Private Attributes | |
static constexpr std::string_view | fkClass { "G4XmlFileManager" } |
Definition at line 50 of file G4XmlFileManager.hh.
|
explicit |
Definition at line 40 of file G4XmlFileManager.cc.
References G4VFileManager::fH1FileManager, G4VFileManager::fH2FileManager, G4VFileManager::fH3FileManager, G4VFileManager::fP1FileManager, and G4VFileManager::fP2FileManager.
|
delete |
|
virtualdefault |
|
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 95 of file G4XmlFileManager.cc.
References geant4_check_module_cycles::file.
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 61 of file G4VTFileManager.hh.
G4bool G4XmlFileManager::CloseNtupleFile | ( | XmlNtupleDescription * | ntupleDescription | ) |
Definition at line 168 of file G4XmlFileManager.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 75 of file G4XmlFileManager.cc.
References geant4_check_module_cycles::file, fkClass, and G4Analysis::Warn().
G4bool G4XmlFileManager::CreateNtupleFile | ( | XmlNtupleDescription * | ntupleDescription | ) |
Definition at line 138 of file G4XmlFileManager.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 64 of file G4XmlFileManager.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(), 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 G4CsvFileManager::GetNtupleFileName().
Definition at line 71 of file G4BaseFileManager.cc.
Definition at line 77 of file G4BaseFileManager.cc.
|
private |
Definition at line 56 of file G4XmlFileManager.cc.
References G4TNtupleDescription< NT, FT >::fFileName, G4TNtupleDescription< NT, FT >::fNtupleBooking, GetFileType(), GetNtupleFileName(), and G4Analysis::GetTnFileName().
Referenced by CloseNtupleFile(), CreateNtupleFile(), and GetNtupleFileName().
|
inherited |
Definition at line 110 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, and G4Analysis::GetPlotFileName().
|
inherited |
|
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(), G4CsvFileManager::CloseNtupleFile(), CloseNtupleFile(), G4Hdf5FileManager::CreateDirectory(), G4RootFileManager::CreateDirectory(), G4GenericFileManager::CreateFileManager(), G4CsvFileManager::CreateNtupleFile(), 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 111 of file G4XmlFileManager.cc.
References G4TFileManager< std::ofstream >::CreateTFile(), G4VTFileManager< std::ofstream >::fFile, G4BaseFileManager::fFileName, G4VFileManager::fIsOpenFile, fkClass, G4BaseFileManager::fState, G4BaseFileManager::GetFullFileName(), G4AnalysisManagerState::GetIsMaster(), G4InuclParticleNames::name(), and G4Analysis::Warn().
|
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 in G4GenericFileManager, and G4CsvFileManager.
Definition at line 61 of file G4VFileManager.cc.
References G4VFileManager::fHistoDirectoryName, G4VFileManager::fkClass, G4VFileManager::fLockDirectoryNames, and G4Analysis::Warn().
Referenced by G4GenericFileManager::SetHistoDirectoryName(), and G4CsvFileManager::SetHistoDirectoryName().
|
inlinefinalvirtualinherited |
Implements G4VFileManager.
Definition at line 57 of file G4VTFileManager.hh.
Reimplemented in G4GenericFileManager, and G4CsvFileManager.
Definition at line 74 of file G4VFileManager.cc.
References G4VFileManager::fkClass, G4VFileManager::fLockDirectoryNames, G4VFileManager::fNtupleDirectoryName, and G4Analysis::Warn().
Referenced by G4GenericFileManager::SetNtupleDirectoryName(), and G4CsvFileManager::SetNtupleDirectoryName().
|
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 88 of file G4XmlFileManager.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(), G4CsvFileManager::OpenFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), 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::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager().
|
protectedinherited |
Definition at line 103 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager().
|
protectedinherited |
Definition at line 104 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager().
|
protectedinherited |
Definition at line 96 of file G4VFileManager.hh.
Referenced by G4Hdf5FileManager::CreateFileImpl(), G4RootFileManager::CreateFileImpl(), G4VFileManager::GetHistoDirectoryName(), and G4VFileManager::SetHistoDirectoryName().
|
protectedinherited |
Definition at line 98 of file G4VFileManager.hh.
Referenced by G4GenericFileManager::CloseFiles(), G4VFileManager::IsOpenFile(), G4CsvFileManager::OpenFile(), G4GenericFileManager::OpenFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), and OpenFile().
|
staticconstexprprivate |
Definition at line 81 of file G4XmlFileManager.hh.
Referenced by CreateFileImpl(), CreateNtupleFile(), and OpenFile().
|
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::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager().
|
protectedinherited |
Definition at line 106 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager().
|
protectedinherited |
Definition at line 94 of file G4BaseFileManager.hh.
Referenced by G4RootFileManager::CreateFileImpl(), G4GenericFileManager::CreateFileManager(), G4GenericFileManager::CreateNtupleFileManager(), G4BaseFileManager::GetFileType(), G4BaseFileManager::Message(), and OpenFile().