Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4Hdf5NtupleFileManager Class Reference

#include <G4Hdf5NtupleFileManager.hh>

+ Inheritance diagram for G4Hdf5NtupleFileManager:

Public Member Functions

 G4Hdf5NtupleFileManager (const G4AnalysisManagerState &state)
 
 G4Hdf5NtupleFileManager ()=delete
 
 ~G4Hdf5NtupleFileManager () override=default
 
std::shared_ptr< G4VNtupleManagerCreateNtupleManager () override
 
G4bool ActionAtOpenFile (const G4String &fileName) override
 
G4bool ActionAtWrite () override
 
G4bool ActionAtCloseFile () override
 
G4bool Reset () override
 
void SetFileManager (std::shared_ptr< G4Hdf5FileManager > fileManager)
 
std::shared_ptr< G4Hdf5NtupleManagerGetNtupleManager () const
 
- Public Member Functions inherited from G4VNtupleFileManager
 G4VNtupleFileManager (const G4AnalysisManagerState &state, G4String fileType)
 
 G4VNtupleFileManager ()=delete
 
virtual ~G4VNtupleFileManager ()=default
 
 G4VNtupleFileManager (const G4VNtupleFileManager &rhs)=delete
 
G4VNtupleFileManageroperator= (const G4VNtupleFileManager &rhs)=delete
 
virtual void SetNtupleMerging (G4bool mergeNtuples, G4int nofReducedNtupleFiles=0)
 
virtual void SetNtupleRowWise (G4bool rowWise, G4bool rowMode=true)
 
virtual void SetBasketSize (unsigned int basketSize)
 
virtual void SetBasketEntries (unsigned int basketEntries)
 
virtual void SetBookingManager (std::shared_ptr< G4NtupleBookingManager > bookingManager)
 
virtual G4bool IsNtupleMergingSupported () const
 
virtual G4NtupleMergeMode GetMergeMode () const
 
G4String GetFileType () const
 

Friends

class G4Hdf5AnalysisManager
 

Additional Inherited Members

- Protected Member Functions inherited from G4VNtupleFileManager
void Message (G4int level, const G4String &action, const G4String &objectType, const G4String &objectName="", G4bool success=true) const
 
- Protected Attributes inherited from G4VNtupleFileManager
const G4AnalysisManagerStatefState
 
G4String fFileType
 
std::shared_ptr< G4NtupleBookingManagerfBookingManager { nullptr }
 

Detailed Description

Definition at line 45 of file G4Hdf5NtupleFileManager.hh.

Constructor & Destructor Documentation

◆ G4Hdf5NtupleFileManager() [1/2]

G4Hdf5NtupleFileManager::G4Hdf5NtupleFileManager ( const G4AnalysisManagerState & state)
explicit

Definition at line 42 of file G4Hdf5NtupleFileManager.cc.

43 : G4VNtupleFileManager(state, "hdf5")
44{}
G4VNtupleFileManager()=delete

◆ G4Hdf5NtupleFileManager() [2/2]

G4Hdf5NtupleFileManager::G4Hdf5NtupleFileManager ( )
delete

◆ ~G4Hdf5NtupleFileManager()

G4Hdf5NtupleFileManager::~G4Hdf5NtupleFileManager ( )
overridedefault

Member Function Documentation

◆ ActionAtCloseFile()

G4bool G4Hdf5NtupleFileManager::ActionAtCloseFile ( )
overridevirtual

Implements G4VNtupleFileManager.

Definition at line 80 of file G4Hdf5NtupleFileManager.cc.

81{
82 auto result = true;
83
84 // Close ntuple files
85 auto ntupleVector = fNtupleManager->GetNtupleDescriptionVector();
86 for ( auto ntupleDescription : ntupleVector) {
87 result &= fFileManager->CloseNtupleFile(ntupleDescription);
88 }
89
90 return result;
91}

◆ ActionAtOpenFile()

G4bool G4Hdf5NtupleFileManager::ActionAtOpenFile ( const G4String & fileName)
overridevirtual

Implements G4VNtupleFileManager.

Definition at line 62 of file G4Hdf5NtupleFileManager.cc.

63{
64 // Create ntuples if they are booked
65 // (The files will be created with creating ntuples)
66 fNtupleManager->CreateNtuplesFromBooking(
67 fBookingManager->GetNtupleBookingVector());
68
69 return true;
70}
std::shared_ptr< G4NtupleBookingManager > fBookingManager

◆ ActionAtWrite()

G4bool G4Hdf5NtupleFileManager::ActionAtWrite ( )
overridevirtual

Implements G4VNtupleFileManager.

Definition at line 73 of file G4Hdf5NtupleFileManager.cc.

74{
75 // Nothing to be done
76 return true;
77}

◆ CreateNtupleManager()

std::shared_ptr< G4VNtupleManager > G4Hdf5NtupleFileManager::CreateNtupleManager ( )
overridevirtual

Implements G4VNtupleFileManager.

Definition at line 51 of file G4Hdf5NtupleFileManager.cc.

52{
53
54 // The managers will be deleted by the base class
55 fNtupleManager = std::make_shared<G4Hdf5NtupleManager>(fState);
56 fNtupleManager->SetFileManager(fFileManager);
57
58 return fNtupleManager;
59}
const G4AnalysisManagerState & fState

◆ GetNtupleManager()

std::shared_ptr< G4Hdf5NtupleManager > G4Hdf5NtupleFileManager::GetNtupleManager ( ) const
inline

Definition at line 81 of file G4Hdf5NtupleFileManager.hh.

82{ return fNtupleManager; }

◆ Reset()

G4bool G4Hdf5NtupleFileManager::Reset ( )
overridevirtual

Implements G4VNtupleFileManager.

Definition at line 94 of file G4Hdf5NtupleFileManager.cc.

95{
96 return fNtupleManager->Reset();
97}

◆ SetFileManager()

void G4Hdf5NtupleFileManager::SetFileManager ( std::shared_ptr< G4Hdf5FileManager > fileManager)
inline

Definition at line 75 of file G4Hdf5NtupleFileManager.hh.

77{
78 fFileManager = std::move(fileManager);
79}

Friends And Related Symbol Documentation

◆ G4Hdf5AnalysisManager

friend class G4Hdf5AnalysisManager
friend

Definition at line 47 of file G4Hdf5NtupleFileManager.hh.


The documentation for this class was generated from the following files: