Geant4-11
|
#include <G4GenericFileManager.hh>
Public Member Functions | |
void | AddFileName (const G4String &fileName) |
virtual void | Clear () final |
virtual G4bool | CloseFile (const G4String &fileName) final |
virtual G4bool | CloseFiles () final |
virtual G4bool | CreateFile (const G4String &fileName) final |
std::shared_ptr< G4VNtupleFileManager > | CreateNtupleFileManager (G4AnalysisOutput output) |
virtual G4bool | DeleteEmptyFiles () final |
G4GenericFileManager (const G4AnalysisManagerState &state) | |
G4String | GetDefaultFileType () const |
std::shared_ptr< G4VFileManager > | GetFileManager (const G4String &fileName) |
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 |
G4bool | IsOpenFile () const |
void | LockDirectoryNames () |
virtual G4bool | OpenFile (const G4String &fileName) final |
virtual G4bool | OpenFiles () final |
void | SetDefaultFileType (const G4String &value) |
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 | WriteFiles () final |
template<typename HT > | |
G4bool | WriteTExtra (const G4String &fileName, HT *ht, const G4String &htName) |
virtual | ~G4GenericFileManager ()=default |
Protected Member Functions | |
void | Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const |
Protected Attributes | |
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 | |
void | CreateFileManager (G4AnalysisOutput output) |
std::shared_ptr< G4VFileManager > | GetFileManager (G4AnalysisOutput output) const |
Private Attributes | |
std::shared_ptr< G4CsvFileManager > | fCsvFileManager { nullptr } |
std::shared_ptr< G4VFileManager > | fDefaultFileManager { nullptr } |
G4String | fDefaultFileType |
std::vector< std::shared_ptr< G4VFileManager > > | fFileManagers |
G4bool | fHdf5Warn { true } |
std::shared_ptr< G4RootFileManager > | fRootFileManager { nullptr } |
std::shared_ptr< G4XmlFileManager > | fXmlFileManager { nullptr } |
Static Private Attributes | |
static constexpr std::string_view | fkClass { "G4GenericFileManager" } |
Definition at line 52 of file G4GenericFileManager.hh.
|
explicit |
Definition at line 62 of file G4GenericFileManager.cc.
|
virtualdefault |
|
inherited |
Definition at line 44 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileNames, and G4InuclParticleNames::name().
|
finalvirtual |
Implements G4VFileManager.
Definition at line 292 of file G4GenericFileManager.cc.
References fFileManagers, and G4VFileManager::UnlockDirectoryNames().
Implements G4VFileManager.
Definition at line 333 of file G4GenericFileManager.cc.
References fHdf5Warn, anonymous_namespace{G4GenericFileManager.cc}::FileManagerWarning(), fkClass, and GetFileManager().
|
finalvirtual |
Implements G4VFileManager.
Definition at line 246 of file G4GenericFileManager.cc.
References fFileManagers, G4VFileManager::fIsOpenFile, G4Analysis::kVL3, G4Analysis::kVL4, and G4BaseFileManager::Message().
Implements G4VFileManager.
Definition at line 305 of file G4GenericFileManager.cc.
References fHdf5Warn, anonymous_namespace{G4GenericFileManager.cc}::FileManagerWarning(), fkClass, and GetFileManager().
|
private |
Definition at line 71 of file G4GenericFileManager.cc.
References anonymous_namespace{G4MTcoutDestination.cc}::empty, fCsvFileManager, fFileManagers, fHdf5Warn, fkClass, fRootFileManager, G4BaseFileManager::fState, fXmlFileManager, G4VFileManager::GetHistoDirectoryName(), G4VFileManager::GetNtupleDirectoryName(), G4Analysis::GetOutputName(), kCsv, kHdf5, kNone, kRoot, G4Analysis::kVL3, G4Analysis::kVL4, kXml, G4BaseFileManager::Message(), and G4Analysis::Warn().
Referenced by CreateNtupleFileManager(), and GetFileManager().
std::shared_ptr< G4VNtupleFileManager > G4GenericFileManager::CreateNtupleFileManager | ( | G4AnalysisOutput | output | ) |
Definition at line 401 of file G4GenericFileManager.cc.
References CreateFileManager(), fCsvFileManager, fkClass, fRootFileManager, G4BaseFileManager::fState, fXmlFileManager, GetFileManager(), G4Analysis::GetOutputName(), kCsv, kHdf5, kNone, kRoot, kXml, and G4Analysis::Warn().
|
finalvirtual |
Implements G4VFileManager.
Definition at line 270 of file G4GenericFileManager.cc.
References fFileManagers, G4Analysis::kVL3, G4Analysis::kVL4, and G4BaseFileManager::Message().
G4String G4GenericFileManager::GetDefaultFileType | ( | ) | const |
std::shared_ptr< G4VFileManager > G4GenericFileManager::GetFileManager | ( | const G4String & | fileName | ) |
Definition at line 134 of file G4GenericFileManager.cc.
References CreateFileManager(), fDefaultFileType, fkClass, G4Analysis::GetExtension(), GetFileManager(), G4Analysis::GetOutput(), kNone, and G4Analysis::Warn().
Referenced by CloseFile(), CreateFile(), CreateNtupleFileManager(), GetFileManager(), OpenFile(), OpenFiles(), SetIsEmpty(), and WriteFile().
|
private |
Definition at line 127 of file G4GenericFileManager.cc.
References fFileManagers.
|
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 OpenFiles().
|
inlinefinalvirtual |
Reimplemented from G4BaseFileManager.
Definition at line 79 of file G4GenericFileManager.hh.
|
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 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 CreateFileManager(), and G4CsvFileManager::GetNtupleFileName().
Definition at line 98 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, G4BaseFileManager::GetFileType(), and G4Analysis::GetNtupleFileName().
Definition at line 104 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, G4BaseFileManager::GetFileType(), and G4Analysis::GetNtupleFileName().
|
inherited |
Definition at line 110 of file G4BaseFileManager.cc.
References G4BaseFileManager::fFileName, and G4Analysis::GetPlotFileName().
|
inlineinherited |
|
inlineinherited |
Definition at line 111 of file G4VFileManager.hh.
References G4VFileManager::fLockDirectoryNames.
Referenced by 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 CloseFiles(), G4CsvFileManager::CloseNtupleFile(), G4XmlFileManager::CloseNtupleFile(), G4Hdf5FileManager::CreateDirectory(), G4RootFileManager::CreateDirectory(), CreateFileManager(), G4CsvFileManager::CreateNtupleFile(), G4XmlFileManager::CreateNtupleFile(), DeleteEmptyFiles(), G4Hdf5RFileManager::OpenDirectory(), OpenFile(), OpenFiles(), G4CsvRFileManager::OpenRFile(), G4XmlRFileManager::OpenRFile(), G4Hdf5RFileManager::OpenRFile(), G4RootRFileManager::OpenRFile(), and WriteFiles().
Implements G4VFileManager.
Definition at line 164 of file G4GenericFileManager.cc.
References fDefaultFileManager, fDefaultFileType, G4VFileManager::fIsOpenFile, fkClass, GetFileManager(), G4Analysis::kVL1, G4Analysis::kVL4, G4VFileManager::LockDirectoryNames(), G4BaseFileManager::Message(), G4VFileManager::SetFileName(), and G4Analysis::Warn().
|
finalvirtual |
Definition at line 199 of file G4GenericFileManager.cc.
References fHdf5Warn, anonymous_namespace{G4GenericFileManager.cc}::FileManagerWarning(), fkClass, GetFileManager(), G4BaseFileManager::GetFileNames(), G4Analysis::kVL3, G4Analysis::kVL4, and G4BaseFileManager::Message().
void G4GenericFileManager::SetDefaultFileType | ( | const G4String & | value | ) |
Definition at line 385 of file G4GenericFileManager.cc.
References fDefaultFileType, fkClass, G4Analysis::GetOutput(), kNone, and G4Analysis::Warn().
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 OpenFile().
Reimplemented from G4VFileManager.
Definition at line 359 of file G4GenericFileManager.cc.
References fFileManagers, and G4VFileManager::SetHistoDirectoryName().
Implements G4VFileManager.
Definition at line 347 of file G4GenericFileManager.cc.
References fHdf5Warn, anonymous_namespace{G4GenericFileManager.cc}::FileManagerWarning(), fkClass, and GetFileManager().
Reimplemented from G4VFileManager.
Definition at line 372 of file G4GenericFileManager.cc.
References fFileManagers, and G4VFileManager::SetNtupleDirectoryName().
|
inlineinherited |
Definition at line 114 of file G4VFileManager.hh.
References G4VFileManager::fLockDirectoryNames.
Referenced by Clear().
Implements G4VFileManager.
Definition at line 319 of file G4GenericFileManager.cc.
References fHdf5Warn, anonymous_namespace{G4GenericFileManager.cc}::FileManagerWarning(), fkClass, and GetFileManager().
|
finalvirtual |
Implements G4VFileManager.
Definition at line 224 of file G4GenericFileManager.cc.
References fFileManagers, G4Analysis::kVL3, G4Analysis::kVL4, and G4BaseFileManager::Message().
G4bool G4GenericFileManager::WriteTExtra | ( | const G4String & | fileName, |
HT * | ht, | ||
const G4String & | htName | ||
) |
|
private |
Definition at line 112 of file G4GenericFileManager.hh.
Referenced by CreateFileManager(), and CreateNtupleFileManager().
|
private |
Definition at line 107 of file G4GenericFileManager.hh.
Referenced by OpenFile().
|
private |
Definition at line 106 of file G4GenericFileManager.hh.
Referenced by GetFileManager(), OpenFile(), and SetDefaultFileType().
|
private |
Definition at line 108 of file G4GenericFileManager.hh.
Referenced by Clear(), CloseFiles(), CreateFileManager(), DeleteEmptyFiles(), GetFileManager(), SetHistoDirectoryName(), SetNtupleDirectoryName(), and WriteFiles().
|
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(), 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::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 103 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
protectedinherited |
Definition at line 104 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
private |
Definition at line 118 of file G4GenericFileManager.hh.
Referenced by CloseFile(), CreateFile(), CreateFileManager(), OpenFiles(), SetIsEmpty(), and WriteFile().
|
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 CloseFiles(), G4VFileManager::IsOpenFile(), G4CsvFileManager::OpenFile(), OpenFile(), G4Hdf5FileManager::OpenFile(), G4RootFileManager::OpenFile(), and G4XmlFileManager::OpenFile().
|
staticconstexprprivate |
Definition at line 101 of file G4GenericFileManager.hh.
Referenced by CloseFile(), CreateFile(), CreateFileManager(), CreateNtupleFileManager(), GetFileManager(), OpenFile(), OpenFiles(), SetDefaultFileType(), SetIsEmpty(), and WriteFile().
|
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::G4XmlFileManager().
|
protectedinherited |
Definition at line 106 of file G4VFileManager.hh.
Referenced by G4CsvFileManager::G4CsvFileManager(), G4Hdf5FileManager::G4Hdf5FileManager(), G4RootFileManager::G4RootFileManager(), and G4XmlFileManager::G4XmlFileManager().
|
private |
Definition at line 116 of file G4GenericFileManager.hh.
Referenced by CreateFileManager(), and CreateNtupleFileManager().
|
protectedinherited |
Definition at line 94 of file G4BaseFileManager.hh.
Referenced by G4RootFileManager::CreateFileImpl(), CreateFileManager(), CreateNtupleFileManager(), G4BaseFileManager::GetFileType(), G4BaseFileManager::Message(), and G4XmlFileManager::OpenFile().
|
private |
Definition at line 117 of file G4GenericFileManager.hh.
Referenced by CreateFileManager(), and CreateNtupleFileManager().