Problem 1566

Summary: nanobeam example does not compile w/o CLHEP but it's anyway configured
Product: Examples/Advanced Reporter: Andrea Dotti <andrea.dotti>
Component: nanobeamAssignee: Sebastien Incerti <incerti>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P5    
Version: 10.0   
Hardware: All   
OS: All   

Description Andrea Dotti 2014-01-25 00:10:37 CET
A long standing issue: if using internal CLHEP, nanobeam example is configured in the system if -DGEANT4_BUILD_EXAMPLES=ON , however it will not compile with a 
gmake all
This is quite confusing, example should be disabled if internal CLHEP are used.
(report from a user)

Andrea

[ 20%] Building CXX object advanced/nanobeam/CMakeFiles/nanobeam.dir/src/ActionInitialization.cc.o                                                           
In file included from /u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/src/ActionInitialization.cc:30:                                  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/PrimaryGeneratorAction.hh:32:33: error: CLHEP/Matrix/Matrix.h: No such file or directory                                                                                                                                                    
In file included from /u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/src/ActionInitialization.cc:31:                                  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:32:33: error: CLHEP/Matrix/Vector.h: No such file or directory    
In file included from /u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/src/ActionInitialization.cc:30:                                  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/PrimaryGeneratorAction.hh:60: error: 'HepMatrix' in namespace 'CLHEP' does not name a type                                                                                                                                                  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/PrimaryGeneratorAction.hh:60: warning: extra ';'                               
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/PrimaryGeneratorAction.hh:79: error: 'HepMatrix' in namespace 'CLHEP' does not name a type                                                                                                                                                  
In file included from /u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/src/ActionInitialization.cc:31:                                  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:69: error: 'HepVector' in namespace 'CLHEP' does not name a type  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:70: error: 'HepVector' in namespace 'CLHEP' does not name a type  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:71: error: 'HepVector' in namespace 'CLHEP' does not name a type  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:72: error: 'HepVector' in namespace 'CLHEP' does not name a type  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:73: error: 'HepMatrix' in namespace 'CLHEP' does not name a type  
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh: In member function 'void RunAction::AddToXVector(float)':        
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:55: error: 'fXVector' was not declared in this scope              
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh: In member function 'void RunAction::AddToYVector(float)':        
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:56: error: 'fYVector' was not declared in this scope              
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh: In member function 'void RunAction::AddToThetaVector(float)':    
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:57: error: 'fThetaVector' was not declared in this scope          
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh: In member function 'void RunAction::AddToPhiVector(float)':      
/u1/projects/slic/geant4-test/geant4/10.00/examples/advanced/nanobeam/include/RunAction.hh:58: error: 'fPhiVector' was not declared in this scope            
/u1/projects/slic/geant4-test/geant4/10.00/include/Geant4/CLHEP/Random/Randomize.h: At global scope:                                                         
/u1/projects/slic/geant4-test/geant4/10.00/include/Geant4/CLHEP/Random/Randomize.h:61: warning: 'CLHEP::HepRandomGenActive' defined but not used             
/u1/projects/slic/geant4-test/geant4/10.00/include/Geant4/CLHEP/Units/PhysicalConstants.h:79: warning: 'CLHEP::electron_charge' defined but not used         
make[2]: *** [advanced/nanobeam/CMakeFiles/nanobeam.dir/src/ActionInitialization.cc.o] Error 1                                                               
make[1]: *** [advanced/nanobeam/CMakeFiles/nanobeam.dir/all] Error 2                                                                                         
make: *** [all] Error 2          

The rest seem fine.
Comment 1 Sebastien Incerti 2014-06-29 00:03:26 CEST
Fixed thanks to the help of Brycen Wengt (CERN)
Tags:
nanobeam-V10-00-01
advanced-V10-00-00