Import Geant4 10.7.0 source tree
This commit is contained in:
@@ -409,7 +409,11 @@ void G4PhysicalVolumeModel::DescribeAndDescend
|
||||
// If the volume does not have any vis attributes, create it.
|
||||
G4VisAttributes* tempVisAtts = nullptr;
|
||||
if (!pVisAttribs) {
|
||||
tempVisAtts = new G4VisAttributes; // Default value.
|
||||
if (fpMP->GetDefaultVisAttributes()) {
|
||||
tempVisAtts = new G4VisAttributes(*fpMP->GetDefaultVisAttributes());
|
||||
} else {
|
||||
tempVisAtts = new G4VisAttributes;
|
||||
}
|
||||
// The user may request /vis/viewer/set/colourByDensity.
|
||||
if (fpMP->GetCBDAlgorithmNumber() == 1) {
|
||||
// Algorithm 1: 3 parameters: Simple rainbow mapping.
|
||||
@@ -973,6 +977,17 @@ G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator<
|
||||
return false;
|
||||
}
|
||||
|
||||
G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator!=
|
||||
(const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& right) const
|
||||
{
|
||||
if (fpPV != right.fpPV ||
|
||||
fCopyNo != right.fCopyNo ||
|
||||
fNonCulledDepth != right.fNonCulledDepth ||
|
||||
fTransform != right.fTransform ||
|
||||
fDrawn != right.fDrawn) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ostream& operator<<
|
||||
(std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& node)
|
||||
{
|
||||
@@ -987,7 +1002,7 @@ std::ostream& operator<<
|
||||
// if (!node.GetDrawn()) os << "not ";
|
||||
// os << "drawn)";
|
||||
} else {
|
||||
os << " (Null node)";
|
||||
os << " (Null PV node)";
|
||||
}
|
||||
return os;
|
||||
}
|
||||
|
||||
@@ -56,15 +56,17 @@ void G4PhysicalVolumesSearchScene::ProcessVolume (const G4VSolid&)
|
||||
if (fMatcher.Match(name)) {
|
||||
if ((fRequiredCopyNo < 0 || // I.e., ignore negative request
|
||||
fRequiredCopyNo == copyNo)) {
|
||||
auto path = fpSearchVolumesModel->GetFullPVPath();
|
||||
path.pop_back(); // Base node is one up from found node
|
||||
auto basePath = fpSearchVolumesModel->GetFullPVPath();
|
||||
basePath.pop_back(); // Base node is one up from found node
|
||||
// Mark base path nodes as not drawn
|
||||
for (auto& node: basePath) node.SetDrawn(false);
|
||||
fFindings.push_back
|
||||
(Findings
|
||||
(fpSearchVolumesModel->GetTopPhysicalVolume(),
|
||||
pCurrentPV,
|
||||
copyNo,
|
||||
fpSearchVolumesModel->GetCurrentDepth(),
|
||||
path,
|
||||
basePath,
|
||||
*fpCurrentObjectTransformation));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
#include "G4ModelingParameters.hh"
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#ifdef G4MULTITHREADED
|
||||
#include "G4MTRunManager.hh"
|
||||
#endif
|
||||
#include "G4RunManagerFactory.hh"
|
||||
#include "G4Run.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4AttDefStore.hh"
|
||||
@@ -62,15 +60,14 @@ void G4TrajectoriesModelDebugG4AttValues(const G4VTrajectory*);
|
||||
|
||||
void G4TrajectoriesModel::DescribeYourselfTo (G4VGraphicsScene& sceneHandler)
|
||||
{
|
||||
G4RunManager* runManager = G4RunManager::GetRunManager();
|
||||
#ifdef G4MULTITHREADED
|
||||
if(G4Threading::IsMultithreadedApplication())
|
||||
{ runManager = G4MTRunManager::GetMasterRunManager(); }
|
||||
#endif
|
||||
const G4Run* currentRun = runManager->GetCurrentRun();
|
||||
if (currentRun) {
|
||||
G4RunManager* runManager = G4RunManagerFactory::GetMasterRunManager();
|
||||
const G4Run* currentRun = runManager->GetCurrentRun();
|
||||
if(currentRun)
|
||||
{
|
||||
fRunID = currentRun->GetRunID();
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
fRunID = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user