Hello Holly,

What PyRoot is telling you is that it cannot find the library that defines the HpsEvent. The places it is looking are listed. It seems to me that it is looking for the wrong name, it should be looking for libHpsEvent.dylib and not .so.

What I did on my Mac. Your issue appears to at step 6.

1) I use ROOT 6.06/07 as my standard distribution, but ROOT 5.x should also work.
2) Build the LCIO library and set the LCIO environment variable: “export LCIO=<path to LCIO>”
3) Create a build directory for hps-dst:  mkdir build
4) go into the dir, and run cmake: “cd build” and “cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`”
5) Now you should have a “lib” dir in the build dir. That dir should have “libHpsEvent.dylib”
         a) IF you are using ROOT6, you need to copy the pcm file to the lib dir: “cp src/root_dic/HpsEventDic_rdict.pcm  lib"

6) You now need to fix up the example analysis script, two things:
a) On line 243 change:  mass = particle.Mass() to  mass = particle.getMass()
b) Either change line 83:  to libHpsEvent.dylib, OR make a link in the lib directory: “ln -s libHpsEvent.dylib”

I can now run the script. 
Note you probably want to run it with -o output.pdf to get a PDF file and not a PS file.

I should edit the confluence page, but my credentials are currently messed up :-)


On May 20, 2016, at 10:54 AM, Holly Vance <[log in to unmask]> wrote:


I am trying to use the DSTs again for analysis, but I can never seem to get the libraries linking correctly when following the online instructions. As basic example, I try to run an example code:

python hps_005772.100_v0_R3.8.root -o output

I get the following error which relates to the inability to import these libraries that I need in order to run any kind of analysis code using DSTs

Error in <TMacOSXSystem::DynamicPathName>: /Users/hollyvance/Documents/hps-dst/build/lib/ does not exist in /Users/hollyvance/Documents/lcio-trunk/lib:/Users/hollyvance/Applications/root/lib:/Users/hollyvance/Applications/root/lib::.:/Users/hollyvance/Applications/root/lib::/Users/hollyvance/Applications/root/cint/cint/stl

Traceback (most recent call last):

  File "", line 285, in <module>


  File "", line 91, in main

    from ROOT import HpsEvent, SvtTrack, EcalCluster, EcalHit, HpsParticle

ImportError: cannot import name HpsEvent

Can someone tell me if it seems I have forgotten something? I have followed all of the instructions on this page:



Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:

Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link: