-
Notifications
You must be signed in to change notification settings - Fork 29
[feature_request] writeGBTPhase.py takes input textfile and writes all phases #280
Comments
…gle or all VFAT links
@jsturdy , @bdorney: Please see the updated script ram1123@2b6b271 . Also, I tried to test it on [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py single 0 7 4 2 5
Open pickled address table if available /opt/cmsgemos/etc/maps//amc_address_table_top.pickle...
Initializing AMC gem-shelf02-amc05
Initial value to write: 1, register GEM_AMC.GEM_SYSTEM.CTRL.LINK_RESET
Goodbye [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py all /data/bigdisk/GEM-Data-Taking/GE11_QC8/GE11-X-S-INDIA-0015/gbtPhaseSetPoints_GE11-X-S-INDIA-0015_current.log 2 5
List of link and its phases: 4 [7, 9, 10, 5, 5, 12, 7, 8, 7, 9, 4, 4, 6, 4, 11, 6, 9, 9, 8, 6, 10, 10, 13, 7]
Open pickled address table if available /opt/cmsgemos/etc/maps//amc_address_table_top.pickle...
Initializing AMC gem-shelf02-amc05
Initial value to write: 1, register GEM_AMC.GEM_SYSTEM.CTRL.LINK_RESET
Goodbye
[gemuser@gem904qc8daq ~]$ Also, its help argument goes like below: [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py -h
usage: writeGBTPhase.py [-h] {single,all} ... shelf slot
Tool for writing GBT phase for a single or all elink
positional arguments:
{single,all} Choose single/all for writing the GBT phase
single write GBT phase for single VFAT
all write GBT phase for all VFAT
shelf uTCA shelf number
slot AMC slot number in the uTCA shelf
optional arguments:
-h, --help show this help message and exit [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py single -h
usage: writeGBTPhase.py single [-h] vfat phase link
positional arguments:
vfat VFAT number on the OH
phase GBT Phase Value to Write
link OH number on the AMC
optional arguments:
-h, --help show this help message and exit [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py all -h
usage: writeGBTPhase.py all [-h] gbtPhaseFile
positional arguments:
gbtPhaseFile file having link, vfat and phase info
optional arguments:
-h, --help show this help message and exit |
@ram1123 I provided some change requests on the commit message you linked above. |
This is not the best way to go, as comments in linked code are not easily traceable through the issue.
|
If we define it like this then it does not shows the common options as shown below: (base) visitor-48597916:XDAQ ram$ python writeGBTPhase.py -h
usage: writeGBTPhase.py [-h] {single,all} ...
Tool for writing GBT phase for a single or all elink
positional arguments:
{single,all} Available subcommands and their descriptions.To view the sub
menu callwriteGBTPhase.py COMMAND -h
e.g.'writeGBTPhase.py single -h'
single write GBT phase for single VFAT
all write GBT phase for all VFAT
optional arguments:
-h, --help show this help message and exit The current version (as I did) shows the help argument as: [gemuser@gem904qc8daq ~]$ python writeGBTPhase.py -h
usage: writeGBTPhase.py [-h] {single,all} ... shelf slot
Tool for writing GBT phase for a single or all elink
positional arguments:
{single,all} Choose single/all for writing the GBT phase
single write GBT phase for single VFAT
all write GBT phase for all VFAT
shelf uTCA shelf number
slot AMC slot number in the uTCA shelf
optional arguments:
-h, --help show this help message and exit So, this shows that there are two different sub-arguments along with two common arguments |
yes it checks, here |
In the above command the cmsgemos/gempython/tests/writeGBTPhase.py Lines 21 to 22 in ab72ed6
Here |
…gle or all VFAT links
Addressed by #283 |
Brief summary of issue
Request to change
writeGBTPhase.py
to be able to write all phases instead of the phase for a single VFAT.Types of issue
Expected Behavior
Add subparser to have different commands, e.g.
single
andall
wheresingle
is the current behavior.Then
all
command should have a required input argumentfilename
that is something like:Then for each (link,vfat) defined in the file it writes the phase to the GBT. After all phases are written it should issue a link reset.
This enables you to write either one OH link worth of phases or all phases on an AMC depending on file contents.
Current Behavior
Each call can only write one phase.
Context
Right now there's no easy way to write a set of known phases at once to the frontend. QC8 shifters generally end up having to relaunch
testConnectivity.py
to do a phase scan (slow, especially with many links) or need to callwriteGBTPhase.py
24 times per OH to set known phases.The text was updated successfully, but these errors were encountered: