34 #include "tools/hdf5/h2file"
36 using namespace G4Analysis;
60 const G4String& directoryName, hid_t& directory)
66 auto newDirectoryName = directoryName;
68 if ( newDirectoryName ==
"" ) {
78 newDirectoryName +=
"_";
79 newDirectoryName += directoryType;
85 message += directoryType;
90 directory = tools_H5Gcreate(
fFile, newDirectoryName, 0);
95 if ( directory < 0 ) {
98 <<
"cannot create directory " << directoryName;
107 message += directoryType;
118 const G4String& directoryName, hid_t& directory)
121 const G4String& directoryName, hid_t& directory)
125 if ( fState.GetVerboseL4() ) {
127 message += directoryType;
128 fState.GetVerboseL4()
129 ->Message(
"write", message, directoryName);
134 = tools::hdf5::write_atb(directory,
"type",
"directory");
139 <<
"cannot write directory " << directoryName;
150 if ( fState.GetVerboseL2() ) {
152 message += directoryType;
153 fState.GetVerboseL2()->Message(
"write", message, fHistoDirectoryName);
176 fFile = ::H5Fcreate(
name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
179 description <<
" " <<
"Cannot open file " << fileName;
216 if (
fFile < 0 )
return true;
const G4AnalysisVerbose * GetVerboseL2() const
std::ostringstream G4ExceptionDescription
G4bool WriteHistoDirectory()
void message(RunManager *runmanager)
G4bool fLockHistoDirectoryName
static const G4String fgkDefaultDirectoryName
G4String GetFullFileName(const G4String &baseFileName="", G4bool isPerThread=true) const
G4bool fLockNtupleDirectoryName
G4bool WriteDirectory(const G4String &directoryType, const G4String &directoryName, hid_t &directory)
G4bool CreateDirectory(const G4String &directoryType, const G4String &directoryName, hid_t &directory)
G4String fHistoDirectoryName
const G4AnalysisVerbose * GetVerboseL4() const
const G4AnalysisManagerState & fState
G4double G4ParticleHPJENDLHEData::G4double result
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4Hdf5FileManager(const G4AnalysisManagerState &state)
G4String fNtupleDirectoryName
void Message(const G4String &action, const G4String &object, const G4String &objectName, G4bool success=true) const
virtual G4bool OpenFile(const G4String &fileName) final
virtual G4bool CloseFile() final
G4bool WriteNtupleDirectory()
virtual G4bool WriteFile() final
const G4AnalysisVerbose * GetVerboseL1() const