Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -294,7 +294,7 @@ G4JpegCoder::WriteHeader( void )
|
||||
if( mProperty.Comment != 0 ){
|
||||
mOBSP->SetByte( M_Marker ); //FF
|
||||
mOBSP->SetByte( M_COM ); //comment
|
||||
int length = strlen( mProperty.Comment ) + 1;
|
||||
int length = (int)strlen( mProperty.Comment ) + 1;
|
||||
mOBSP->SetWord( length + 2 );
|
||||
mOBSP->CopyByte( mProperty.Comment, length );
|
||||
}
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "G4RayTracerViewer.hh"
|
||||
#include "G4TheRayTracer.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4RTMessenger* G4RTMessenger::fpInstance = 0;
|
||||
|
||||
G4RTMessenger* G4RTMessenger::GetInstance
|
||||
@@ -193,7 +195,7 @@ void G4RTMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
if (pViewer) {
|
||||
theTracer = pViewer->GetTracer();
|
||||
} else {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RTMessenger::SetNewValue: Current viewer is not of type RayTracer."
|
||||
"\n Use \"/vis/viewer/select\" or \"/vis/open\"."
|
||||
<< G4endl;
|
||||
@@ -201,7 +203,7 @@ void G4RTMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
}
|
||||
|
||||
if (theTracer == theDefaultTracer) {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RTMessenger::SetNewValue: No valid current viewer. Using default RayTracer."
|
||||
<< G4endl;
|
||||
}
|
||||
@@ -226,7 +228,7 @@ void G4RTMessenger::SetNewValue(G4UIcommand * command,G4String newValue)
|
||||
{ theTracer->SetDistortion(distCmd->GetNewBoolValue(newValue)); }
|
||||
else if(command==bkgColCmd)
|
||||
{
|
||||
G4cout << "WARNING: /vis/rayTracer/backgroundColour has been deprecated."
|
||||
G4warn << "WARNING: /vis/rayTracer/backgroundColour has been deprecated."
|
||||
"\n Use \"/vis/viewer/set/background\" instead."
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -29,9 +29,7 @@
|
||||
#include "G4RTPrimaryGeneratorAction.hh"
|
||||
#include "G4ParticleDefinition.hh"
|
||||
#include "G4ParticleTable.hh"
|
||||
#include "G4GeometryManager.hh"
|
||||
#include "G4TransportationManager.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4Event.hh"
|
||||
#include "G4PrimaryVertex.hh"
|
||||
#include "G4PrimaryParticle.hh"
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
extern "C" {
|
||||
Bool G4RayTracerXScannerWaitForNotify (Display*, XEvent* e, char* arg) {
|
||||
return (e->type == MapNotify) && (e->xmap.window == (Window) arg);
|
||||
@@ -110,7 +112,7 @@ G4bool G4RTXScanner::GetXWindow(const G4String& name, G4ViewParameters& vp)
|
||||
{
|
||||
display = XOpenDisplay(0); // Use display defined by DISPLAY environment.
|
||||
if (!display) {
|
||||
G4cerr << "G4RTXScanner::Initialize(): cannot get display."
|
||||
G4warn << "G4RTXScanner::Initialize(): cannot get display."
|
||||
<< G4endl;
|
||||
return false;
|
||||
}
|
||||
@@ -142,7 +144,7 @@ G4bool G4RTXScanner::GetXWindow(const G4String& name, G4ViewParameters& vp)
|
||||
size_hints->y = yOffset;
|
||||
}
|
||||
} else {
|
||||
G4cout << "ERROR: Geometry string \""
|
||||
G4warn << "ERROR: Geometry string \""
|
||||
<< XGeometryString
|
||||
<< "\" invalid. Using \"600x600\"."
|
||||
<< G4endl;
|
||||
@@ -150,7 +152,7 @@ G4bool G4RTXScanner::GetXWindow(const G4String& name, G4ViewParameters& vp)
|
||||
height = 600;
|
||||
}
|
||||
} else {
|
||||
G4cout << "ERROR: Geometry string \""
|
||||
G4warn << "ERROR: Geometry string \""
|
||||
<< XGeometryString
|
||||
<< "\" is empty. Using \"600x600\"."
|
||||
<< G4endl;
|
||||
@@ -181,7 +183,7 @@ G4bool G4RTXScanner::GetXWindow(const G4String& name, G4ViewParameters& vp)
|
||||
(display, RootWindow(display, screen_num),
|
||||
&scmap, &nMaps, XA_RGB_BEST_MAP);
|
||||
if (!status) {
|
||||
G4cerr <<
|
||||
G4warn <<
|
||||
"G4RTXScanner::Initialize(): cannot get color map."
|
||||
"\n Perhaps your system does not support XA_RGB_BEST_MAP."
|
||||
<< G4endl;
|
||||
@@ -189,7 +191,7 @@ G4bool G4RTXScanner::GetXWindow(const G4String& name, G4ViewParameters& vp)
|
||||
}
|
||||
}
|
||||
if (!scmap->colormap) {
|
||||
G4cerr << "G4RTXScanner::Initialize(): color map empty."
|
||||
G4warn << "G4RTXScanner::Initialize(): color map empty."
|
||||
<< G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#include "G4RayTracerSceneHandler.hh"
|
||||
#include "G4RayTracerViewer.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4RayTracer::G4RayTracer():
|
||||
G4VGraphicsSystem("RayTracer",
|
||||
"RayTracer",
|
||||
@@ -53,7 +55,7 @@ G4VViewer* G4RayTracer::CreateViewer (G4VSceneHandler& sceneHandler,
|
||||
(sceneHandler, name, theRayTracer);
|
||||
if (pViewer) {
|
||||
if (pViewer->GetViewId() < 0) {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RayTracer::CreateViewer: ERROR flagged by negative"
|
||||
" view id in G4RayTracerViewer creation."
|
||||
"\n Destroying view and returning null pointer."
|
||||
@@ -63,7 +65,7 @@ G4VViewer* G4RayTracer::CreateViewer (G4VSceneHandler& sceneHandler,
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RayTracer::CreateViewer: ERROR: null pointer on new G4RayTracerViewer."
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,8 @@
|
||||
#include "G4RayTracerSceneHandler.hh"
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4int G4RayTracerSceneHandler::fSceneIdCount = 0;
|
||||
|
||||
@@ -99,7 +100,7 @@ void G4RayTracerSceneHandler::BuildVisAttsMap (const G4VSolid&)
|
||||
if (!pVisAtts) {
|
||||
// Shouldn't happen.
|
||||
if (G4VisManager::GetInstance()->GetVerbosity() >= G4VisManager::warnings) {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"WARNING: G4RayTracerSceneHandler::BuildVisAttsMap: null vis atts pointer."
|
||||
"\n Using a default vis atts."
|
||||
<< G4endl;
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#include "G4RTSimpleScanner.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4RayTracerViewer::G4RayTracerViewer
|
||||
(G4VSceneHandler& sceneHandler,
|
||||
const G4String& name,
|
||||
@@ -58,7 +60,7 @@ G4RayTracerViewer::G4RayTracerViewer
|
||||
#endif
|
||||
{
|
||||
if (!theTracer) {
|
||||
G4cerr << "G4RayTracerViewer::Initialise: No tracer" << G4endl;
|
||||
G4warn << "G4RayTracerViewer::Initialise: No tracer" << G4endl;
|
||||
fViewId = -1; // This flags an error.
|
||||
return;
|
||||
}
|
||||
@@ -114,7 +116,7 @@ void G4RayTracerViewer::DrawView()
|
||||
if (fVP.GetFieldHalfAngle() == 0.) { // Orthogonal (parallel) projection.
|
||||
G4double fieldHalfAngle = perMillion;
|
||||
fVP.SetFieldHalfAngle(fieldHalfAngle);
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"WARNING: G4RayTracerViewer::DrawView: true orthogonal projection"
|
||||
"\n not yet implemented. Doing a \"long shot\", i.e., a perspective"
|
||||
"\n projection with a half field angle of "
|
||||
|
||||
@@ -33,6 +33,8 @@
|
||||
#include "G4RayTracerSceneHandler.hh"
|
||||
#include "G4RayTracerXViewer.hh"
|
||||
|
||||
#define G4warn G4cerr
|
||||
|
||||
G4RayTracerX::G4RayTracerX():
|
||||
G4VGraphicsSystem("RayTracerX",
|
||||
"RayTracerX",
|
||||
@@ -53,7 +55,7 @@ G4VViewer* G4RayTracerX::CreateViewer (G4VSceneHandler& sceneHandler,
|
||||
G4VViewer* pViewer = new G4RayTracerXViewer (sceneHandler, name);
|
||||
if (pViewer) {
|
||||
if (pViewer->GetViewId() < 0) {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RayTracerX::CreateViewer: ERROR flagged by negative"
|
||||
" view id in G4RayTracerXViewer creation."
|
||||
"\n Destroying view and returning null pointer."
|
||||
@@ -63,7 +65,7 @@ G4VViewer* G4RayTracerX::CreateViewer (G4VSceneHandler& sceneHandler,
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cout <<
|
||||
G4warn <<
|
||||
"G4RayTracerX::CreateViewer: ERROR: null pointer on new G4RayTracerXViewer."
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "G4RayTrajectoryPoint.hh"
|
||||
#include "G4RayTracerSceneHandler.hh"
|
||||
#include "G4Step.hh"
|
||||
#include "G4VPhysicalVolume.hh"
|
||||
#include "G4VisManager.hh"
|
||||
#include "G4VisAttributes.hh"
|
||||
#include "G4Colour.hh"
|
||||
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "G4VVisManager.hh"
|
||||
#include "G4RunManagerFactory.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4TheMTRayTracer* G4TheMTRayTracer::theInstance = nullptr;
|
||||
|
||||
G4TheMTRayTracer::G4TheMTRayTracer(G4VFigureFileMaker* figMaker,
|
||||
@@ -100,14 +102,14 @@ void G4TheMTRayTracer::Trace(const G4String& fileName)
|
||||
G4ApplicationState currentState = theStateMan->GetCurrentState();
|
||||
if(currentState!=G4State_Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state <" << theStateMan->GetStateString(currentState)
|
||||
G4warn << "Illegal application state <" << theStateMan->GetStateString(currentState)
|
||||
<< "> - Trace() ignored. " << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!theFigMaker)
|
||||
{
|
||||
G4cerr << "Figure file maker class is not specified - Trace() ignored." << G4endl;
|
||||
G4warn << "Figure file maker class is not specified - Trace() ignored." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -135,8 +137,8 @@ void G4TheMTRayTracer::Trace(const G4String& fileName)
|
||||
if(succeeded)
|
||||
{ CreateFigureFile(fileName); }
|
||||
else
|
||||
{ G4cerr << "Could not create figure file" << G4endl;
|
||||
G4cerr << "You might set the eye position outside of the world volume" << G4endl; }
|
||||
{ G4warn << "Could not create figure file" << G4endl;
|
||||
G4warn << "You might set the eye position outside of the world volume" << G4endl; }
|
||||
|
||||
G4String str = "/tracking/storeTrajectory " + G4UIcommand::ConvertToString(storeTrajectory);
|
||||
UI->ApplyCommand(str);
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
#include "G4ProductionCutsTable.hh"
|
||||
#include "G4VVisManager.hh"
|
||||
|
||||
#define G4warn G4cout
|
||||
|
||||
G4VFigureFileMaker * G4TheRayTracer::theFigMaker = 0;
|
||||
G4VRTScanner * G4TheRayTracer::theScanner = 0;
|
||||
|
||||
@@ -113,13 +115,13 @@ void G4TheRayTracer::Trace(const G4String& fileName)
|
||||
G4ApplicationState currentState = theStateMan->GetCurrentState();
|
||||
if(currentState!=G4State_Idle)
|
||||
{
|
||||
G4cerr << "Illegal application state - Trace() ignored." << G4endl;
|
||||
G4warn << "Illegal application state - Trace() ignored." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(!theFigMaker)
|
||||
{
|
||||
G4cerr << "Figure file maker class is not specified - Trace() ignored." << G4endl;
|
||||
G4warn << "Figure file maker class is not specified - Trace() ignored." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -139,8 +141,8 @@ void G4TheRayTracer::Trace(const G4String& fileName)
|
||||
if(succeeded)
|
||||
{ CreateFigureFile(fileName); }
|
||||
else
|
||||
{ G4cerr << "Could not create figure file" << G4endl;
|
||||
G4cerr << "You might set the eye position outside of the world volume" << G4endl; }
|
||||
{ G4warn << "Could not create figure file" << G4endl;
|
||||
G4warn << "You might set the eye position outside of the world volume" << G4endl; }
|
||||
RestoreUserActions();
|
||||
|
||||
if(storeTrajectory==0) UI->ApplyCommand("/tracking/storeTrajectory 0");
|
||||
@@ -209,7 +211,7 @@ G4bool G4TheRayTracer::CreateBitMap()
|
||||
G4ProductionCutsTable::GetProductionCutsTable()->UpdateCoupleTable(pWorld);
|
||||
G4ProcessVector* pVector
|
||||
= G4Geantino::GeantinoDefinition()->GetProcessManager()->GetProcessList();
|
||||
for (std::size_t j=0; j < pVector->size(); ++j) {
|
||||
for (G4int j=0; j < (G4int)pVector->size(); ++j) {
|
||||
(*pVector)[j]->BuildPhysicsTable(*(G4Geantino::GeantinoDefinition()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user