cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

Bug Report: anaDACScans.py generates KeyError if --calFileList Not Provided #171

Closed bdorney closed 5 years ago

bdorney commented 5 years ago

Brief summary of issue

When trying to analyze DAC scan data without providing the --calFileList argument a KeyError is thrown.

Types of issue

Expected Behavior

Should not throw a KeyError.

Current Behavior

With calibration file located under:

% ls /data/bigdisk/GEM-Data-Taking/GE11_QC8/GE11-X-S-CERN-0010/calFile_ADC0_GE11-X-S-CERN-0010.txt
/data/bigdisk/GEM-Data-Taking/GE11_QC8/GE11-X-S-CERN-0010/calFile_ADC0_GE11-X-S-CERN-0010.txt

Calling analysis:

% anaDACScan.py dacScanV3.root                                                                                              
Analyzing: 'dacScanV3.root'
Loading info from input TTree
Initializing TObjects
Looping over stored events in dacScanTree
Traceback (most recent call last):
  File "../venv/cc7/py2.7/lib/python2.7/site-packages/gempython/scripts/anaDACScan.py", line 236, in <module>
    calibrated_ADC_value=calInfo[oh]['slope'][vfat]*event.dacValY+calInfo[oh]['intercept'][vfat]
KeyError: 0

Steps to Reproduce (for bugs)

  1. Take a DAC scan,
  2. Ensure calibration file is in the appropriate location,
  3. Call anaDACScan.py dacScanV3.root

Possible Solution (for bugs)

Don't have time to investigate.

Context (for feature requests)

Should work out of the box.

Your Environment