From 472cd37f26b31dfa86ce27b7a1417c046624ac1a Mon Sep 17 00:00:00 2001 From: Mario <mario@champ.hep.sci.osaka-u.ac.jp> Date: Thu, 4 Mar 2021 14:44:25 +0900 Subject: [PATCH] Renamed a variable for clarity --- README.md | 4 ++-- ScanOperator.sh | 12 ++++++------ configs/lr_powersupply.json | 2 +- libDCS/read_dcs_background.sh | 4 ++-- scanLauncher.sh | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 3aee954..047d036 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ Help: #### DCS related -- `-o:` **Turns on the output of the `channels_to_be_used`** specified in `lr_powersupply.json` before running the sequence of scans. **Turns the output off again** after running all the scans. +- `-o:` **Turns on the output of the `channels_to_be_used_by_the_scanoperator`** specified in `lr_powersupply.json` before running the sequence of scans. **Turns the output off again** after running all the scans. - `-d:` Monitor the PS and store **real-time DCS data in InfluxDB**. @@ -176,7 +176,7 @@ Most of the items are self-explanatory. Here are the ones that may require some #### Powersupply configuration file (lr_powersupply.json) -Contains the actual information to establish communication with the PS as well as the definition of the channels. Amongst all the channels you have defined, select the ones you want to use in "channels_to_be_used". The SO will ignore any channel not appearing there. +Contains the actual information to establish communication with the PS as well as the definition of the channels. Amongst all the channels you have defined, select the ones you want to use in "channels_to_be_used_by_the_scanoperator". The SO will ignore any channel not appearing there. - **`.devices`**: Write here the PS / PSs you want to use. A list of supported "`hw-model`" and "`protocol`" is available in [labRemote's README.md](https://gitlab.cern.ch/berkeleylab/labRemote#python-bindings). To find the port your PS is connected to, look at the output of `ls -l /dev/serial/by-id/`. diff --git a/ScanOperator.sh b/ScanOperator.sh index 41cbb0e..ededc67 100755 --- a/ScanOperator.sh +++ b/ScanOperator.sh @@ -173,10 +173,10 @@ if [[ $dcsMonitor == 1 ]] then chn="" - nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)" + nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)" for (( i=0; i<$nChannels; i++ )) do - chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)" + chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)" chn+="$chName," done chn="${chn::-1}" @@ -490,10 +490,10 @@ fi if [ $dcsOnOff == 1 ] ;then echo -e "\n[ info ][so] Turning ON the PS..." - nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)" + nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)" for (( i=0; i<$nChannels; i++ )) do - chn="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)" + chn="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)" python3 $SOBASE/libDCS/qaqc.py -e $PSCFG -c $chn -d $INFLUXDBDCSCFG power-on if [ $? -ne 0 ]; then exit 1; fi done @@ -558,10 +558,10 @@ done if [ $dcsOnOff == 1 ]; then echo -e "\n[ info ][so] Turning OFF the PS..." - nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)" + nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)" for (( i=0; i<$nChannels; i++ )) do - chn="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)" + chn="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)" python3 $SOBASE/libDCS/qaqc.py -e $PSCFG -c $chn -d $INFLUXDBDCSCFG power-off if [ $? -ne 0 ]; then exit 1; fi done diff --git a/configs/lr_powersupply.json b/configs/lr_powersupply.json index 8b8f310..06b8cd0 100644 --- a/configs/lr_powersupply.json +++ b/configs/lr_powersupply.json @@ -1,6 +1,6 @@ { "LR_lib_path": "/path/to/labRemote/build/lib", - "channels_to_be_used": [ + "channels_to_be_used_by_the_scanoperator": [ { "name": "LV" } diff --git a/libDCS/read_dcs_background.sh b/libDCS/read_dcs_background.sh index 2cc7bdf..75fe0dd 100755 --- a/libDCS/read_dcs_background.sh +++ b/libDCS/read_dcs_background.sh @@ -1,10 +1,10 @@ #!/bin/bash chn="" -nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)" +nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)" for (( i=0; i<$nChannels; i++ )) do - chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)" + chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)" chn+="$chName," done chn=${chn::-1} diff --git a/scanLauncher.sh b/scanLauncher.sh index e5ce202..414776d 100755 --- a/scanLauncher.sh +++ b/scanLauncher.sh @@ -119,10 +119,10 @@ if [[ $dcsMonitor == 1 ]] ;then echo "[ info ][sl] Getting single [V, I] measurement" chn="" - nChannels="$(jq -j '.channels_to_be_used | length' $PSCFG)" + nChannels="$(jq -j '.channels_to_be_used_by_the_scanoperator | length' $PSCFG)" for (( i=0; i<$nChannels; i++ )) do - chName="$(jq -j ".channels_to_be_used[$i].name" $PSCFG)" + chName="$(jq -j ".channels_to_be_used_by_the_scanoperator[$i].name" $PSCFG)" chn+="$chName," done chn="${chn::-1}" -- GitLab