#trbcmd w 0xfe4c 0xc801 0x8000001e ## triggerwindow +/-150ns ;5ns granularity
# Default TDC-channel enable for all channels
-trbcmd w 0xfe4c 0xc802 0xffffffff ## channel 01-32 enable
-trbcmd w 0xfe4c 0xc803 0x0000ffff ## channel 33-64 enable
+#trbcmd w 0xfe4c 0xc802 0xffffffff ## channel 01-32 enable
+#trbcmd w 0xfe4c 0xc803 0x0000ffff ## channel 33-64 enable
trbcmd w 0xfe4c 0xc804 0x0000007c ## data transfer limit
#
trbcmd w 0xfe51 0xc802 0xffffffff ## channel 01-32 enable
#20170822 prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x2003 --chains=0..2 --invert=0xffff
-#prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x200f --chains=0..2 --invert=0xffff
+prepare_padiwas_invert_leds.pl --endpoints=0x2000..0x200f --chains=0..2 --invert=0xffff
#Invert erlangen
#prepare_padiwas_invert_leds.pl --endpoints=0x2014..0x201d --chains=0..1 --invert=0xffff
# trbcmd setbit 0xfe4c 0xcf00 0x1
#trbcmd setbit 0x8000 0xa1d4 0x10000 ## ???
+echo "write barrel dirc thresholds"
+
+cd ~/trbsoft/daqtools/thresholds/
+echo "padiwa thresholds..."
+./write_thresholds.pl ~/trbsoft/daqtools/users/gsi_dirc/thresh/padiwa_threshold_results_blockwise_20200715_163000.thr -o 200 > /dev/null
+echo "done"
cd ~/trbsoft/daqtools/thresholds/trb_dirich_threshold
#20150521
#./write_thresholds.pl padiwa_threshold_results_20150516_high_nostretch_CS.log -o 200 > /dev/null
#./write_thresholds.pl padiwa_threshold_results_20150521_high_nostretch_CS.log -o 200 > /dev/null
-echo "write barrel dirc thresholds"
#./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_25_offset_40_a.log -o 160
#./write_thresholds.pl padiwa_threshold_results_sequential_2015_06_27_offset_40_a.log -o 160
#./write_thresholds.pl mcp10.log -o 600
#./write_thresholds.pl mcp11.log -o 600
-./HADESthreshscan_v1 -f 20190403_141628_std_save.thr -l 0 -t 0 2300
+
+
+#./HADESthreshscan_v1 -f 20191030_111147_std_save.thr -l 0 -i -t 0 60
+./HADESthreshscan_v1 --no-autosave -f ~/trbsoft/daqtools/users/gsi_dirc/thresholds/dirich/20201120_165730_std_save.thr -l 0 -i -t 0 40
+
+
# 10/26 quick fix to set special threshold for 0x2006/0 = +1mV
#grep '0x2006' padiwa_threshold_results_latest.log | grep 'chain: 00' >! padiwa_thresholds_current_0x2006-0.txt
#./write_thresholds.pl padiwa_thresholds_current_0x2006-0.txt -o 1000