Fixed most of the compiler warnings under gcc 3.2.3.

Modified lemuEnv.sh and update.sh.
This commit is contained in:
prokscha 2006-03-16 13:49:31 +00:00
parent 68a2fbe9c2
commit 04cbb83b5d
21 changed files with 75 additions and 70 deletions

View File

@ -24,18 +24,19 @@ cp G4MuonDecayChannel.cc $G4INSTALL/source/particles/management/src/
cp G4MuonDecayChannel.hh $G4INSTALL/source/particles/management/include/
cd $G4INSTALL/source/geometry/magneticfield/
gmake clean
#cd $G4INSTALL/source/geometry/magneticfield/
#gmake clean
#gmake
#cd $G4INSTALL/source/particles/management/
#gmake clean
#gmake
cd $G4INSTALL/source
gmake
cd $G4INSTALL/source/particles/management/
gmake clean
gmake
cd ~/LEMuSR/G4Modified
cd $G4WORKDIR

View File

@ -1,4 +1,4 @@
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION Geant4 SIMULATION
// ID : LEMuSR.cc , v 1.2
// AUTHOR: Taofiq PARAISO
@ -60,15 +60,14 @@
#endif
int main(int argc,char** argv)//argc:: defines the user interface
int main() //argc:: defines the user interface
{
// random numbers
time_t myseed;
time(&myseed);
RanecuEngine *theRanGenerator = new RanecuEngine;
theRanGenerator->setSeed(myseed);
HepRandom::setTheEngine(theRanGenerator);
HepRandom::setTheEngine(theRanGenerator);
//! 1 The run manager construction

View File

@ -21,8 +21,8 @@
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//
#include "G4ElectricField.hh"
#include"G4ThreeVector.hh"
#include"G4ios.hh"
#include "G4ThreeVector.hh"
#include "G4ios.hh"
/*!
* This class is defines homogenous electric field in the cryostat region.
* It is obsolete since a field map has been introduces for this region.
@ -39,7 +39,7 @@ public:
/*! The constructor initializes the field within the boundary cylinder centered in mcpv_z, radius and length= zmax-zmin
*/
LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax,G4double mcpv_z);
LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax);
~LEMuSRCryoField();
G4bool DoesFieldChangeEnergy() const { return true; }

View File

@ -119,5 +119,4 @@ inline void LEMuSRCryoHit :: operator delete(void *aHit)
LEMuSRCryoHitAllocator.FreeSingle((LEMuSRCryoHit*) aHit);
}
#endif

View File

@ -33,7 +33,7 @@ public:
~LEMuSRRNDMAGField();
void GetFieldValue(const G4double pos[4], G4double *field) const;
G4bool uniform;

View File

@ -1,12 +1,12 @@
export G4VRMLFILE_VIEWER=freewrl_sa
export G4VRMLFILE_VIEWER=freewrl_sa
export G4UI_USE_TCSH=1
# ROOT
export ROOTSYS=/usr/local/root
# ROOT, ROOTSYS usually defined in /etc/profile
#export ROOTSYS=/usr/local/root
export G4UI_BUILD_ROOT_SESSION=1
export PATH=$ROOTSYS/bin:$PATH
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
#export PATH=$ROOTSYS/bin:$PATH
#export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
@ -16,7 +16,7 @@ export G4VIS_BUILD_OPENGLX_DRIVER=1
export G4VIS_USE_OPENGLX=1
export G4VIS_BUILD_DAWN_DRIVER=1
export G4VIS_BUILD_DAWN_DRIVER=1
export G4VIS_USE_DAWN=1
export DAWN_PS_PREVIEWER='/usr/X11R6/bin/gv'
export G4DAWN_NAMED_PIPE=1
@ -29,6 +29,6 @@ export ASYM_USE_LEMU=1
export LEMuSR_FIELDMAPS_DIR=/scratch/FieldMaps
alias mu=~/geant4/bin/Linux-g++/LEMuSR
alias mu=$G4WORKDIR/bin/Linux-g++/LEMuSR
export wlem=~/LEMuSR

View File

@ -34,7 +34,7 @@ LEMuSRCryoField::LEMuSRCryoField(G4ThreeVector FieldVector)
LEMuSRCryoField::~LEMuSRCryoField()
{;}
LEMuSRCryoField:: LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax, G4double mcpv_z)
LEMuSRCryoField:: LEMuSRCryoField(G4ThreeVector FieldVector,G4double radius,G4double zmin, G4double zmax)
{
// initialize

View File

@ -26,8 +26,8 @@
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
#include "G4ios.hh"
#include <fstream.h>
#include <iomanip.h>
#include <fstream>
#include <iomanip>
#include "G4UnitsTable.hh"
@ -85,12 +85,14 @@ void LEMuSRCryoHit::Print()
void LEMuSRCryoHit::print(G4String name)
{
using namespace std;
ofstream TestPrint(name,ios::app);
if (!TestPrint.is_open()) exit(8);
TestPrint << "particle name : " << particle_name <<" ;\n "
<< "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n "
<< "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n "
<< "position : " << position <<" ;\n "
TestPrint << "particle name : " << particle_name <<" ;\n "
<< "energy_deposition : " << G4BestUnit(energy_deposition,"Energy") <<" ;\n "
<< "time_of_flight : " << G4BestUnit(time_of_flight,"Time") <<" ;\n "
<< "position : " << position <<" ;\n "
<< "momentum : " << momentum <<" ;\n "
<<G4endl;

View File

@ -168,9 +168,8 @@ LEMuSRDetectorMessenger::~LEMuSRDetectorMessenger()
void LEMuSRDetectorMessenger::SetNewValue(G4UIcommand* command, G4String newvalue)//MUST have the name SetNewValue:: inherited method from messenger class.
{
G4UImanager* UI = G4UImanager::GetUIpointer();
{
//G4UImanager* UI = G4UImanager::GetUIpointer();
if(command == SetDetMode)
{

View File

@ -22,7 +22,7 @@
#include "LEMuSRMagneticField.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include <iomanip>
LEMuSRMagneticField::LEMuSRMagneticField(const G4ThreeVector FieldVector)

View File

@ -1,4 +1,4 @@
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
//
// ID : LEMuSRDetectorConstruction.cc , v 1.0
@ -54,7 +54,7 @@
// G4 CLASSES
#include "G4ios.hh"
#include <iomanip.h>
#include <iomanip>
// HEADER
@ -89,7 +89,7 @@ void LEMuSRDetectorConstruction :: LoadAttributes()
{
// visual attributes
G4VisAttributes InBlack = new G4VisAttributes(G4Colour(0.,0.,0.));// for special projection plot.
//G4VisAttributes InBlack = new G4VisAttributes(G4Colour(0.,0.,0.));// for special projection plot.
Blue_style = new G4VisAttributes(G4Colour(0.80,0.83,1.));// InBlack
Blue_style->SetForceSolid(true);
//Blue_style->SetForceWireframe(false);

View File

@ -26,8 +26,8 @@
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
#include "G4ios.hh"
#include <fstream.h>
#include <iomanip.h>
#include <fstream>
#include <iomanip>
#include "G4UnitsTable.hh"
@ -85,6 +85,8 @@ void LEMuSRMcpHit::Print()
void LEMuSRMcpHit::print(G4String name)
{
using namespace std;
ofstream TestPrint(name,ios::app);
if (!TestPrint.is_open()) exit(8);
TestPrint << "particle name : " << particle_name <<" ;\n "

View File

@ -26,8 +26,8 @@
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
#include "G4ios.hh"
#include <fstream.h>
#include <iomanip.h>
#include <fstream>
#include <iomanip>
#include "G4UnitsTable.hh"
@ -85,6 +85,8 @@ void LEMuSROScintHit::Print()
void LEMuSROScintHit::print(G4String name)
{
using namespace std;
ofstream TestPrint(name,ios::app);
if (!TestPrint.is_open()) exit(8);
TestPrint << "particle name : " << particle_name <<" ;\n "

View File

@ -28,10 +28,10 @@ G4Step* LEMuSRParticleChangeForSR::UpdateStepForAtRest(G4Step* pStep)
{
G4StepPoint* pPreStepPoint = pStep->GetPreStepPoint();
G4StepPoint* pPostStepPoint = pStep->GetPostStepPoint();
G4Track* aTrack = pStep->GetTrack();
//G4Track* aTrack = pStep->GetTrack();
// update polarization
pPostStepPoint->SetMomentumDirection(theMomentumDirectionChange);
pPostStepPoint->SetKineticEnergy(theEnergyChange);
pPostStepPoint->AddPolarization( thePolarizationChange

View File

@ -37,7 +37,7 @@
#include "G4Tokenizer.hh"
#include <iomanip>
#include <strstream>
#include <sstream>
LEMuSRParticleGunMessenger::LEMuSRParticleGunMessenger(LEMuSRParticleGun* fPtclGun)

View File

@ -1,4 +1,4 @@
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
//$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$//*
// LOW ENERGY MUON SPIN RELAXATION, ROTATION, RADIATION
//
// ID : LEMuSRPrimaryGeneratorAction.cc , v 1.3
@ -44,7 +44,7 @@
#include "G4RunManager.hh"
#include "time.h"
#include "G4ios.hh"
#include <iomanip.h>
#include <iomanip>
#include "LEMuSRMuoniumParticle.hh"

View File

@ -22,7 +22,7 @@
#include "LEMuSRRNDMAGField.hh"
#include "G4ios.hh"
#include <iomanip.h>
#include <iomanip>
#include "Randomize.hh"
#include "globals.hh"
#include "G4Transform3D.hh"
@ -48,17 +48,15 @@ LEMuSRRNDMAGField::LEMuSRRNDMAGField(const G4ThreeVector FieldVector, G4double
LEMuSRRNDMAGField::~LEMuSRRNDMAGField()
{;}
void LEMuSRRNDMAGField::GetFieldValue (const G4double pos[4],
G4double *field ) const
void LEMuSRRNDMAGField::GetFieldValue (const G4double pos[4], G4double *field ) const
{
field[0]= 0.0;
G4double x = pos[0]; // dummy usage to avoid compiler warning
field[0]= 0.0 * x;
field[1]= 0.0;
field[2]= 0.0;
G4double costheta, sintheta, cosphi, sinphi, theta, phi;
phi = 2.0*M_PI*G4UniformRand()*rad;
@ -76,7 +74,7 @@ void LEMuSRRNDMAGField::GetFieldValue (const G4double pos[4],
G4ThreeVector direction0(px,py,pz);
field[0]= BField.x()*(1-randomness) + direction0.x()*(randomness) ;//TAO
field[1]= BField.y()*(1-randomness) + direction0.y()*(randomness) ;

View File

@ -62,7 +62,7 @@ LEMuSRRunAction::~LEMuSRRunAction()
*/
void LEMuSRRunAction::BeginOfRunAction(const G4Run* aRun)
{
G4UImanager* UI = G4UImanager::GetUIpointer();
// G4UImanager* UI = G4UImanager::GetUIpointer();
/* G4cout<<"WILL REBUILD THE DETECTOR"<<G4endl;
UI->ApplyCommand("/Detector/View total");
G4VPhysicalVolume* newDetector = LEMuSRDetectorConstruction::GetInstance()->Construct();

View File

@ -26,8 +26,8 @@
#include "G4Colour.hh"
#include "G4VisAttributes.hh"
#include "G4ios.hh"
#include <fstream.h>
#include <iomanip.h>
#include <fstream>
#include <iomanip>
#include "G4UnitsTable.hh"
@ -85,6 +85,8 @@ void LEMuSRScintHit::Print()
void LEMuSRScintHit::print(G4String name)
{
using namespace std;
ofstream TestPrint(name,ios::app);
if (!TestPrint.is_open()) exit(8);
TestPrint << "particle_name : " << particle_name <<" ;\n"

View File

@ -46,6 +46,7 @@ void LEMuSRStackingActionMessenger::SetNewValue(G4UIcommand *,G4String)
G4String LEMuSRStackingActionMessenger::GetCurrentValue(G4UIcommand *)
{
;
//to make the compiler satisfied with function declaration
return "LEMuSRStackingActionMessenger::GetCurrentValue undefined";
}

View File

@ -348,7 +348,7 @@ void meyer:: Get_F_Function_Meyer(double tau, double Ekin, double Z1, double Z2,
Mprint << theta<< " "<< fValues[i]/fValues[1]<<" " << fValuesFolded[i]<<std::endl;
theta = theta + thetaStep;
}
Mprint.close();
*/
}
@ -356,9 +356,9 @@ void meyer:: Get_F_Function_Meyer(double tau, double Ekin, double Z1, double Z2,
//=============================================================================================================================================================//
void meyer:: Get_F_Function(double tau,double theta, double Ekin, double Z1, double Z2, double m1, double m2, double* F)
{
double thetaSchlange,thetaSchlangeMax;
double thetaMax,thetaStep;
double thetaSchlange; //thetaSchlangeMax;
double thetaStep; //thetaMax
double f1,f2;
@ -420,7 +420,7 @@ void meyer:: Get_F_Function(double tau,double theta, double Ekin, double Z1, dou
// common /MeyerTable/ value,area,integ,thetaStep,nBin
int i;
double rHelp;
//double rHelp;
int HB_memsize;
HB_memsize=500000;
@ -430,8 +430,8 @@ void meyer:: Get_F_Function(double tau,double theta, double Ekin, double Z1, dou
//nur noch fuer Testzwecke:
double fValues[203];
double fValuesFolded[203];
//double fValues[203];
//double fValuesFolded[203];
int idh;
idh = 50;