Import Geant4 10.5.0 source tree

This commit is contained in:
Gabriele Cosmo
2018-12-07 15:15:39 +01:00
parent 6aa23be517
commit db49709b53
11370 changed files with 187480 additions and 160142 deletions
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AnalysisManagerState.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The state of the analysis manager instance.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AnalysisMessenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for G4VAnalysisManager.
// It implements commands:
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AnalysisMessengerHelper.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The helper class for histogram and profiles messengers.
// It implements reusable commands in /analysis/[hn|pn] directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4Fcn.hh 72292 2013-07-15 12:01:43Z ihrivnac $
// Author: Ivana Hrivnacova, 04/07/2012 (ivana@ipno.in2p3.fr)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4AnalysisVerbose.hh 92688 2015-09-14 07:01:13Z gcosmo $
// Utility class for analysis category messages.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BaseAnalysisManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for the object managers.
// It handles first object ID and its lock and provides common utility methods.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4BaseFileManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for analysis file managers.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The base class for Ntuple managers.
// It implements commen functions independent from the output type.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The base class for read Ntuple manager.
// It defines functions independent from the output type.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4Fcn.hh 72292 2013-07-15 12:01:43Z ihrivnac $
// Author: Ivana Hrivnacova, 04/07/2012 (ivana@ipno.in2p3.fr)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4Fcn.hh 92688 2015-09-14 07:01:13Z gcosmo $
// Author: Ivana Hrivnacova, 04/07/2012 (ivana@ipno.in2p3.fr)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4FileMessenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for File management
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4H1Messenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for H1 management.
// It implements commands in /analysis/h1 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4H2Messenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for H2 management.
// It implements commands in /analysis/h2 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The messenger class for H3 management.
// It implements commands in /analysis/h3 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HnInformation.hh 92688 2015-09-14 07:01:13Z gcosmo $
// Data class for the added Hn/Pn information (not available in g4tools).
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HnManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Class for management of G4HnInformation.
// It implements functions handling the added H1/H2 information
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4HnMessenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for histogram information management.
// It implements commands in /analysis/h1 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4NtupleMessenger.hh 66310 2012-12-17 11:56:35Z ihrivnac $
// The messenger class for histogram information management.
// It implements commands in /analysis/h1 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The messenger class for P1 management.
// It implements commands in /analysis/p1 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The messenger class for P2 management.
// It implements commands in /analysis/p2 directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The manager class for batch plotting.
@@ -64,11 +63,9 @@ class G4PlotManager
G4int GetNofPlotsPerPage() const;
G4bool WritePage();
// static data members
static G4PlotParameters fgPlotParameters;
// data members
const G4AnalysisManagerState& fState;
G4PlotParameters fPlotParameters;
std::unique_ptr<tools::viewplot> fViewer;
G4String fFileName;
};
@@ -77,7 +74,7 @@ class G4PlotManager
//_____________________________________________________________________________
inline G4int G4PlotManager::GetNofPlotsPerPage() const
{ return fgPlotParameters.GetColumns()*fgPlotParameters.GetRows(); }
{ return fPlotParameters.GetColumns()*fPlotParameters.GetRows(); }
//_____________________________________________________________________________
@@ -89,7 +86,7 @@ inline G4bool G4PlotManager::PlotAndWrite(const std::vector<T*>& htVector,
fViewer->plots().init_sg();
//it will recreate the sg::plotters and then reset the styles on new ones.
fViewer->set_cols_rows(fgPlotParameters.GetColumns(), fgPlotParameters.GetRows());
fViewer->set_cols_rows(fPlotParameters.GetColumns(), fPlotParameters.GetRows());
fViewer->plots().set_current_plotter(0);
G4bool finalResult = true;
@@ -109,7 +106,7 @@ inline G4bool G4PlotManager::PlotAndWrite(const std::vector<T*>& htVector,
// plot this object
fViewer->plot(*ht);
fViewer->set_current_plotter_style(fgPlotParameters.GetStyle());
fViewer->set_current_plotter_style(fPlotParameters.GetStyle());
// set color (only blue for the time being)
tools::sg::plotter& plotter = fViewer->plots().current_plotter();
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The messenger class for batch plotting.
// It implements commands in /analysis/plot directory.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// The data class which defined the configuration parameters for plotting
// which can be modified via UI commands.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4THnManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Template base class the histograms/profiles objects managers.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4THnManager.cc 70604 2013-06-03 11:27:06Z ihrivnac $
// Author: Ivana Hrivnacova, 23/06/2015 (ivana@ipno.in2p3.fr)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Structure templated containing the information related to an ntuple
// for all output types.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4CsvNtupleManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Class template for ntuple managers for all output types.
//
@@ -47,13 +46,13 @@ class G4TNtupleManager : public G4BaseNtupleManager {
protected:
// Methods to manipulate ntuples
void CreateNtuplesFromBooking();
virtual void CreateNtuplesFromBooking();
G4bool IsEmpty() const;
G4bool Reset(G4bool deleteNtuple);
virtual G4bool Reset(G4bool deleteNtuple);
// Methods to create ntuples
//
virtual G4int CreateNtuple(const G4String& name, const G4String& title) final;
virtual G4int CreateNtuple(const G4String& name, const G4String& title) override;
// Create columns in the last created ntuple (from base class)
using G4BaseNtupleManager::CreateNtupleIColumn;
@@ -84,7 +83,7 @@ class G4TNtupleManager : public G4BaseNtupleManager {
virtual G4bool FillNtupleDColumn(G4int ntupleId, G4int columnId, G4double value) final;
virtual G4bool FillNtupleSColumn(G4int ntupleId, G4int columnId,
const G4String& value) final;
virtual G4bool AddNtupleRow(G4int ntupleId) final;
virtual G4bool AddNtupleRow(G4int ntupleId) override;
// Activation option
//
@@ -117,9 +116,8 @@ class G4TNtupleManager : public G4BaseNtupleManager {
G4TNtupleDescription<TNTUPLE>* ntupleDescription) = 0;
virtual void FinishTNtuple(
G4TNtupleDescription<TNTUPLE>* ntupleDescription) = 0;
void FinishTNtupleNew(G4TNtupleDescription<TNTUPLE>* ntupleDescription);
G4TNtupleDescription<TNTUPLE>* ntupleDescription,
G4bool fromBooking) = 0;
// Common implementation
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
#include "G4AnalysisManagerState.hh"
#include "G4AnalysisUtilities.hh"
@@ -216,7 +215,8 @@ void G4TNtupleManager<TNTUPLE>::CreateNtuplesFromBooking()
CreateTNtupleFromBooking(ntupleDescription);
// finish created ntuple
FinishTNtuple(ntupleDescription);
auto fromBooking = true;
FinishTNtuple(ntupleDescription, fromBooking);
#ifdef G4VERBOSE
if ( fState.GetVerboseL3() )
@@ -340,7 +340,8 @@ void G4TNtupleManager<TNTUPLE>::FinishNtuple(
// if ( ! ntuple ) return;
// The test has to be now done in the FinishTNtuple implementations
FinishTNtuple(ntupleDescription);
auto fromBooking = false;
FinishTNtuple(ntupleDescription, fromBooking);
#ifdef G4VERBOSE
if ( fState.GetVerboseL2() ) {
@@ -413,10 +414,10 @@ G4bool G4TNtupleManager<TNTUPLE>::AddNtupleRow(
}
#ifdef G4VERBOSE
if ( fState.GetVerboseL4() ) {
if ( fState.GetVerboseL2() ) {
G4ExceptionDescription description;
description << " ntupleId " << ntupleId;
fState.GetVerboseL4()->Message("add", "ntuple row", description);
fState.GetVerboseL2()->Message("add", "ntuple row", description);
}
#endif
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Structure containing the information related to rroot ntuple
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Class template for read ntuple managers for all output types.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Author: Ivana Hrivnacova, 20/07/2017 (ivana@ipno.in2p3.fr)
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAnalysisManager.hh 71635 2013-06-19 13:48:28Z ihrivnac $
// The nonvirtual public interface class to g4tools based analysis.
// It is defined as a composite of object manager base classes.
@@ -55,6 +54,7 @@ class G4VP1Manager;
class G4VP2Manager;
class G4VNtupleManager;
class G4VFileManager;
class G4PlotManager;
namespace tools {
namespace histo{
@@ -71,7 +71,7 @@ class G4VAnalysisManager
// Methods for handling files
G4bool OpenFile(const G4String& fileName = "");
G4bool Write();
G4bool CloseFile();
G4bool CloseFile(G4bool reset = true);
G4bool Merge(tools::histo::hmpi* hmpi);
G4bool Plot();
G4bool IsOpenFile() const;
@@ -589,7 +589,7 @@ class G4VAnalysisManager
// virtual methods
virtual G4bool OpenFileImpl(const G4String& fileName) = 0;
virtual G4bool WriteImpl() = 0;
virtual G4bool CloseFileImpl() = 0;
virtual G4bool CloseFileImpl(G4bool reset) = 0;
virtual G4bool PlotImpl() = 0;
virtual G4bool MergeImpl(tools::histo::hmpi* hmpi) = 0;
virtual G4bool IsOpenFileImpl() const = 0;
@@ -602,6 +602,7 @@ class G4VAnalysisManager
void SetP2Manager(G4VP2Manager* p2Manager);
void SetNtupleManager(G4VNtupleManager* ntupleManager);
void SetFileManager(std::shared_ptr<G4VFileManager> fileManager);
void SetPlotManager(std::shared_ptr<G4PlotManager> plotManager);
// Methods to manipulate additional information
G4bool WriteAscii(const G4String& fileName);
@@ -609,6 +610,7 @@ class G4VAnalysisManager
// data members
G4AnalysisManagerState fState;
std::shared_ptr<G4VFileManager> fVFileManager;
std::shared_ptr<G4PlotManager> fPlotManager;
private:
// data members
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAnalysisManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
#include "G4HnManager.hh"
#include "G4VH1Manager.hh"
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAnalysisReader.hh 71635 2013-06-19 13:48:28Z ihrivnac $
// The nonvirtual public interface reader class for g4tools based analysis.
// It is defined as a composite of object manager base classes.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VAnalysisReader.hh 70604 2013-06-03 11:27:06Z ihrivnac $
#include "G4HnManager.hh"
#include "G4VH1Manager.hh"
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VFileManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for File manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VH1Manager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for H1 manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VH2Manager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for H2 manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VH3Manager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// Base class for H3 manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VNtupleManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// The pure abstract base class for Ntuple manager.
// It defines functions independent from the output type.
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Base class for P1 manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id$
// Base class for P2 manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: G4VRNtupleManager.hh 70604 2013-06-03 11:27:06Z ihrivnac $
// The pure abstract base class for read Ntuple manager.
//
@@ -23,7 +23,6 @@
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
// $Id: g4analysis_defs.hh 72292 2013-07-15 12:01:43Z ihrivnac $
// Author: Ivana Hrivnacova, 15/06/2011 (ivana@ipno.in2p3.fr)