Message: ROOT+G4 Working, Having Problem with custom Class Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question ROOT+G4 Working, Having Problem with custom Class 

Forum: Analysis
Date: 29 Mar, 2013
From: Yakov Kulinich <Yakov Kulinich>


I have ROOT working with Geant4.09 successfully by adding to cmake:

# Find ROOT
# include(FindROOT.cmake)

# Add ROOTs header paths include_directories(${ROOT_INCLUDE_DIR})


option(ANALYSIS_HH_ "Build with ROOT" 1) add_definitions(-DG4UI_USE -DG4VIS_USE -DANALYSIS_HH_) ... ... target_link_libraries(sPhenix ${Geant4_LIBRARIES} ${ROOT_LIBRARIES})

Now, I am trying to read in G4 a ROOT tree full of events, in this case, JetEvent from the ROOT tutorials (I intend to modify it after it reads successfully).

The JetEvent.cpp and JetEvent.h are located in $ROOTSYS/tutorials/tree

I am trying to read in the generated tree in a PrimaryGeneratorAction Class.

Upon linking, I get the following:

CMakeFiles/sPhenix.dir/src/ In function `Hit::Hit()'[_ZN3HitC5Ev]+0x1f): undefined reference to `vtable for Hit'

Same for Track and Jet

Also,[_ZNK8JetEvent3IsAEv]+0xd): undefined reference to `JetEvent::Class()'

CMakeFiles/sPhenix.dir/src/[_ZTV8JetEvent]+0x1d0): undefined reference to `JetEvent::ShowMembers(TMemberInspector&)'

CMakeFiles/sPhenix.dir/src/[_ZTV8JetEvent]+0x1d8): undefined reference to `JetEvent::Streamer(TBuffer&)' Would anyone advise?



 Add Message Add Message
to: "ROOT+G4 Working, Having Problem with custom Class"

 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 ]