Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-12 01:59:36

0001 #!/bin/bash
0002 
0003 if [ "$1" == "run" ]
0004 then
0005     mkdir -p CondCore/CTPPSPlugins/test/results
0006     if [ -f *.png ]; then    
0007     rm *.png
0008     fi
0009 
0010 
0011     echo "Testing history plots"
0012 
0013     for db in 0 1
0014     do
0015         for pl in 0 1 2 3
0016         do
0017             for ch in 0 1 2 3 4 5 6 7 8 9 10 11
0018             do
0019                 for param in 0 1 2 3
0020                 do
0021                     python3 CondCore/Utilities/scripts/getPayloadData.py \
0022                             --plugin pluginPPSTimingCalibration_PayloadInspector \
0023                             --plot plot_PPSTimingCalibration_history_htdc_calibration_db${db}pl${pl}ch${ch}_param${param} \
0024                             --tag CTPPPSTimingCalibration_HPTDC_byPCL_v0_prompt \
0025                             --time_type Run \
0026                             --iovs '{"start_iov": "355892", "end_iov": "357079"}' \
0027                             --db Prod \
0028                             --test 2> CondCore/CTPPSPlugins/test/results/data_history__db${db}pl${pl}ch${ch}_param${param}.json
0029                 done
0030             done
0031         done                    
0032     done 
0033 
0034 
0035     echo "Testing parameters plots"
0036 
0037     for param1 in 0 1 2 3
0038     do  
0039         for param2 in 1 2 3
0040         do
0041             if [ "$param1" -lt "$param2" ]
0042             then
0043                 getPayloadData.py \
0044                     --plugin pluginPPSTimingCalibration_PayloadInspector \
0045                     --plot  plot_PPSTimingCalibration_htdc_calibration_params${param1}${param2} \
0046                     --tag CTPPPSTimingCalibration_HPTDC_byPCL_v0_prompt \
0047                     --time_type Run \
0048                     --iovs '{"start_iov": "355892", "end_iov": "357079"}' \
0049                     --db Prod \
0050                     --test 2> CondCore/CTPPSPlugins/test/results/data_params_${param1}${param2}.json 
0051             fi  
0052         done
0053     done    
0054 
0055     python3 CondCore/CTPPSPlugins/test/graph_check.py
0056 
0057     echo "Testing channel plots"
0058 
0059 
0060     for db in 0 1
0061     do
0062         for pl in 0 1 2 3
0063         do
0064             for param in 0 1 2 3
0065             do
0066                 getPayloadData.py \
0067                     --plugin pluginPPSTimingCalibration_PayloadInspector \
0068                     --plot plot_PPSTimingCalibration_htdc_calibration_db${db}pl${pl}param${param}_per_channels \
0069                     --tag CTPPPSTimingCalibration_HPTDC_byPCL_v0_prompt \
0070                     --time_type Run \
0071                     --iovs '{"start_iov": "356489", "end_iov": "356489"}' \
0072                     --db Prod \
0073                     --test
0074                 mv *.png CondCore/CTPPSPlugins/test/results/plot_PPSTimingCalibration_db${db}pl${pl}param${param}_per_channels.png    
0075             done
0076         done                    
0077     done 
0078 
0079 
0080 elif [ "$1" == "clear" ]
0081 then
0082     rm -rf CondCore/CTPPSPlugins/test/results
0083 
0084 else 
0085     echo "Wrong option"
0086 fi