Skip to content
Snippets Groups Projects
Commit 7f586705 authored by Dmitry Popov's avatar Dmitry Popov
Browse files

Fixed: LHCb tests G4 linking, do not compile G4SamplingCaloTest_postprocess.C but run it via ROOT

parent 75365c0f
No related branches found
No related tags found
1 merge request!24Migrate 'master' to G4 v10r3p3
......@@ -10,7 +10,16 @@ link_directories(${CMAKE_INSTALL_PREFIX}/lib)
set(Geant4_LIBRARIES
-lG4analysis
-lG4physics_lists)
-lG4physics_lists
-lG4intercoms
-lG4global
-lG4run
-lG4event
-lG4processes
-lG4particles
-lG4geometry
-lG4materials
-lG4graphics_reps)
gaudi_add_executable(G4HadronicXSectionsTest
G4HadronicXSectionsTest.cc src/*.cc
......
......@@ -4,14 +4,20 @@ gaudi_depends_on_subdirs(Geant4/G4config)
gaudi_depends_on_subdirs(LHCbG4PhysLists)
find_package(CLHEP REQUIRED)
find_package(ROOT COMPONENTS Hist Gpad)
find_package(ROOT COMPONENTS Hist Gpad RIO)
include_directories(${CMAKE_INSTALL_PREFIX}/include)
link_directories(${CMAKE_INSTALL_PREFIX}/lib)
set(Geant4_LIBRARIES
-lG4analysis
-lG4physics_lists)
-lG4physics_lists
-lG4intercoms
-lG4event
-lG4tracking
-lG4track
-lG4geometry
-lG4materials)
gaudi_add_executable(G4MScInThinLayerTest
G4MScInThinLayerTest.cc src/*.cc
......
......@@ -10,7 +10,13 @@ link_directories(${CMAKE_INSTALL_PREFIX}/lib)
set(Geant4_LIBRARIES
-lG4analysis
-lG4physics_lists)
-lG4physics_lists
-lG4intercoms
-lG4event
-lG4tracking
-lG4track
-lG4geometry
-lG4materials)
gaudi_add_executable(G4SamplingCaloTest
G4SamplingCaloTest.cc src/*.cc
......
......@@ -38,7 +38,7 @@ vector<SeperateProfiles> Profiles(15);
vector<M> Control(15);
double nEvents = 10000;
int main() {
int G4SamplingCaloTest_postprocess() {
TCanvas *c[15];
ofstream outt;
outt.open("results.txt");
......@@ -461,4 +461,10 @@ int main() {
selected.close();
outt.close();
// cout << "this was compiled with my script" << endl;
return 0;
}
int main() {
return G4SamplingCaloTest_postprocess();
}
......@@ -361,14 +361,18 @@ def main():
cmd = ' '.join(['G4SamplingCaloTest.exe', cfg_file_name])
subprocess.call(cmd, shell=True)
print 'Compiling the post-processing application...'
cmd = ' '.join(['g++', '-c', '`root-config --cflags`',
'$G4SAMPLINGCALOTESTROOT/G4SamplingCaloTest_postprocess.C'])
subprocess.call(cmd, shell=True)
cmd = ' '.join(['g++', '-o', 'G4SamplingCaloTest_postprocess', '`root-config --glibs`',
'G4SamplingCaloTest_postprocess.o'])
subprocess.call(cmd, shell=True)
subprocess.call('./G4SamplingCaloTest_postprocess', shell=True)
# Do not compile, run via ROOT directly
#print 'Compiling the post-processing application...'
#cmd = ' '.join(['g++', '-c', '`root-config --cflags`',
# '$G4SAMPLINGCALOTESTROOT/G4SamplingCaloTest_postprocess.C'])
#subprocess.call(cmd, shell=True)
#cmd = ' '.join(['g++', '-o', 'G4SamplingCaloTest_postprocess', '`root-config --glibs`',
# 'G4SamplingCaloTest_postprocess.o'])
#subprocess.call(cmd, shell=True)
#subprocess.call('./G4SamplingCaloTest_postprocess', shell=True)
print 'Running the post-processing application...'
subprocess.call('root -l -b -q $G4SAMPLINGCALOTESTROOT/G4SamplingCaloTest_postprocess.C', shell=True)
print "Results produced in Save.root, Selectedresults.root and selectedresults.txt"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment