Hi,
I am unable to get a root output file with the hadrontherapy example in the latest geant4 11.0.0 with root 6.24.00. I could create a root output in my previous geant4 version 10.02.p03. I am booking the root output inside HadrontherapyMatrix.cc. Also, I am using the usual methods like book(), flush() in my hadrontherapy.cc. I can run the example B5 and create the root outputs. I would really appreciate any help. Thanks.
- I have the set G4ANALYSIS_USE_ROOT=1
- I have included the root include directories as following:
find_package(ROOT REQUIRED)
include_directories(${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/shared/include
${Geant4_INCLUDE_DIR}
${ROOT_INCLUDE_DIRS})
add_executable(hadrontherapy hadrontherapy.cc ${sources} ${headers})
target_link_libraries(hadrontherapy ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} )
- My GNUMakefile looks like:
ifdef G4ANALYSIS_USE_ROOT # If we have ROOT
CPPFLAGS += -DG4ANALYSIS_USE_ROOT
CPPFLAGS += $(shell root-config --cflags)
EXTRALIBS += $(shell root-config --glibs)
endif