Import Geant4 11.0.0 source tree
This commit is contained in:
committed by
Ben Morgan
parent
6399a014b6
commit
80e2389dd8
@@ -25,7 +25,7 @@
|
||||
//
|
||||
|
||||
// The main manager for Root analysis reader.
|
||||
// It delegates most of functions to the object specific managers.
|
||||
// It delegates most of functions to the object specific managers.
|
||||
|
||||
// Author: Ivana Hrivnacova, 09/04/2014 (ivana@ipno.in2p3.fr)
|
||||
|
||||
@@ -35,66 +35,51 @@
|
||||
#include "G4ToolsAnalysisReader.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/histo/h1d"
|
||||
#include "tools/histo/h2d"
|
||||
#include "tools/histo/h3d"
|
||||
#include "tools/histo/p1d"
|
||||
#include "tools/histo/p2d"
|
||||
#include "tools/rroot/ntuple"
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
|
||||
class G4RootAnalysisReader;
|
||||
class G4RootRFileManager;
|
||||
class G4H1ToolsManager;
|
||||
class G4H2ToolsManager;
|
||||
class G4H3ToolsManager;
|
||||
class G4P1ToolsManager;
|
||||
class G4P2ToolsManager;
|
||||
class G4RootRNtupleManager;
|
||||
|
||||
template <class T>
|
||||
class G4ThreadLocalSingleton;
|
||||
|
||||
class G4RootAnalysisReader : public G4ToolsAnalysisReader
|
||||
{
|
||||
friend class G4ThreadLocalSingleton<G4RootAnalysisReader>;
|
||||
|
||||
public:
|
||||
explicit G4RootAnalysisReader(G4bool isMaster = true);
|
||||
virtual ~G4RootAnalysisReader();
|
||||
|
||||
// static methods
|
||||
|
||||
// Static methods
|
||||
static G4RootAnalysisReader* Instance();
|
||||
|
||||
|
||||
// Access methods
|
||||
tools::rroot::ntuple* GetNtuple() const;
|
||||
tools::rroot::ntuple* GetNtuple(G4int ntupleId) const;
|
||||
using G4VAnalysisReader::GetNtuple;
|
||||
|
||||
protected:
|
||||
// virtual methods from base class
|
||||
virtual G4int ReadH1Impl(const G4String& h1Name, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4int ReadH2Impl(const G4String& h2Name, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4int ReadH3Impl(const G4String& h3Name, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4int ReadP1Impl(const G4String& p1Name, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4int ReadP2Impl(const G4String& p2Name, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4int ReadNtupleImpl(const G4String& ntupleName, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
|
||||
private:
|
||||
// static data members
|
||||
static G4RootAnalysisReader* fgMasterInstance;
|
||||
static G4ThreadLocal G4RootAnalysisReader* fgInstance;
|
||||
|
||||
// methods
|
||||
//
|
||||
tools::rroot::buffer* GetBuffer(
|
||||
const G4String& fileName,
|
||||
const G4String& name,
|
||||
const G4String& inFunction);
|
||||
protected:
|
||||
G4RootAnalysisReader();
|
||||
|
||||
// // Virtual methods from base class
|
||||
virtual G4bool CloseFilesImpl(G4bool reset) final;
|
||||
|
||||
private:
|
||||
// Static data members
|
||||
inline static G4RootAnalysisReader* fgMasterInstance { nullptr };
|
||||
|
||||
// Methods
|
||||
G4bool Reset();
|
||||
|
||||
// data members
|
||||
G4RootRNtupleManager* fNtupleManager;
|
||||
G4RootRFileManager* fFileManager;
|
||||
// Static data members
|
||||
static constexpr std::string_view fkClass { "G4RootAnalysisReader" };
|
||||
|
||||
// Data members
|
||||
std::shared_ptr<G4RootRNtupleManager> fNtupleManager { nullptr };
|
||||
std::shared_ptr<G4RootRFileManager> fFileManager { nullptr };
|
||||
};
|
||||
|
||||
#include "G4RootAnalysisReader.icc"
|
||||
|
||||
Reference in New Issue
Block a user