Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4RootAnalysisManager.hh 92972 2015-09-23 14:36:03Z gcosmo $
|
||||
// $Id: G4RootAnalysisManager.hh 100648 2016-10-31 10:06:45Z gcosmo $
|
||||
|
||||
// The main manager for Root analysis.
|
||||
// It delegates most of functions to the object specific managers.
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
class G4RootFileManager;
|
||||
class G4RootNtupleManager;
|
||||
class G4RootMainNtupleManager;
|
||||
class G4RootPNtupleManager;
|
||||
|
||||
namespace tools {
|
||||
namespace wroot {
|
||||
@@ -50,6 +52,12 @@ class directory;
|
||||
}
|
||||
}
|
||||
|
||||
enum class G4NtupleMergeMode {
|
||||
kNone,
|
||||
kMain,
|
||||
kSlave
|
||||
};
|
||||
|
||||
class G4RootAnalysisManager : public G4ToolsAnalysisManager
|
||||
{
|
||||
public:
|
||||
@@ -69,7 +77,12 @@ class G4RootAnalysisManager : public G4ToolsAnalysisManager
|
||||
std::vector<tools::wroot::ntuple*>::iterator EndNtuple();
|
||||
std::vector<tools::wroot::ntuple*>::const_iterator BeginConstNtuple() const;
|
||||
std::vector<tools::wroot::ntuple*>::const_iterator EndConstNtuple() const;
|
||||
|
||||
|
||||
// MT/MPI
|
||||
void SetNtupleMerging(G4bool mergeNtuples,
|
||||
G4int nofReducedNtupleFiles = 0,
|
||||
unsigned int basketSize = fgkDefaultBasketSize);
|
||||
|
||||
protected:
|
||||
// virtual methods from base class
|
||||
virtual G4bool OpenFileImpl(const G4String& fileName) final;
|
||||
@@ -78,11 +91,19 @@ class G4RootAnalysisManager : public G4ToolsAnalysisManager
|
||||
virtual G4bool IsOpenFileImpl() const final;
|
||||
|
||||
private:
|
||||
// constants
|
||||
static constexpr unsigned int fgkDefaultBasketSize = 32000;
|
||||
|
||||
// static data members
|
||||
static G4RootAnalysisManager* fgMasterInstance;
|
||||
static G4ThreadLocal G4RootAnalysisManager* fgInstance;
|
||||
|
||||
// methods
|
||||
void SetNtupleMergingMode(G4bool mergeNtuples, G4int nofNtupleFiles);
|
||||
void ClearNtupleManagers();
|
||||
void CreateNtupleManagers();
|
||||
G4int GetNtupleFileNumber();
|
||||
|
||||
template <typename T>
|
||||
G4bool WriteT(const std::vector<T*>& htVector,
|
||||
const std::vector<G4HnInformation*>& hnVector,
|
||||
@@ -93,11 +114,15 @@ class G4RootAnalysisManager : public G4ToolsAnalysisManager
|
||||
G4bool WriteH3();
|
||||
G4bool WriteP1();
|
||||
G4bool WriteP2();
|
||||
G4bool WriteNtuple();
|
||||
G4bool Reset();
|
||||
|
||||
// data members
|
||||
G4RootNtupleManager* fNtupleManager;
|
||||
std::shared_ptr<G4RootFileManager> fFileManager;
|
||||
// data members
|
||||
G4int fNofNtupleFiles;
|
||||
G4NtupleMergeMode fNtupleMergeMode;
|
||||
G4RootNtupleManager* fNtupleManager;
|
||||
G4RootPNtupleManager* fSlaveNtupleManager;
|
||||
std::shared_ptr<G4RootFileManager> fFileManager;
|
||||
};
|
||||
|
||||
#include "G4RootAnalysisManager.icc"
|
||||
|
||||
Reference in New Issue
Block a user