Closed AndrewLevin closed 5 years ago
anaDACScan.py has some import statements that worked in my local gem-plotting-tools directory
Probably here is some misunderstanding of how tests should be perfomed...testing locally via:
% python someScript.py
Is not how this should be done, you should be testing the executable version that is in your $PATH (e.g. the version that your venv
has after installation):
someScript.py
Typing which someScript.py
will illustrate where the script is and confirm it's the right one tested in the right way.
The issue shown above is that your chamberInfo.py
in your venv
is trying to look for chambers that do not exist, e.g. GEMINIm01L1
. You need to be editing this such that the chamber_config
reflects accurately what data you are trying to analyze.
Then the permissions issue is another story. First correctly configure the chamber_config
dictionary for your use case.
Yes, once the chamberInfo.py is fixed the script works properly in the virtual environment:
(py2.7)[amlevin@gem904daq01 amlevin]$ anaDACScan.py /data/bigdisk/GEM-Data-Taking/GE11_QC8/dacScanV3/2018.10.31.14.28/dacScanV3.root --calFileList calibration_files_ADC0.txt
Analyzing: '/data/bigdisk/GEM-Data-Taking/GE11_QC8/dacScanV3/2018.10.31.14.28/dacScanV3.root'
/home/amlevin/venv/cc7/py2.7/lib/python2.7/site-packages/root_numpy/__init__.py:46: RuntimeWarning: numpy 1.14.6 is currently installed but you installed root_numpy against numpy 1.7.1. Please consider reinstalling root_numpy for this numpy version.
RuntimeWarning)
| OH | vfatN | dacVal |
| :-: | :---: | :----: |
| 0 | 0 | 89 |
| 0 | 1 | 92 |
| 0 | 2 | 88 |
| 0 | 3 | 100 |
| 0 | 4 | 87 |
| 0 | 5 | 109 |
| 0 | 6 | 91 |
| 0 | 7 | 80 |
| 0 | 8 | 88 |
| 0 | 9 | 88 |
| 0 | 10 | 89 |
| 0 | 11 | 95 |
| 0 | 12 | 94 |
| 0 | 13 | 91 |
| 0 | 14 | 85 |
| 0 | 15 | 95 |
| 0 | 16 | 87 |
| 0 | 17 | 94 |
| 0 | 18 | 92 |
| 0 | 19 | 96 |
| 0 | 20 | 90 |
| 0 | 21 | 90 |
| 0 | 22 | 92 |
| 0 | 23 | 89 |
Info in <TCanvas::Print>: png file /data/bigdisk/GEM-Data-Taking/GE11_QC8//GE11-X-S-INDIA-0002/dacScans/2018.10.31.14.28/Summary.png has been created
anaDACScan.py has some import statements that worked in my local gem-plotting-tools directory, but when gem-plotting-tools was installed in a virtual environment.
Description
I have updated two import statements to use a path that begins with
gempython
.Types of changes
Motivation and Context
This prevented a user from running the script: https://github.com/cms-gem-daq-project/gem-plotting-tools/issues/167
How Has This Been Tested?
It has been tested in a virtual environment, and works, except for what seems to be an unrelated issue with the chamberConfig:
Screenshots (if appropriate):
Checklist: