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>

Hello,

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

# Find ROOT
# include(FindROOT.cmake)
find_package(ROOT)

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

message(${CMAKE_MODULE_PATH})

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/JetEvent.cc.o: In function `Hit::Hit()':JetEvent.cc:(.text._ZN3HitC2Ev[_ZN3HitC5Ev]+0x1f): undefined reference to `vtable for Hit'

Same for Track and Jet

Also,

JetEvent.cc:(.text._ZNK8JetEvent3IsAEv[_ZNK8JetEvent3IsAEv]+0xd): undefined reference to `JetEvent::Class()'

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

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

Cheers,

-Yakov

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

1 None: Re: ROOT+G4 Working, Having Problem with custom Class   (Yakov Kulinich - 29 Mar, 2013)
1 None: Re: ROOT+G4 Working, Having Problem with custom Class   (Yakov Kulinich - 29 Mar, 2013)
2 None: Re: ROOT+G4 Working, Having Problem with custom Class   (Witek Pokorski - 03 Apr, 2013)
 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 ]