Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -31,41 +31,50 @@
|
||||
#ifndef G4Hdf5RFileManager_h
|
||||
#define G4Hdf5RFileManager_h 1
|
||||
|
||||
#include "G4BaseFileManager.hh"
|
||||
#include "G4VRFileManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
#include <string_view>
|
||||
|
||||
class G4Hdf5RFileManager : public G4BaseFileManager
|
||||
using G4Hdf5File = std::tuple<hid_t, hid_t, hid_t>;
|
||||
|
||||
class G4Hdf5RFileManager : public G4VRFileManager
|
||||
{
|
||||
public:
|
||||
explicit G4Hdf5RFileManager(const G4AnalysisManagerState& state);
|
||||
virtual ~G4Hdf5RFileManager();
|
||||
G4Hdf5RFileManager() = delete;
|
||||
virtual ~G4Hdf5RFileManager() = default;
|
||||
|
||||
virtual G4String GetFileType() const final { return "hdf5"; }
|
||||
|
||||
// Methods from base class
|
||||
virtual void CloseFiles() final;
|
||||
|
||||
// Get methods
|
||||
hid_t GetRFile(const G4String& fileName, G4bool isPerThread) const;
|
||||
G4Hdf5File* GetRFile(const G4String& fileName, G4bool isPerThread);
|
||||
hid_t GetHistoRDirectory(const G4String& fileName, const G4String& dirName,
|
||||
G4bool isPerThread);
|
||||
hid_t GetNtupleRDirectory(const G4String& fileName, const G4String& dirName,
|
||||
G4bool isPerThread);
|
||||
|
||||
private:
|
||||
// constants
|
||||
static const G4String fgkDefaultDirectoryName;
|
||||
|
||||
// methods
|
||||
// Methods
|
||||
hid_t OpenRFile(const G4String& fileName, G4bool isPerThread);
|
||||
hid_t OpenDirectory(hid_t file, const G4String& directoryName);
|
||||
hid_t GetRDirectory(const G4String& directoryType,
|
||||
const G4String& fileName, const G4String& dirName,
|
||||
G4bool isPerThread);
|
||||
|
||||
// data members
|
||||
std::map<G4String, hid_t> fRFiles;
|
||||
// Static data members
|
||||
static constexpr std::string_view fkClass { "G4Hdf5RFileManager" };
|
||||
inline static const G4String fgkDefaultDirectoryName { "default" };
|
||||
|
||||
// Data members
|
||||
std::map<G4String, G4Hdf5File> fRFiles;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user