Skip to Content.
Sympa Menu

opal - [Opal] Fwd: python and ROOT with OPAL

opal AT

Subject: The OPAL Discussion Forum

List archive

[Opal] Fwd: python and ROOT with OPAL

Chronological Thread 
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT>
  • To: opal <Opal AT>
  • Subject: [Opal] Fwd: python and ROOT with OPAL
  • Date: Thu, 24 Nov 2016 06:59:55 +0000
  • Accept-language: en-US, de-CH

Begin forwarded message:

From: Suzanne Sheehy <suzie.sheehy AT>
Subject: python and ROOT with OPAL
Date: 23 Nov 2016 19:38:42 CET
To: Chris Rogers < AT>, "Adelmann Andreas (PSI)" <andreas.adelmann AT>

Hi Chris and Andreas,

Sorry for my (perhaps) daft questions, and not much to do with OPAL technically, it’s more a “how is your system set up for this?” question…
I found the current setup in 'lattices/KurriMainRingWithAcceleration/ the particle just oscillates about 11 MeV energy, rather than accelerating, so after playing with the starting phase but with no luck, I decided I needed to re-do the frequency pattern. so then I was testing the script (in SCRIPTS) and ran into an issue.

The issue is quite simple, it is just that Chris’ script needs pyROOT. Now, ROOT comes packaged up with the OPAL binaries, so I’d ideally just like to use that version (ROOT V5).
But the OPAL packaged version doesn’t seem to come with to enable pyROOT to run (i.e. despite setting the paths, python cannot find or invoke ROOT, which is required in some of Chris’ scripts such as ‘’) 

Originally I had ROOT V6 installed separately on my system as well, but this sprung a different error (although I did not update it since changing to Mac OS X Sierra so this may have been the problem there).

Andreas - is there a way to use the packaged version of ROOT with PyROOT?
Or do you think I should just re-install ROOT V6 and invoke that for Chris’ script, while using ROOT V5 with OPAL for the H5ROOT stuff? 

A view of my environment variables etc, below… 

suzie-mb-air:~ Suzie$ echo $ROOTSYS
suzie-mb-air:~ Suzie$ echo $PYTHONPATH

suzie-mb-air:~ Suzie$ which python
suzie-mb-air:~ Suzie$ which ROOT

suzie-mb-air:~ Suzie$ python
Python 2.7.10 (default, Jul 14 2015, 19:46:27) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ROOT
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named ROOT

Archive powered by MHonArc 2.6.19.

Top of Page