Skip to Content.
Sympa Menu

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

opal AT lists.psi.ch

Subject: The OPAL Discussion Forum

List archive

Re: [Opal] python and ROOT with OPAL


Chronological Thread 
  • From: "Adelmann Andreas (PSI)" <andreas.adelmann AT psi.ch>
  • To: Suzanne Sheehy <suzie.sheehy AT physics.ox.ac.uk>, "Gsell Achim (PSI)" <achim.gsell AT psi.ch>
  • Cc: opal <Opal AT lists.psi.ch>
  • Subject: Re: [Opal] python and ROOT with OPAL
  • Date: Thu, 24 Nov 2016 07:34:42 +0000
  • Accept-language: en-US, de-CH

Hi Suzie you are making a very good point. 

Actually you can not use pyRoot in the pre-build bin package. So
just use an external build root package.  

@Achim: can you check if we can build root with pyRoot enabled for the next release?

A


------
Dr. sc. math. Andreas (Andy) Adelmann
Staff Scientist
Paul Scherrer Institut WBBA/219 CH-5232 Villigen PSI
Phone Office: xx41 56 310 42 33 Fax: xx41 56 310 31 91
Phone Home: xx41 62 891 91 44
-------------------------------------------------------
Friday: ETH CAB F37 or HPK G 28   +41 44 632 75 22
============================================
The more exotic, the more abstract the knowledge, 
the more profound will be its consequences.
Leon Lederman 
============================================

On 24 Nov 2016, at 07:59, Adelmann Andreas (PSI) <andreas.adelmann AT psi.ch> wrote:

Begin forwarded message:

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

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/KurriMainRingWithAcceleration.in 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 find_rf_freq.py 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 ROOT.py 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 ‘find_rf_freq.py’) 

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
/Users/Suzie/Physics/OPAL-1.4.0-1
suzie-mb-air:~ Suzie$ echo $PYTHONPATH
:/Users/Suzie/Physics/OPAL-1.4.0-1/bin/ROOT:/Library/Python/2.7/site-packages:/Users/Suzie/Physics/KURRIFFAG/JUNE15/KURRI_analysis_scripts/defs

suzie-mb-air:~ Suzie$ which python
/usr/bin/python
suzie-mb-air:~ Suzie$ which ROOT
/Users/Suzie/Physics/OPAL-1.4.0-1/bin/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