Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
#include "G4ToolsAnalysisManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
@@ -58,14 +58,14 @@ class G4Hdf5AnalysisManager : public G4ToolsAnalysisManager
|
||||
static G4bool IsInstance();
|
||||
|
||||
// Access methods
|
||||
tools::hdf5::ntuple* GetNtuple() const;
|
||||
tools::hdf5::ntuple* GetNtuple(G4int ntupleId) const;
|
||||
toolx::hdf5::ntuple* GetNtuple() const;
|
||||
toolx::hdf5::ntuple* GetNtuple(G4int ntupleId) const;
|
||||
|
||||
// Iterators
|
||||
std::vector<tools::hdf5::ntuple*>::iterator BeginNtuple();
|
||||
std::vector<tools::hdf5::ntuple*>::iterator EndNtuple();
|
||||
std::vector<tools::hdf5::ntuple*>::const_iterator BeginConstNtuple() const;
|
||||
std::vector<tools::hdf5::ntuple*>::const_iterator EndConstNtuple() const;
|
||||
std::vector<toolx::hdf5::ntuple*>::iterator BeginNtuple();
|
||||
std::vector<toolx::hdf5::ntuple*>::iterator EndNtuple();
|
||||
std::vector<toolx::hdf5::ntuple*>::const_iterator BeginConstNtuple() const;
|
||||
std::vector<toolx::hdf5::ntuple*>::const_iterator EndConstNtuple() const;
|
||||
|
||||
protected:
|
||||
// Virtual methods from base class
|
||||
|
||||
@@ -39,35 +39,35 @@ G4bool G4Hdf5AnalysisManager::IsOpenFileImpl() const
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
tools::hdf5::ntuple* G4Hdf5AnalysisManager::GetNtuple() const
|
||||
toolx::hdf5::ntuple* G4Hdf5AnalysisManager::GetNtuple() const
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->GetNtuple();
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
tools::hdf5::ntuple* G4Hdf5AnalysisManager::GetNtuple(G4int ntupleId) const
|
||||
toolx::hdf5::ntuple* G4Hdf5AnalysisManager::GetNtuple(G4int ntupleId) const
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->GetNtuple(ntupleId);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
std::vector<tools::hdf5::ntuple*>::iterator G4Hdf5AnalysisManager::BeginNtuple()
|
||||
std::vector<toolx::hdf5::ntuple*>::iterator G4Hdf5AnalysisManager::BeginNtuple()
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->BeginNtuple();
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
std::vector<tools::hdf5::ntuple*>::iterator G4Hdf5AnalysisManager::EndNtuple()
|
||||
std::vector<toolx::hdf5::ntuple*>::iterator G4Hdf5AnalysisManager::EndNtuple()
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->EndNtuple();
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
std::vector<tools::hdf5::ntuple*>::const_iterator
|
||||
std::vector<toolx::hdf5::ntuple*>::const_iterator
|
||||
G4Hdf5AnalysisManager::BeginConstNtuple() const
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->BeginConstNtuple();
|
||||
@@ -75,7 +75,7 @@ G4Hdf5AnalysisManager::BeginConstNtuple() const
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
std::vector<tools::hdf5::ntuple*>::const_iterator
|
||||
std::vector<toolx::hdf5::ntuple*>::const_iterator
|
||||
G4Hdf5AnalysisManager::EndConstNtuple() const
|
||||
{
|
||||
return fNtupleFileManager->GetNtupleManager()->EndConstNtuple();
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "G4ToolsAnalysisReader.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
|
||||
#include <memory>
|
||||
#include <string_view>
|
||||
@@ -57,8 +57,8 @@ class G4Hdf5AnalysisReader : public G4ToolsAnalysisReader
|
||||
static G4Hdf5AnalysisReader* Instance();
|
||||
|
||||
// Access methods
|
||||
tools::hdf5::ntuple* GetNtuple() const;
|
||||
tools::hdf5::ntuple* GetNtuple(G4int ntupleId) const;
|
||||
toolx::hdf5::ntuple* GetNtuple() const;
|
||||
toolx::hdf5::ntuple* GetNtuple(G4int ntupleId) const;
|
||||
using G4VAnalysisReader::GetNtuple;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -28,14 +28,14 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
tools::hdf5::ntuple* G4Hdf5AnalysisReader::GetNtuple() const
|
||||
toolx::hdf5::ntuple* G4Hdf5AnalysisReader::GetNtuple() const
|
||||
{
|
||||
return fNtupleManager->GetNtuple();
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
inline
|
||||
tools::hdf5::ntuple* G4Hdf5AnalysisReader::GetNtuple(G4int ntupleId) const
|
||||
toolx::hdf5::ntuple* G4Hdf5AnalysisReader::GetNtuple(G4int ntupleId) const
|
||||
{
|
||||
return fNtupleManager->GetNtuple(ntupleId);
|
||||
}
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple" // for hid_t
|
||||
#include "toolx/hdf5/ntuple" // for hid_t
|
||||
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <string_view>
|
||||
|
||||
using G4Hdf5File = std::tuple<hid_t, hid_t, hid_t>;
|
||||
using Hdf5NtupleDescription = G4TNtupleDescription<tools::hdf5::ntuple, G4Hdf5File>;
|
||||
using Hdf5NtupleDescription = G4TNtupleDescription<toolx::hdf5::ntuple, G4Hdf5File>;
|
||||
|
||||
class G4Hdf5FileManager : public G4VTFileManager<G4Hdf5File>
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "G4VTHnFileManager.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple" // for hid_t
|
||||
#include "toolx/hdf5/ntuple" // for hid_t
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
|
||||
#include "tools/hdf5/header"
|
||||
#include "tools/hdf5/h2file"
|
||||
#include "toolx/hdf5/header"
|
||||
#include "toolx/hdf5/h2file"
|
||||
#include "tools/histo/h1d"
|
||||
#include "tools/histo/h2d"
|
||||
#include "tools/histo/h3d"
|
||||
#include "tools/histo/p1d"
|
||||
#include "tools/histo/p2d"
|
||||
|
||||
#include "tools/hdf5/h2file"
|
||||
#include "toolx/hdf5/h2file"
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
@@ -44,7 +44,7 @@ inline
|
||||
G4bool G4Hdf5HnFileManager<tools::histo::p1d>::WriteImpl(
|
||||
hid_t hdirectory, tools::histo::p1d* ht, const G4String& htName)
|
||||
{
|
||||
return tools::hdf5::write_profile(G4cout, hdirectory, htName, *ht);
|
||||
return toolx::hdf5::write_profile(G4cout, hdirectory, htName, *ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
@@ -53,7 +53,7 @@ inline
|
||||
G4bool G4Hdf5HnFileManager<tools::histo::p2d>::WriteImpl(
|
||||
hid_t hdirectory, tools::histo::p2d* ht, const G4String& htName)
|
||||
{
|
||||
return tools::hdf5::write_profile(G4cout, hdirectory, htName, *ht);
|
||||
return toolx::hdf5::write_profile(G4cout, hdirectory, htName, *ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
@@ -62,7 +62,7 @@ inline
|
||||
G4bool G4Hdf5HnFileManager<HT>::WriteImpl(
|
||||
hid_t hdirectory, HT* ht, const G4String& htName)
|
||||
{
|
||||
return tools::hdf5::write_histo(G4cout, hdirectory, htName, *ht);
|
||||
return toolx::hdf5::write_histo(G4cout, hdirectory, htName, *ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
@@ -83,21 +83,21 @@ G4bool G4Hdf5HnFileManager<HT>::WriteExtra(
|
||||
}
|
||||
|
||||
// create a header with general infos :
|
||||
if(!tools::hdf5::write_header(hfile)) {
|
||||
G4cerr << "tools::hdf5::write_header() failed." << std::endl;
|
||||
if(!toolx::hdf5::write_header(hfile)) {
|
||||
G4cerr << "toolx::hdf5::write_header() failed." << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Create directories
|
||||
hid_t hdirectory = tools_H5Gcreate(hfile, "histograms", 0);
|
||||
hid_t hdirectory = toolx_H5Gcreate(hfile, "histograms", 0);
|
||||
if ( hdirectory < 0 ) {
|
||||
G4cerr << "tools_H5Gcreate failed " << G4endl;
|
||||
G4cerr << "toolx_H5Gcreate failed " << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
auto result = tools::hdf5::write_atb(hdirectory, "type", "directory");
|
||||
auto result = toolx::hdf5::write_atb(hdirectory, "type", "directory");
|
||||
if ( ! result) {
|
||||
G4cerr << "tools::hdf5::write_atb failed " << G4endl;
|
||||
G4cerr << "toolx::hdf5::write_atb failed " << G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "G4VTHnRFileManager.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple" // for hid_t
|
||||
#include "toolx/hdf5/ntuple" // for hid_t
|
||||
|
||||
#include <string_view>
|
||||
|
||||
|
||||
@@ -28,15 +28,15 @@
|
||||
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
|
||||
#include "tools/hdf5/header"
|
||||
#include "tools/hdf5/h2file"
|
||||
#include "toolx/hdf5/header"
|
||||
#include "toolx/hdf5/h2file"
|
||||
#include "tools/histo/h1d"
|
||||
#include "tools/histo/h2d"
|
||||
#include "tools/histo/h3d"
|
||||
#include "tools/histo/p1d"
|
||||
#include "tools/histo/p2d"
|
||||
|
||||
#include "tools/hdf5/h2file"
|
||||
#include "toolx/hdf5/h2file"
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <typename HT>
|
||||
@@ -44,7 +44,7 @@ inline
|
||||
G4bool G4Hdf5HnRFileManager<HT>::ReadT(
|
||||
hid_t directory, const G4String& htName, HT*& ht)
|
||||
{
|
||||
return tools::hdf5::read_histo(G4cout, directory, htName, ht);
|
||||
return toolx::hdf5::read_histo(G4cout, directory, htName, ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
@@ -53,7 +53,7 @@ inline
|
||||
G4bool G4Hdf5HnRFileManager<tools::histo::p1d>::ReadT(
|
||||
hid_t directory, const G4String& htName, tools::histo::p1d*& ht)
|
||||
{
|
||||
return tools::hdf5::read_profile(G4cout, directory, htName, ht);
|
||||
return toolx::hdf5::read_profile(G4cout, directory, htName, ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
@@ -62,7 +62,7 @@ inline
|
||||
G4bool G4Hdf5HnRFileManager<tools::histo::p2d>::ReadT(
|
||||
hid_t directory, const G4String& htName, tools::histo::p2d*& ht)
|
||||
{
|
||||
return tools::hdf5::read_profile(G4cout, directory, htName, ht);
|
||||
return toolx::hdf5::read_profile(G4cout, directory, htName, ht);
|
||||
}
|
||||
|
||||
//_____________________________________________________________________________
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
@@ -44,17 +44,17 @@ class G4Hdf5FileManager;
|
||||
|
||||
// Types alias
|
||||
using G4Hdf5File = std::tuple<hid_t, hid_t, hid_t>;
|
||||
using Hdf5NtupleDescription = G4TNtupleDescription<tools::hdf5::ntuple, G4Hdf5File>;
|
||||
using Hdf5NtupleDescription = G4TNtupleDescription<toolx::hdf5::ntuple, G4Hdf5File>;
|
||||
|
||||
// template specialization used by this class defined below
|
||||
|
||||
template <>
|
||||
template <>
|
||||
G4bool G4TNtupleManager<tools::hdf5::ntuple, G4Hdf5File>::FillNtupleTColumn(
|
||||
G4bool G4TNtupleManager<toolx::hdf5::ntuple, G4Hdf5File>::FillNtupleTColumn(
|
||||
G4int ntupleId, G4int columnId, const std::string& value);
|
||||
|
||||
|
||||
class G4Hdf5NtupleManager : public G4TNtupleManager<tools::hdf5::ntuple,
|
||||
class G4Hdf5NtupleManager : public G4TNtupleManager<toolx::hdf5::ntuple,
|
||||
G4Hdf5File>
|
||||
{
|
||||
friend class G4Hdf5AnalysisManager;
|
||||
@@ -105,7 +105,7 @@ G4Hdf5NtupleManager::GetNtupleDescriptionVector() const
|
||||
|
||||
template <>
|
||||
template <>
|
||||
inline G4bool G4TNtupleManager<tools::hdf5::ntuple, G4Hdf5File>::FillNtupleTColumn(
|
||||
inline G4bool G4TNtupleManager<toolx::hdf5::ntuple, G4Hdf5File>::FillNtupleTColumn(
|
||||
G4int ntupleId, G4int columnId, const std::string& value)
|
||||
{
|
||||
if ( fState.GetIsActivation() && ( ! GetActivation(ntupleId) ) ) {
|
||||
@@ -128,7 +128,7 @@ inline G4bool G4TNtupleManager<tools::hdf5::ntuple, G4Hdf5File>::FillNtupleTColu
|
||||
auto icolumn = ntuple->columns()[index];
|
||||
|
||||
// get column and check its type
|
||||
auto column = dynamic_cast<tools::hdf5::ntuple::column_string* >(icolumn);
|
||||
auto column = dynamic_cast<toolx::hdf5::ntuple::column_string* >(icolumn);
|
||||
if ( ! column ) {
|
||||
G4Analysis::Warn(
|
||||
"Column type does not match: ntupleId " + to_string(ntupleId) +
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "G4VRFileManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
|
||||
#include <map>
|
||||
#include <tuple>
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
#include "G4TRNtupleManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
|
||||
#include <string_view>
|
||||
|
||||
class G4Hdf5RFileManager;
|
||||
|
||||
class G4Hdf5RNtupleManager : public G4TRNtupleManager<tools::hdf5::ntuple>
|
||||
class G4Hdf5RNtupleManager : public G4TRNtupleManager<toolx::hdf5::ntuple>
|
||||
{
|
||||
friend class G4Hdf5AnalysisReader;
|
||||
|
||||
@@ -57,7 +57,7 @@ class G4Hdf5RNtupleManager : public G4TRNtupleManager<tools::hdf5::ntuple>
|
||||
// Methods from the base class
|
||||
virtual G4int ReadNtupleImpl(const G4String& ntupleName, const G4String& fileName,
|
||||
const G4String& dirName, G4bool isUserFileName) final;
|
||||
virtual G4bool GetTNtupleRow(G4TRNtupleDescription<tools::hdf5::ntuple>* ntupleDescription) final;
|
||||
virtual G4bool GetTNtupleRow(G4TRNtupleDescription<toolx::hdf5::ntuple>* ntupleDescription) final;
|
||||
|
||||
// Static data members
|
||||
static constexpr std::string_view fkClass { "G4Hdf5RNtupleManager" };
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
#ifndef g4hdf5_defs_h
|
||||
#define g4hdf5_defs_h
|
||||
|
||||
#include "tools/hdf5/ntuple"
|
||||
#include "toolx/hdf5/ntuple"
|
||||
#include "g4hntools_defs.hh"
|
||||
|
||||
// Hdf5 output specific types
|
||||
using G4Hdf5Ntuple = tools::hdf5::ntuple;
|
||||
using G4Hdf5RNtuple = tools::hdf5::ntuple;
|
||||
using G4Hdf5Ntuple = toolx::hdf5::ntuple;
|
||||
using G4Hdf5RNtuple = toolx::hdf5::ntuple;
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user