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

vthr TTree Attribute error #98

Closed AndrewLevin closed 6 years ago

AndrewLevin commented 6 years ago

Brief summary of issue

The ana_scans.py script terminates normally but reports a caught exception. The anaLog.log files shows that an AttributeError involving a TTree occurred.

Types of issue

Bug report

Expected Behavior

I have never successfully run the script before.

Current Behavior

[gemuser@gem904qc8daq gemdaq]$ ana_scans.py --scandate=current --ztrim=4 --anaType=scurve  2>&1 | tee -a ana_scurve_log.txt
Running jobs in parallel mode (using Pool(12))
Analysis Requested: scurve
Analysis Requested: scurve
Analysis Requested: scurve
Analysis Requested: scurve
Error: command exited with non-zero code 1
Error: command exited with non-zero code 1
Error: command exited with non-zero code 1
Error: command exited with non-zero code 1
[1, 1, 1, 1]
Normal termination
Results: [1, 1, 1, 1]
Caught non-Python Exception <type 'exceptions.SystemExit'>
[gemuser@gem904qc8daq gemdaq]$ cat /data/bigdisk/GEM-Data-Taking/GE11_QC8//GE11-VII-S-CERN-0001/scurve/current/anaLog.log
mkdir: cannot create directory ‘/data/bigdisk/GEM-Data-Taking/GE11_QC8//GE11-VII-S-CERN-0001/scurve//current/SCurveData’: File exists
Analyzing: '/data/bigdisk/GEM-Data-Taking/GE11_QC8//GE11-VII-S-CERN-0001/scurve//current/SCurveData.root'
Traceback (most recent call last):
  File "/opt/cmsgemos/bin/anaUltraScurve.py", line 298, in <module>
    vthr_list[event.vfatN][event.vfatCH] = event.vthr
AttributeError: 'TTree' object has no attribute 'vthr'

Steps to Reproduce (for bugs)

  1. ssh to gemuser@gem904qc8daq from lxplus
  2. execute "ana_scans.py --scandate=current --ztrim=4 --anaType=scurve 2>&1 | tee -a ana_scurve_log.txt"

Possible Solution (for bugs)

I have no idea.

Your Environment

bdorney commented 6 years ago

This issue stems from an earlier change: https://github.com/cms-gem-daq-project/gem-plotting-tools/pull/52

I think this showed back up in anaUltraScurve.py since in the v2b version of ultraScurve.py there is no vthr branch created however in v3 version of the script there is. See for example:

https://github.com/cms-gem-daq-project/vfatqc-python-scripts/blob/develop/treeStructure.py

vs.

https://github.com/cms-gem-daq-project/vfatqc-python-scripts/blob/c1d515392f492be3611988e68579ae7008199c40/ultraScurve.py#L76-L77

The PR #99 should resolve this issue.