33 #include "tools/hdf5/h2file"
35 using namespace G4Analysis;
59 const G4String& directoryName, hid_t& directory)
65 auto newDirectoryName = directoryName;
67 if ( newDirectoryName ==
"" ) {
77 newDirectoryName +=
"_";
78 newDirectoryName += directoryType;
84 message += directoryType;
89 directory = tools_H5Gcreate(
fFile, newDirectoryName, 0);
94 if ( directory < 0 ) {
97 <<
"cannot create directory " << directoryName;
106 message += directoryType;
117 const G4String& directoryName, hid_t& directory)
120 const G4String& directoryName, hid_t& directory)
124 if ( fState.GetVerboseL4() ) {
126 message += directoryType;
127 fState.GetVerboseL4()
128 ->Message(
"write", message, directoryName);
133 = tools::hdf5::write_atb(directory,
"type",
"directory");
138 <<
"cannot write directory " << directoryName;
149 if ( fState.GetVerboseL2() ) {
151 message += directoryType;
152 fState.GetVerboseL2()->Message(
"write", message, fHistoDirectoryName);
175 fFile = ::H5Fcreate(
name, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
178 description <<
" " <<
"Cannot open file " << fileName;
215 if (
fFile < 0 )
return true;