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

None Re: ROOT+G4 Working, Having Problem with custom Class 

Forum: Analysis
Re: Question ROOT+G4 Working, Having Problem with custom Class (Yakov Kulinich)
Date: 03 Apr, 2013
From: Witek Pokorski <Witek Pokorski>

Hi Yakov,

I am not sure I fully understand what you are doing, but I guess what is missing is some library containing the dictionary information for the classes you want to read. If you look in geant4/examples/extended/persistency/P01 you will see that in the link statement we have the library with the dictionary for the classes we want to persistify:

target_link_libraries(exampleP01 ExP01ClassesDict ${Geant4_LIBRARIES} ${ROOT_LIBRARIES} Cintex)

I guess you need to have something similar in your case. I mean, you need to link you executable with some sort of dictionary library for JetEvents.

Cheers, Witek

On Fri, 29 Mar 2013 21:30:45 GMT, Yakov Kulinich wrote:

> 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
> 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,
> 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?
> Cheers,
> -Yakov

 Add Message Add Message
to: "Re: 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 ]