Import Geant4 11.1.0 source tree
This commit is contained in:
@@ -141,7 +141,7 @@ G4GMocrenFileSceneHandler::G4GMocrenFileSceneHandler(G4GMocrenFile& system,
|
||||
std::strlen(DEFAULT_GDD_FILE_NAME)+1); // filename
|
||||
} else {
|
||||
const char * env = std::getenv("G4GMocrenFile_DEST_DIR");
|
||||
int len = std::strlen(env);
|
||||
G4int len = (G4int)std::strlen(env);
|
||||
if(len > 256) {
|
||||
G4Exception("G4GMocrenFileSceneHandler::G4GMocrenFileSceneHandler(*)",
|
||||
"gMocren1000", FatalException,
|
||||
@@ -1193,9 +1193,9 @@ void G4GMocrenFileSceneHandler::AddSolid( const G4Box& box )
|
||||
;
|
||||
}
|
||||
|
||||
kNestedVolumeDimension[0] = phantomPara->GetNoVoxelsX();
|
||||
kNestedVolumeDimension[1] = phantomPara->GetNoVoxelsY();
|
||||
kNestedVolumeDimension[2] = phantomPara->GetNoVoxelsZ();
|
||||
kNestedVolumeDimension[0] = (G4int)phantomPara->GetNoVoxelsX();
|
||||
kNestedVolumeDimension[1] = (G4int)phantomPara->GetNoVoxelsY();
|
||||
kNestedVolumeDimension[2] = (G4int)phantomPara->GetNoVoxelsZ();
|
||||
kNestedVolumeDirAxis[0] = 0;
|
||||
kNestedVolumeDirAxis[1] = 1;
|
||||
kNestedVolumeDirAxis[2] = 2;
|
||||
|
||||
@@ -67,7 +67,7 @@ G4GMocrenFileViewer::G4GMocrenFileViewer (G4GMocrenFileSceneHandler& sceneHandle
|
||||
std::strncpy( kG4GddViewer, "gMocren", 8);
|
||||
if( std::getenv( "G4GMocrenFile_VIEWER" ) != NULL ) {
|
||||
char * env = std::getenv( "G4GMocrenFile_VIEWER" );
|
||||
G4int len = std::strlen(env);
|
||||
G4int len = (G4int)std::strlen(env);
|
||||
if(len >= 32) {
|
||||
G4Exception("G4GMocrenFileViewer::G4GMocrenFileViewer(*)",
|
||||
"gMocren1000", FatalException,
|
||||
@@ -89,17 +89,17 @@ G4GMocrenFileViewer::G4GMocrenFileViewer (G4GMocrenFileSceneHandler& sceneHandle
|
||||
sizeof(kG4GddViewerInvocation) - 1);
|
||||
kG4GddViewerInvocation[sizeof(kG4GddViewerInvocation) - 1] = '\0';
|
||||
G4int n = sizeof(kG4GddViewerInvocation)
|
||||
- std::strlen(kG4GddViewerInvocation) - 1;
|
||||
- (G4int)std::strlen(kG4GddViewerInvocation) - 1;
|
||||
std::strncat( kG4GddViewerInvocation, " ", n);
|
||||
const char * gddfname = kSceneHandler.GetGddFileName();
|
||||
G4int len = std::strlen(gddfname);
|
||||
G4int len = (G4int)std::strlen(gddfname);
|
||||
if(len >= 64) {
|
||||
G4Exception("G4GMocrenFileViewer::G4GMocrenFileViewer(*)",
|
||||
"gMocren1001", FatalException,
|
||||
"Invalid length of the GDD file name");
|
||||
}
|
||||
n = sizeof(kG4GddViewerInvocation)
|
||||
- std::strlen(kG4GddViewerInvocation) - 1;
|
||||
- (G4int)std::strlen(kG4GddViewerInvocation) - 1;
|
||||
std::strncat( kG4GddViewerInvocation, gddfname, n);
|
||||
}
|
||||
|
||||
@@ -188,17 +188,17 @@ void G4GMocrenFileViewer::ShowView( void )
|
||||
sizeof(kG4GddViewerInvocation) - 1);
|
||||
kG4GddViewerInvocation[sizeof(kG4GddViewerInvocation) - 1] = '\0';
|
||||
G4int n = sizeof(kG4GddViewerInvocation)
|
||||
- std::strlen(kG4GddViewerInvocation) - 1;
|
||||
- (G4int)std::strlen(kG4GddViewerInvocation) - 1;
|
||||
std::strncat( kG4GddViewerInvocation, " ", n);
|
||||
const char * gddfname = kSceneHandler.GetGddFileName();
|
||||
G4int len = std::strlen(gddfname);
|
||||
G4int len = (G4int)std::strlen(gddfname);
|
||||
if(len >= 64) {
|
||||
G4Exception("G4GMocrenFileViewer::ShowView()",
|
||||
"gMocren1002", FatalException,
|
||||
"Invalid length of the GDD file name");
|
||||
}
|
||||
n = sizeof(kG4GddViewerInvocation)
|
||||
- std::strlen(kG4GddViewerInvocation) - 1;
|
||||
- (G4int)std::strlen(kG4GddViewerInvocation) - 1;
|
||||
std::strncat( kG4GddViewerInvocation, gddfname, n);
|
||||
}
|
||||
|
||||
|
||||
@@ -894,7 +894,7 @@ bool G4GMocrenIO::storeData4() {
|
||||
// number of track
|
||||
if(kPointerToTrackData > 0) {
|
||||
|
||||
int ntrk = kTracks.size();
|
||||
int ntrk = (int)kTracks.size();
|
||||
if(kLittleEndianOutput) {
|
||||
ofile.write((char *)&ntrk, sizeof(int));
|
||||
} else {
|
||||
@@ -946,7 +946,7 @@ bool G4GMocrenIO::storeData4() {
|
||||
//----- detector information -----//
|
||||
// number of detectors
|
||||
if(kPointerToDetectorData > 0) {
|
||||
int ndet = kDetectors.size();
|
||||
int ndet = (int)kDetectors.size();
|
||||
if(kLittleEndianOutput) {
|
||||
ofile.write((char *)&ndet, sizeof(int));
|
||||
} else {
|
||||
@@ -1287,7 +1287,7 @@ bool G4GMocrenIO::storeData3() {
|
||||
|
||||
//----- track information -----//
|
||||
// number of track
|
||||
int ntrk = kSteps.size();
|
||||
int ntrk = (int)kSteps.size();
|
||||
ofile.write((char *)&ntrk, sizeof(int));
|
||||
if(DEBUG || kVerbose > 0) {
|
||||
G4cout << "# of tracks : "
|
||||
@@ -1566,7 +1566,7 @@ bool G4GMocrenIO::storeData2() {
|
||||
|
||||
//----- track information -----//
|
||||
// track
|
||||
int ntrk = kSteps.size();
|
||||
int ntrk = (int)kSteps.size();
|
||||
ofile.write((char *)&ntrk, sizeof(int));
|
||||
if(DEBUG || kVerbose > 0) {
|
||||
G4cout << "# of tracks : "
|
||||
@@ -2088,7 +2088,7 @@ bool G4GMocrenIO::retrieveData4() {
|
||||
if(i < 5) {
|
||||
G4cout << i << ": " ;
|
||||
for(int j = 0; j < 3; j++) G4cout << steps[0][j] << " ";
|
||||
int nstp = steps.size();
|
||||
int nstp = (int)steps.size();
|
||||
G4cout << "<-> ";
|
||||
for(int j = 3; j < 6; j++) G4cout << steps[nstp-1][j] << " ";
|
||||
G4cout << " rgb( ";
|
||||
@@ -3223,7 +3223,7 @@ void G4GMocrenIO::calcPointers4() {
|
||||
}
|
||||
|
||||
// pointer to track data
|
||||
int ntrk = kTracks.size();
|
||||
int ntrk = (int)kTracks.size();
|
||||
if(ntrk != 0) {
|
||||
setPointerToTrackData(pointer);
|
||||
|
||||
@@ -3240,7 +3240,7 @@ void G4GMocrenIO::calcPointers4() {
|
||||
<< kPointerToTrackData << G4endl;
|
||||
|
||||
// pointer to detector data
|
||||
int ndet = kDetectors.size();
|
||||
int ndet = (int)kDetectors.size();
|
||||
if(ndet != 0) {
|
||||
kPointerToDetectorData = pointer;
|
||||
} else {
|
||||
@@ -3689,7 +3689,7 @@ bool G4GMocrenIO::mergeDoseDist(std::vector<class GMocrenDataPrimitive<double> >
|
||||
return false;
|
||||
}
|
||||
|
||||
int num = kDose.size();
|
||||
int num = (int)kDose.size();
|
||||
std::vector<class GMocrenDataPrimitive<double> >::iterator itr1 = kDose.begin();
|
||||
std::vector<class GMocrenDataPrimitive<double> >::iterator itr2 = _dose.begin();
|
||||
for(int i = 0; i < num; i++, itr1++, itr2++) {
|
||||
|
||||
Reference in New Issue
Block a user