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

Resolving Version Mismatch w/cx_Oracle & sqlalchemy (Issue #240) and Providing Tool for Comparing Results from anaUltraLatency.py #241

Closed bdorney closed 5 years ago

bdorney commented 5 years ago

Description

Closes issue #240 al-la suggestion by @jsturdy here adding tool for comparing results from anaUltraLatency.py.

New tool: plotLatComp.py with help menu:

% plotLatComp.py -h
usage: plotLatComp.py [-h] [-a] [-e EVENTSPERLAT] [-n] [-s] filename

Arguments to supply to plotLatComp.py

positional arguments:
  filename              Tab delimited filename specifying list of scandates to
                        compare. First line understood as column header. First
                        column is chamber_name, second is scandate, and third
                        will be used to fill a TLegend. See documentation for
                        parseListOfScanDatesFile(...) for more details

optional arguments:
  -h, --help            show this help message and exit
  -a, --alphaLabels     Provide this argument if alphanumeric characters exist
                        in the third column of the input file
  -e EVENTSPERLAT, --eventsPerLat EVENTSPERLAT
                        Number of events per latency bin; used to set height
                        of y-axis on all output plots
  -n, --noLeg           Do not draw a TLegend on the output plots
  -s, --savePlots       Make *.png file for all plots that will be saved in
                        the output TFile

Types of changes

Breaking because previously the $ENV variable GEM_ONLINE_DB_CONN was of the form:

export GEM_ONLINE_DB_CONN="oracle://DBUSER:DBPASS@"

Where DBUSER and DBPASS where the username and password respectively. Now GEM_ONLINE_DB_CONN is expected to be:

export GEM_ONLINE_DB_CONN="DBUSER/DBPASS@"

This is due to the differences in syntax between cx_Oracle and sqlalchemy.

Motivation and Context

240 and we needed a tool to easily compare results from anaUltraLatency.py.

How Has This Been Tested?

Example call of plotLatComp.py:

plotLatComp.py -a -e 100 listOfScanDates_latResults_weirdRateEffect.txt

Screenshots (if appropriate):

LatScan_DifferentRates

Checklist:

mexanick commented 5 years ago

Needs a rebase

bdorney commented 5 years ago

@mexanick this has been rebased

bdorney commented 5 years ago

I've rebased this and addressed concerns. Ready for re-review @jsturdy and @mexanick