Import Geant4 11.2.0 source tree
This commit is contained in:
@@ -45,7 +45,9 @@ G4bool G4MPIToolsManager::Send(
|
||||
// pack objects
|
||||
for (const auto& [ht, info] : hnVector) {
|
||||
// skip sending if activation is enabled and HT is inactivated
|
||||
if ( ( fState.GetIsActivation() && ( ! info->GetActivation() ) ) ) continue;
|
||||
// or if histogram was deleted
|
||||
if ( ( fState.GetIsActivation() && ( ! info->GetActivation() ) ) ||
|
||||
( info->GetDeleted() ) ) continue;
|
||||
// pack histogram for sending
|
||||
// G4cout << "Packed " << i << "th T" << G4endl;
|
||||
result &= fHmpi->pack(*ht);
|
||||
|
||||
@@ -102,8 +102,10 @@ inline G4bool G4PlotManager::PlotAndWrite(
|
||||
G4String name = info->GetName();
|
||||
// skip plotting if not selected for plotting or
|
||||
// if activation is enabled and HT is inactivated
|
||||
// or HT is delted
|
||||
if ( ( ! plotting ) ||
|
||||
( fState.GetIsActivation() && ( ! activation ) ) ) continue;
|
||||
( fState.GetIsActivation() && ( ! activation ) ) ||
|
||||
( info->GetDeleted() ) ) continue;
|
||||
|
||||
// plot this object
|
||||
fViewer->plot(*ht);
|
||||
|
||||
@@ -35,28 +35,28 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
tools::histo::h1d* G4THnToolsManager<1, tools::histo::h1d>::CreateToolsHT(
|
||||
tools::histo::h1d* G4THnToolsManager<kDim1, tools::histo::h1d>::CreateToolsHT(
|
||||
const G4String& title,
|
||||
const std::array<G4HnDimension, 1>& bins,
|
||||
const std::array<G4HnDimensionInformation, 1>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim1>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim1>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
void G4THnToolsManager<1, tools::histo::h1d>::ConfigureToolsHT(
|
||||
void G4THnToolsManager<kDim1, tools::histo::h1d>::ConfigureToolsHT(
|
||||
tools::histo::h1d* ht,
|
||||
const std::array<G4HnDimension, 1>& bins,
|
||||
const std::array<G4HnDimensionInformation, 1>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim1>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim1>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<1, tools::histo::h1d>::FillHT(
|
||||
G4bool G4THnToolsManager<kDim1, tools::histo::h1d>::FillHT(
|
||||
tools::histo::h1d* ht, const G4HnInformation& hnInformation,
|
||||
std::array<G4double, 1>& value, G4double weight);
|
||||
std::array<G4double, kDim1>& value, G4double weight);
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<1, tools::histo::h1d>::WriteOnAscii(
|
||||
G4bool G4THnToolsManager<kDim1, tools::histo::h1d>::WriteOnAscii(
|
||||
std::ofstream& output);
|
||||
|
||||
#endif
|
||||
@@ -35,28 +35,28 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
tools::histo::h2d* G4THnToolsManager<2, tools::histo::h2d>::CreateToolsHT(
|
||||
tools::histo::h2d* G4THnToolsManager<kDim2, tools::histo::h2d>::CreateToolsHT(
|
||||
const G4String& title,
|
||||
const std::array<G4HnDimension, 2>& bins,
|
||||
const std::array<G4HnDimensionInformation, 2>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim2>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim2>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
void G4THnToolsManager<2, tools::histo::h2d>::ConfigureToolsHT(
|
||||
void G4THnToolsManager<kDim2, tools::histo::h2d>::ConfigureToolsHT(
|
||||
tools::histo::h2d* ht,
|
||||
const std::array<G4HnDimension, 2>& bins,
|
||||
const std::array<G4HnDimensionInformation, 2>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim2>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim2>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<2, tools::histo::h2d>::FillHT(
|
||||
G4bool G4THnToolsManager<kDim2, tools::histo::h2d>::FillHT(
|
||||
tools::histo::h2d* ht, const G4HnInformation& hnInformation,
|
||||
std::array<G4double, 2>& value, G4double weight);
|
||||
std::array<G4double, kDim2>& value, G4double weight);
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<2, tools::histo::h2d>::WriteOnAscii(
|
||||
G4bool G4THnToolsManager<kDim2, tools::histo::h2d>::WriteOnAscii(
|
||||
std::ofstream& output);
|
||||
|
||||
#endif
|
||||
@@ -35,28 +35,28 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
tools::histo::h3d* G4THnToolsManager<3, tools::histo::h3d>::CreateToolsHT(
|
||||
tools::histo::h3d* G4THnToolsManager<kDim3, tools::histo::h3d>::CreateToolsHT(
|
||||
const G4String& title,
|
||||
const std::array<G4HnDimension, 3>& bins,
|
||||
const std::array<G4HnDimensionInformation, 3>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim3>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim3>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
void G4THnToolsManager<3, tools::histo::h3d>::ConfigureToolsHT(
|
||||
void G4THnToolsManager<kDim3, tools::histo::h3d>::ConfigureToolsHT(
|
||||
tools::histo::h3d* ht,
|
||||
const std::array<G4HnDimension, 3>& bins,
|
||||
const std::array<G4HnDimensionInformation, 3>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim3>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim3>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<3, tools::histo::h3d>::FillHT(
|
||||
G4bool G4THnToolsManager<kDim3, tools::histo::h3d>::FillHT(
|
||||
tools::histo::h3d* ht, const G4HnInformation& hnInformation,
|
||||
std::array<G4double, 3>& value, G4double weight);
|
||||
std::array<G4double, kDim3>& value, G4double weight);
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<3, tools::histo::h3d>::WriteOnAscii(
|
||||
G4bool G4THnToolsManager<kDim3, tools::histo::h3d>::WriteOnAscii(
|
||||
std::ofstream& output);
|
||||
|
||||
#endif
|
||||
@@ -35,28 +35,28 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
tools::histo::p1d* G4THnToolsManager<2, tools::histo::p1d>::CreateToolsHT(
|
||||
tools::histo::p1d* G4THnToolsManager<kDim2, tools::histo::p1d>::CreateToolsHT(
|
||||
const G4String& title,
|
||||
const std::array<G4HnDimension, 2>& bins,
|
||||
const std::array<G4HnDimensionInformation, 2>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim2>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim2>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
void G4THnToolsManager<2, tools::histo::p1d>::ConfigureToolsHT(
|
||||
void G4THnToolsManager<kDim2, tools::histo::p1d>::ConfigureToolsHT(
|
||||
tools::histo::p1d* ht,
|
||||
const std::array<G4HnDimension, 2>& bins,
|
||||
const std::array<G4HnDimensionInformation, 2>& hnInfo);
|
||||
const std::array<G4HnDimension, kDim2>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim2>& hnInfo);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<2, tools::histo::p1d>::FillHT(
|
||||
G4bool G4THnToolsManager<kDim2, tools::histo::p1d>::FillHT(
|
||||
tools::histo::p1d* ht, const G4HnInformation& hnInformation,
|
||||
std::array<G4double, 2>& value, G4double weight);
|
||||
std::array<G4double, kDim2>& value, G4double weight);
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<2, tools::histo::p1d>::WriteOnAscii(
|
||||
G4bool G4THnToolsManager<kDim2, tools::histo::p1d>::WriteOnAscii(
|
||||
std::ofstream& output);
|
||||
|
||||
#endif
|
||||
@@ -35,30 +35,30 @@
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
tools::histo::p2d* G4THnToolsManager<3, tools::histo::p2d>::CreateToolsHT(
|
||||
tools::histo::p2d* G4THnToolsManager<kDim3, tools::histo::p2d>::CreateToolsHT(
|
||||
const G4String& title,
|
||||
const std::array<G4HnDimension, 3>& bins,
|
||||
const std::array<G4HnDimensionInformation, 3>& hnInfo,
|
||||
const std::array<G4HnDimension, kDim3>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim3>& hnInfo,
|
||||
std::string_view className);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
void G4THnToolsManager<3, tools::histo::p2d>::ConfigureToolsHT(
|
||||
void G4THnToolsManager<kDim3, tools::histo::p2d>::ConfigureToolsHT(
|
||||
tools::histo::p2d* ht,
|
||||
const std::array<G4HnDimension, 3>& bins,
|
||||
const std::array<G4HnDimensionInformation, 3>& hnInfo,
|
||||
const std::array<G4HnDimension, kDim3>& bins,
|
||||
const std::array<G4HnDimensionInformation, kDim3>& hnInfo,
|
||||
std::string_view className);
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<3, tools::histo::p2d>::FillHT(
|
||||
G4bool G4THnToolsManager<kDim3, tools::histo::p2d>::FillHT(
|
||||
tools::histo::p2d* ht, const G4HnInformation& hnInformation,
|
||||
std::array<G4double, 3>& value, G4double weight);
|
||||
std::array<G4double, kDim3>& value, G4double weight);
|
||||
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <>
|
||||
G4bool G4THnToolsManager<3, tools::histo::p2d>::WriteOnAscii(
|
||||
G4bool G4THnToolsManager<kDim3, tools::histo::p2d>::WriteOnAscii(
|
||||
std::ofstream& output);
|
||||
|
||||
#endif
|
||||
@@ -39,8 +39,6 @@
|
||||
#include "G4TP2ToolsManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4THnToolsManager.hh" // make forward declaration if possible
|
||||
|
||||
#include "tools/histo/h1d"
|
||||
#include "tools/histo/h2d"
|
||||
#include "tools/histo/h3d"
|
||||
@@ -51,6 +49,9 @@
|
||||
|
||||
class G4PlotManager;
|
||||
|
||||
template <unsigned int DIM, typename HT>
|
||||
class G4THnToolsManager;
|
||||
|
||||
namespace tools {
|
||||
namespace histo {
|
||||
class hmpi;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "G4HnInformation.hh"
|
||||
|
||||
#include "G4THnToolsManager.hh"
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <typename HT>
|
||||
inline
|
||||
@@ -38,7 +40,9 @@ G4bool G4ToolsAnalysisManager::WriteT(
|
||||
auto activation = info->GetActivation();
|
||||
|
||||
// skip writing if activation is enabled and H1 is inactivated
|
||||
if ( fState.GetIsActivation() && ( ! activation ) ) continue;
|
||||
// or if histogram was deleted
|
||||
if ( ( fState.GetIsActivation() && ( ! activation ) ) ||
|
||||
( info->GetDeleted() ) ) continue;
|
||||
|
||||
auto name = info->GetName();
|
||||
auto fileName = info->GetFileName();
|
||||
|
||||
@@ -35,15 +35,14 @@
|
||||
#include "G4THnManager.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4THnToolsManager.hh" // TO DO: make forward declaration if possible
|
||||
|
||||
#include "tools/histo/h1d"
|
||||
#include "tools/histo/h2d"
|
||||
#include "tools/histo/h3d"
|
||||
#include "tools/histo/p1d"
|
||||
#include "tools/histo/p2d"
|
||||
|
||||
class G4P2ToolsManager;
|
||||
template <unsigned int DIM, typename HT>
|
||||
class G4THnToolsManager;
|
||||
|
||||
namespace tools {
|
||||
namespace histo {
|
||||
@@ -91,11 +90,11 @@ class G4ToolsAnalysisReader : public G4VAnalysisReader
|
||||
static constexpr std::string_view fkClass { "G4ToolsAnalysisReader" };
|
||||
|
||||
// Data members
|
||||
G4THnToolsManager<1, tools::histo::h1d>* fH1Manager { nullptr };
|
||||
G4THnToolsManager<2, tools::histo::h2d>* fH2Manager { nullptr };
|
||||
G4THnToolsManager<3, tools::histo::h3d>* fH3Manager { nullptr };
|
||||
G4THnToolsManager<2, tools::histo::p1d>* fP1Manager { nullptr };
|
||||
G4THnToolsManager<3, tools::histo::p2d>* fP2Manager { nullptr };
|
||||
G4THnToolsManager<kDim1, tools::histo::h1d>* fH1Manager { nullptr };
|
||||
G4THnToolsManager<kDim2, tools::histo::h2d>* fH2Manager { nullptr };
|
||||
G4THnToolsManager<kDim3, tools::histo::h3d>* fH3Manager { nullptr };
|
||||
G4THnToolsManager<kDim2, tools::histo::p1d>* fP1Manager { nullptr };
|
||||
G4THnToolsManager<kDim3, tools::histo::p2d>* fP2Manager { nullptr };
|
||||
};
|
||||
|
||||
#include "G4ToolsAnalysisReader.icc"
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
|
||||
#include "G4AnalysisUtilities.hh"
|
||||
|
||||
#include "G4THnToolsManager.hh"
|
||||
|
||||
//_____________________________________________________________________________
|
||||
template <typename HT>
|
||||
inline
|
||||
|
||||
Reference in New Issue
Block a user