Message: Re: Example B1 Modification Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: Example B1 Modification 

Forum: Particles
Re: None Example B1 Modification (Maxwell Dierken)
Re: Feedback Re: Example B1 Modification (Gumplinger Peter)
Date: 05 Feb, 2014
From: Maxwell Dierken <Maxwell Dierken>

Thanks Peter, that did resolve one of the errors. However now I seem to have an error with the RunAction.cc source file. when I try to run the make this time I get the following error:

[apistudent@ip021-146 S1.1-build]$ make Scanning dependencies of target exampleS1 [ 12%] Building CXX object CMakeFiles/exampleS1.dir/exampleS1.cc.o [ 25%] Building CXX object CMakeFiles/exampleS1.dir/src/S1DetectorConstruction.cc.o [ 37%] Building CXX object CMakeFiles/exampleS1.dir/src/S1EventAction.cc.o [ 50%] Building CXX object CMakeFiles/exampleS1.dir/src/S1ActionInitialization.cc.o [ 62%] Building CXX object CMakeFiles/exampleS1.dir/src/S1RunAction.cc.o /home/apistudent/Desktop/S1/src/S1RunAction.cc: In member function ‘virtual void S1RunAction::EndOfRunAction(const G4Run*)’: /home/apistudent/Desktop/S1/src/S1RunAction.cc:112: error: expected initializer before ‘*’ token /home/apistudent/Desktop/S1/src/S1RunAction.cc:113: error: ‘particleGun’ was not declared in this scope /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Units/PhysicalConstants.h: At global scope: /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Units/PhysicalConstants.h:79: warning: ‘CLHEP::electron_charge’ defined but not used /home/apistudent/Desktop/geant4.10.0-install/include/Geant4/CLHEP/Random/Randomize.h:61: warning: ‘CLHEP::HepRandomGenActive’ defined but not used make[2]: *** [CMakeFiles/exampleS1.dir/src/S1RunAction.cc.o] Error 1 make[1]: *** [CMakeFiles/exampleS1.dir/all] Error 2 make: *** [all] Error 2 [apistudent@ip021-146 S1.1-build]$

Now it appears that the problem is on lines 112 & 113 of the RunAction file. Those lines read:

111 { 112 const G4ParticleGun* particleGun = generatorAction->GetParticleGun(); 113 runCondition += particleGun->GetParticleDefinition()->GetParticleName(); 114 runCondition += " of "; 115 G4double particleEnergy = particleGun->GetParticleEnergy(); 116 runCondition += G4BestUnit(particleEnergy,"Energy"); 117 }

I am not sure how to make the file call G4GeneralParticleSource and I was hoping you could point me in the right direction. Again, thanks in advance.

   -Max

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Example B1 Modification   (Gumplinger Peter - 05 Feb, 2014)
(_ None: Re: Example B1 Modification   (Maxwell Dierken - 05 Feb, 2014)
 Add Message Add Message
to: "Re: Example B1 Modification"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]