Import Geant4 11.3.0 source tree

This commit is contained in:
Gabriele Cosmo
2024-12-06 11:11:40 +01:00
parent e58e650b32
commit 32390e802b
1984 changed files with 98713 additions and 83996 deletions
@@ -105,9 +105,10 @@ public: // With description
// It is not yet the end of all drawing; that is signalled by
// ShowView ().)
virtual G4bool ReadyToDraw() {return true;}
std::vector<G4ThreeVector> ComputeFlyThrough(G4Vector3D*);
#ifdef G4MULTITHREADED
// Note: the order of calling of MovingToVisSubThread and SwitchToVisSubThread
// is undefined, so you may need to implement mutexes to ensure your preferred
// order - see, e.g., G4OpenGLQtViewer. To summarise, the order of calling is
@@ -120,23 +121,22 @@ public: // With description
// SwitchToMasterThread
// Called on the master thread before starting the vis sub-thread.
virtual void DoneWithMasterThread ();
virtual void DoneWithMasterThread () {}
// Called on the master thread after starting the vis sub-thread.
virtual void MovingToVisSubThread ();
virtual void MovingToVisSubThread () {}
// Called on the vis sub-thread at start of vis sub-thread.
virtual void SwitchToVisSubThread ();
virtual void SwitchToVisSubThread () {}
// Called on the vis sub-thread when all events have been processed.
virtual void DoneWithVisSubThread ();
virtual void DoneWithVisSubThread () {}
// Called on the vis sub-thread when all events have been processed.
virtual void MovingToMasterThread ();
virtual void MovingToMasterThread () {}
// Called on the master thread after the vis sub-thread has terminated.
virtual void SwitchToMasterThread ();
#endif
virtual void SwitchToMasterThread () {}
//////////////////////////////////////////////////////////////
// Stuff for scene tree.
@@ -70,10 +70,10 @@ protected:
void InterpolateViews
(G4VViewer* currentViewer,
std::vector<G4ViewParameters> viewVector,
const std::vector<G4ViewParameters>& viewVector,
const G4int nInterpolationPoints = 50,
const G4int waitTimePerPointmilliseconds = 20,
const G4String exportString = "");
const G4String& exportString = "");
void InterpolateToNewView
(G4VViewer* currentViewer,
@@ -81,7 +81,7 @@ protected:
const G4ViewParameters& newVP,
const G4int nInterpolationPoints = 50,
const G4int waitTimePerPointmilliseconds = 20,
const G4String exportString = "");
const G4String& exportString = "");
void Twinkle
// Twinkles the touchables in paths
@@ -186,7 +186,7 @@ private:
class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
protected:
void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
void Set(const G4String& logVolName, const G4VVisCommandGeometrySetFunction&,
G4int requestedDepth);
void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
G4int depth, G4int requestedDepth);
@@ -27,8 +27,6 @@
// /vis/multithreading commands - John Allison 29th September 2015
#ifdef G4MULTITHREADED
#ifndef G4VISCOMMANDSMULTITHREADING_HH
#define G4VISCOMMANDSMULTITHREADING_HH
@@ -66,5 +64,3 @@ private:
};
#endif
#endif
@@ -138,10 +138,6 @@
#include "G4VtkQt.hh" // no_geant4_module_check
#endif
#if defined (G4VIS_USE_OPENGLQT) || (G4VIS_USE_TOOLSSG_QT_GLES)
#include <QtGlobal>
#endif
#include "G4UImanager.hh"
#include "G4UIsession.hh"
#include "G4UIbatch.hh"
@@ -346,7 +342,6 @@ void G4VisExecutive::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML2File);
RegisterGraphicsSystem (new G4GMocrenFile);
RegisterGraphicsSystem (new G4ToolsSGOffscreen);
G4VGraphicsSystem* tsg_offscreen = new G4ToolsSGOffscreen;
RegisterGraphicsSystem(tsg_offscreen);
tsg_offscreen->AddNickname("TSG_FILE");
@@ -333,8 +333,6 @@ public: // With description
G4bool FilterHit(const G4VHit&);
G4bool FilterDigi(const G4VDigi&);
#ifdef G4MULTITHREADED
virtual void SetUpForAThread();
// This method is invoked by G4WorkerRunManager
@@ -345,7 +343,6 @@ public: // With description
static G4ThreadFunReturnType G4VisSubThread(G4ThreadFunArgType);
// Vis sub-thread function.
#endif
////////////////////////////////////////////////////////////////////////
// Administration routines.
@@ -363,14 +360,10 @@ private:
void BeginOfEvent ();
void EndOfEvent ();
// This is called on change of state (G4ApplicationState). It is
// used to draw hits, digis and trajectories if included in the
// current scene at the end of event, as required.
G4bool Relinquishable (G4int eventID, G4int nKeptEvents, G4int nRequests);
void EndOfEventKernel (const G4Event* event);
void EndOfEventCleanup
(const G4Event* currentEvent,
G4int eventID); // See EndOfEventKernel: can be == -2?
void EndOfEventKernel (const G4Event* currentEvent);
void EndOfEventCleanup (const G4Event* currentEvent);
G4bool RequiredToBeKeptForVis (G4int eventID);
// Cluster of methods to handle end of event.
void EndOfRun ();
@@ -419,10 +412,8 @@ public: // With description
G4bool GetReviewingPlots () const;
G4bool GetAbortReviewPlots () const;
const G4ViewParameters& GetDefaultViewParameters () const;
#ifdef G4MULTITHREADED
G4int GetMaxEventQueueSize () const;
G4bool GetWaitOnEventQueueFull () const;
#endif
virtual const G4String& GetDefaultGraphicsSystemName();
// The above has to be virtual so that the derived class, G4VisExecutive,
// can override and non-const because on first pass it may/should
@@ -452,10 +443,8 @@ public: // With description
void SetReviewingPlots (G4bool);
void SetAbortReviewPlots (G4bool);
void SetDefaultViewParameters (const G4ViewParameters&);
#ifdef G4MULTITHREADED
void SetMaxEventQueueSize (G4int);
void SetWaitOnEventQueueFull (G4bool);
#endif
void SetDefaultGraphicsSystemName(const G4String&);
void SetDefaultXGeometryString (const G4String&);
void SetDefaultGraphicsSystemBasis(const G4String&);
@@ -485,6 +474,8 @@ public: // With description
static std::vector<G4String> VerbosityGuidanceStrings;
// Guidance on the use of visualization verbosity.
static void PrintAvailableVerbosity (std::ostream& os);
void PrintAvailableGraphicsSystems (Verbosity, std::ostream& = G4cout) const;
protected:
@@ -564,10 +555,8 @@ private:
G4bool fIsDrawGroup;
G4int fDrawGroupNestingDepth;
G4bool fIgnoreStateChanges;
#ifdef G4MULTITHREADED
G4int fMaxEventQueueSize;
G4bool fWaitOnEventQueueFull;
#endif
// Trajectory draw model manager
G4VisModelManager<G4VTrajectoryModel>* fpTrajDrawModelMgr;
@@ -126,8 +126,6 @@ inline const G4ViewParameters& G4VisManager::GetDefaultViewParameters() const {
return fDefaultViewParameters;
}
#ifdef G4MULTITHREADED
inline G4int G4VisManager::GetMaxEventQueueSize() const {
return fMaxEventQueueSize;
}
@@ -136,8 +134,6 @@ inline G4bool G4VisManager::GetWaitOnEventQueueFull () const {
return fWaitOnEventQueueFull;
}
#endif
inline const G4String& G4VisManager::GetDefaultGraphicsSystemName () {
return fDefaultGraphicsSystemName;
}
@@ -212,8 +208,6 @@ inline void G4VisManager::SetDefaultViewParameters
fDefaultViewParameters = vp;
}
#ifdef G4MULTITHREADED
inline void G4VisManager::SetMaxEventQueueSize (G4int size) {
fMaxEventQueueSize = size;
}
@@ -222,8 +216,6 @@ inline void G4VisManager::SetWaitOnEventQueueFull (G4bool wait) {
fWaitOnEventQueueFull = wait;
}
#endif
inline void G4VisManager::SetDefaultGraphicsSystemName (const G4String& name) {
fDefaultGraphicsSystemName = name;
}