notifyall.sh "DAQ" "<I> MDC-Hubs are going to be rebooted." "STARTUP" &
xterm -geometry 80x24 -bg orange -fg black -e bash --login -c '
+ export DAQOPSERVER=hadesp31
trbcmd reset
trbcmd reload 0xfe11
sleep 8
+++ /dev/null
-#!/bin/bash
-
-export myvar=$(doyoureallywant.pl "to make a ECAL 5V Entrance Rack powercycle? There will be no further warnings!")
-if [ $myvar == "256" ]; then exit; fi
-
-xterm -e "
-cd ../../../../hadesdaq/utils;
-./ECAL_5V_Entrance_Powercycle.sh
-"
+++ /dev/null
-#!/bin/bash
-
-export myvar=$(doyoureallywant.pl "to make a ECAL Padiwa 5V powercycle? There will be no further warnings!")
-if [ $myvar == "256" ]; then exit; fi
-
-xterm -e "
-cd ../../../../hadesdaq/utils;
-./ECAL_LV5_Powercycle.sh;
-"
board 0xfe61 (0X0120)
-->Control:
EnKelFirst16: 0xffff (switch pulser on)
+or
+trbcmd w 0xtrbcmd w 0x0120 0xa000 0x0008ffff
-->PulserConfig
Slices:
-# power switch
+# power switch (not used)
http://haepc15/switch.html
admin kaese
# trb flash
trbflash info 0x6040
trbflash program 0x6040 *.bit
-trbcmd reload 6040
+trbflash verfiy 0x6040 *.bit
+trbcmd reload 0x6040
#padiwa:load memory (with thresholds,...) to flash
./spi_slave.pl -e=0x6041 -c=1 -flashcmd=8 -enablecfgflash=1 -x=memtoflash --range '0x00..0x2b'
0x00 off
0x01 blinking
+#check hld data
+hldprint XXX.hld -auto -tdconly 0x6040 -num 100 | less -j8
+hldprint lxhadeb08:8101 -auto -tdconly 0x6040 -num 100 | less -j8
###Trehsolds
+#scan thresholds
+hadaq@lxhadeb06:~/ecal_thresholds/trb_dirich_threshold$
+./HADESthreshscan_v1 -b 0
+#set thresholds
./HADESthreshscan_v1 -l 0 --loading-file best_baselines.thr -t 0 50 25
+trbcmd w 0xfe71 0xc805 0x00000000
+#positive SLOW threshold
+./HADESthreshscan_v1 -l 0 --loading-file best_baselines.thr -t 0 50 n40
+trbcmd w 0xfe71 0xc805 0x55555555
-###HV
+spi_slave.pl --endpoint=0xfe71 --chain=0 --execute=invert --data=0x0000 !!!!not working!!!!!!!! why??????
+spi_slave.pl --endpoint=0xfe71 --chain=1 --execute=invert --data=0x0000
+spi_slave.pl --endpoint=0xfe71 --chain=2 --execute=invert --data=0x0000
+
+
+
+###HV vnc
vncviewer lxhaddcs06:30
+vncviewer lxhaddcs06:31
#change multiplicity trigger
kate register_monitoring_trigger_mult3_minus_noise.de
M3: line 25 C1 0x00030000
+
+
+###LV odroids
+odroid4 (ch1: sector 2; ch2&3: sector 1; ch4 ch3&6
+odroid5
+odroid6
0x6053 1191 1 0 0
0x6054 1511 1 0 0
0x6055 1321 1 0 0
- 0x6056 1071 1 0 0
+ 0x6056 1261 1 0 0
--- /dev/null
+###########################\r
+# #\r
+# ECAL - operator guide #\r
+# #\r
+###########################\r
+\r
+###############\r
+#important vncs\r
+###############\r
+lxhaddcs06:30 (HV control)\r
+lxhadeb06:70 (Padiwas, DAQ)\r
+Password: "hades standart daq password"\r
+\r
+\r
+###########\r
+HV settings\r
+###########\r
+\r
+HV is controled via cs-studio. It is opened on vnc screen lxhaddcs06:30. Password is usual hades DAQ one (If you do not know it ask shift leader). It should be always open. If not, following commands in terminal should do the job:\r
+\r
+$ . epics\r
+$ cs-studio\r
+\r
+Workspace to open is:\r
+/home/hadaq/CSS-Workspaces/ecal/CSS\r
+\r
+It should be filled in prompt window in advance. Or it is possible to choose it from drop-down menu.\r
+\r
+Then there might open several windows or none. \r
+\r
+If several windows are opened, just find the one with corresponding sector or use the overall monitoring page to switch on/off whole sector or open the detailed view for the needed sector.\r
+\r
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+!!!Do not change any HV settings!!!\r
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\r
+\r
+The main window is in file\r
+ecal_menu.bob\r
+in the workspace. Start the display using "play" button in the toolbar. Then Button HV monitoring and settings should appear.\r
+\r
+CS-Studio is realy slow with the amount of channels it has to control, so be patient.\r
+\r
+#######################\r
+Laser monitoring system\r
+#######################\r
+\r
+Laser monitoring system is controled via web interface. The way how to acces it is\r
+Hades main monitoring webpage(hades33/mon)->Web Tools->Pulser AddOn(in Building Blocks section).\r
+\r
+The Address is 0xfe61 and ChannelEnable1 0120. To be certain switch on full set of channels (0xffff).\r
+\r
+In Pulser Config section set Pulser period 2 730 688 ns (0xa0000) on first 8 channels(should be set) and Pulse width to 47ns on channels 0, 3-8 (It should be preloaded if not the correct hex value is 0x2e or just simple fill in 46 and it results in 47ns).\r
+\r
+##################\r
+Thresholds setting\r
+##################\r
+On DAQ GUI there is a button called "Set ECAL Thr" it reloads all Padiwa thresholds to 45 mV (FAST) and +200 mV (SLOW). Typically thresholds have to be reloaded in case thresholds are not properly resetted by the automatic threshold recover script\r
+Thresholds can be monitored using a web browser: hades33/mon/ecal_drawing.htm#ecalthr_fast\r
+\r
+Rates in FAST and SLOW channels can be monitored using the following web pages:\r
+http://hades33/mon/ecal_drawing.htm#ecalrate_slow\r
+http://hades33/mon/ecal_drawing.htm#ecalrate_fast\r
+It can alaso happen that a module shows a very high rate (~3 MHz). In this case threshold have to be reloaded.\r
+\r
+\r
+#########################\r
+Manual threshold settings\r
+#########################\r
+As hadaq on lxhadeb06 set dir to\r
+\r
+~/ecal_thresholds/trb_dirich_threshold/\r
+\r
+and run command\r
+\r
+./HADESthreshscan_v1 -l 0 --loading-file 20190220_155833_std_save.thr -t 0 $A $B\r
+\r
+Values $A and $B stands for thresholds for FAST and SLOW channels respectively. For positive threshold setting for slow channel put n just before the threshold numeric value.\r
+\r
+The threshold setting is \r
+FAST: 45 (45 mV)\r
+SLOW: n200 (+200 mV)\r
+\r
+The command then looks like\r
+./HADESthreshscan_v1 -l 0 --loading-file 20190220_155833_std_save.thr -t 0 45 n200\r
+\r
+##########################################\r
+Zero or low rates in the ECAL rate monitor\r
+##########################################\r
+\r
+Check the HV monitors on\r
+http://hades33/mon/monitor.cg?-EcalHVVMap\r
+http://hades33/mon/monitor.cg?-EcalHVCMap\r
+\r
+If the current on the corresponding module shows low or zero value, try restart of the affected module. The control system of HV is described in the next paragraph. If the problem persits contact an expert.\r
+\r
+\r
+####################################\r
+Padiwa low voltage (5 V) power cycle\r
+####################################\r
+\r
+Padiwa boards can be power cycled by using the "ECAL LV5 Pwercycle" button in the main DAQ-GUI.\r
+After a power cycle a DAQ restart ist needed and thresholds have to be reloaded.\r
+\r
+############################\r
+#Contact in case of problems\r
+############################\r
+In case of some problems call:\r
+Adrian Rost (PADIWAS and readout electronics): +491771974495\r
+Petr Chudoba (HV, PMTs & laser system): +491781989243\r
+\r
--- /dev/null
+# TDC config registers
+
+!Register table
+# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 #
+###########################################################################################################
+
+# MonEnab TrgEnOut1 TrgEnOut1 TrgEnOut2 TrgEnOut2 Stretch Stretch Invert Invert
+# Ch00-31 Ch32-63 Ch00-31 Ch32-63 Ch00-31 Ch32-63 Ch00-31 Ch32-63
+ 0 0xdf80 0xdf00 0xdf01 0xdf04 0xdf05 0xdf20 0xdf21 0xdf24 0xdf25
+ 10 0xdf80 0xdf08 0xdf09 0xdf0c 0xdf0d 0xdf20 0xdf21 0xdf24 0xdf25
+
+ #just enables for 32 channels
+ 1 0xdf00 0xdf04
+
+
+#multiplicity
+# Enable 23..16Lim 15..8OutSel
+ 2 0xdf33 0xdf32 0xdf34
+
+!Value table
+# Fpga # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 #
+#########################################################################################################################################
+
+ 0xfe71 10 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0xffffffff 0x0000ffff 0x00000000 0x00000000
+ 0x6025 10 0x00000000 0x50000000 0x00000000 0x00000000 0x00000000 0xffffffff 0x0000ffff 0x00000000 0x00000000
+ 0x6041 10 0x00000000 0x00000000 0x00005000 0x00000000 0x00000000 0xffffffff 0x0000ffff 0x00000000 0x00000000
+ #Enable fast channels with stretcher on output 1
+
+ 0xfe61 0 0x000fffff 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
+ 0x8a00 1 0x00000015 0x00000000
+ 0x8a01 1 0x00000051 0x00015100
+ 0x8a02 1 0x00000000 0x00015400
+ 0x8a03 1 0x00000054 0x00000000
+ 0x8a04 1 0x00000015 0x00015400
+ 0x8a05 1 0x00000000 0x00015400
+ #left half of crate on output 1, right half on output 2
+
+
+ 0x0100 0 0x00007c7c 0x00007c7c 0x00000000 0x00000000 0x00000000 0x00007e7e 0x00000000 0x00000000 0x00000000
+ #1..6: output 1, #9..14 output 2
+
+ 0x0100 2 0x00000000 0x00020000 0x00000200
+ #2 half sectors fire, on second output
+
+
+#Oben: 0x6025 TDC-Nr. 29(fast),30(slow) oder ch14
+#Rechts: 0x6025 TDC-Nr. 31(fast),32(slow) oder ch15
+#Unten: 0x6041 TDC-Nr. 45(fast),46(slow) oder ch22
+#Links: 0x6041 TDC-Nr. 47(fast),48(slow) oder ch23
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+TDC=(6020 6021 6022 6023 6024 6025 6026) #sector 3
+#TDC=(6050 6051 6052 6053 6054 6055 6056) #sector 6
+CHAIN=(0 1 2)
+FAST=(0 2 4 6 8 10 12 14)
+SLOW=(1 3 5 7 9 11 13 15)
+#Sector 3
+#SLOW_THR="0xd1e0"
+FAST_THR="0x1339"
+
+#Sector 6
+SLOW_THR="0xd869"
+#FAST_THR="0x1088"
+
+for k in ${TDC[*]}; do
+ for i in ${CHAIN[*]}; do
+ for j in ${FAST[*]}; do
+ ~/trbsoft/daqtools/tools/spi_slave.pl -e 0x$k -c $i -x pwm -channel $j -data=$FAST_THR
+ done
+
+ for j in ${SLOW[*]}; do
+ ~/trbsoft/daqtools/tools/spi_slave.pl -e 0x$k -c $i -x pwm -channel $j -data=$SLOW_THR
+ done
+ done
+done
set_addresses serials_trb3sc.db addresses_ecal.db
!endif
+#exec_cmd{local} echo "I'm here"
+#exec_cmd{local} xterm -e "sleep 10"
+
#ECAL pulser configuration
trbcmd w 0x0120 0xa101 0xa0000 #PulserPeriod=2730688ns
trbcmd w 0x0120 0xa106 0xa0000 #PulserPeriod=2730688ns
trbcmd w 0x0120 0xa107 0xa0000 #PulserPeriod=2730688ns
trbcmd w 0x0120 0xa108 0xa0000 #PulserPeriod=2730688ns
-trbcmd w 0x0120 0xa201 0xb #PulserWidth=45ns
-trbcmd w 0x0120 0xa204 0xb #PulserWidth=45ns
-trbcmd w 0x0120 0xa205 0xb #PulserWidth=45ns
-trbcmd w 0x0120 0xa206 0xb #PulserWidth=45ns
-trbcmd w 0x0120 0xa207 0xb #PulserWidth=45ns
-trbcmd w 0x0120 0xa208 0xb #PulserWidth=45ns
-
-#set trigger for cosmics -> not working!?
+trbcmd w 0x0120 0xa201 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa203 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa204 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa205 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa206 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa207 0x2e #PulserWidth=47ns
+trbcmd w 0x0120 0xa208 0x2e #PulserWidth=47ns
+
+
+#set trigger for cosmics and pulser
exec_cmd{local} /home/hadaq/trbsoft/daq/ecal/loadregisterdb.pl /home/hadaq/trbsoft/daq/ecal/register_monitoring_trigger.db
trbcmd w 0xfe71 0x7111 500 #max number of words per board
exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --execute=led --data=0x0000
exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --execute=led --data=0x0000
exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --execute=led --data=0x0000
+
+#input enable 0x0000
+
+#stretcher 0x0000
+
#set global dischargedelayselect to 20
#Load TDC settings
load_register register_tdc_ecal.db
+
+#TDC settings for overshoot method
+trbcmd w 0xfe71 0xc801 0x83ff00c0 #enable trigger window: 965 ns (before), 5115 ns (after)
+#trbcmd w 0xfe71 0xc801 0x812c00c0 #enable trigger window: 965 ns (befre), 1500 ns (after)
+#trbcmd w 0xfe71 0xc801 0x3ff00c0 #disable trigger window
+trbcmd w 0xfe71 0xc805 0xaaaaaaaa #invert TDCs for SLOW channels
+trbcmd w 0xfe71 0xc806 0xaaaaaaaa #invert TDCs for SLOW channels
-#wait
-
+#exec_script{pexor} ../ecal/startupQFH.script #not working?
+#exec_cmd{local} ../ecal/startupQFH.sh
+#trbcmd w 0x6036 0xc802 0x00000000 #deactivate TDCs on QFH board
+#wait
--- /dev/null
+#prepare 0x6036 for QFH
+trbcmd w 0x6036 0xc805 0x0 #do not invert TDCs for SLOW channels for 6036
+trbcmd w 0x6036 0xc806 0x0 #do not invert TDCs for SLOW channels for 6036
+trbcmd w 0x6036 0xc802 0xffff #deactivate unused channels
+trbcmd w 0x6036 0xc803 0x0 #deactivate unused channels
+trbcmd w 0x6036 0xc801 0x83ff00aa #enable trigger window: 965 ns (before), 5115 ns (after)
\ No newline at end of file
--- /dev/null
+#prepare 0x6036 for QFH
+trbcmd w 0x6036 0xc805 0x0 #do not invert TDCs for SLOW channels for 6036
+trbcmd w 0x6036 0xc806 0x0 #do not invert TDCs for SLOW channels for 6036
+trbcmd w 0x6036 0xc802 0xffff #deactivate unused channels
+trbcmd w 0x6036 0xc803 0x0 #deactivate unused channels
+#trbcmd w 0x6036 0xc801 0x83ff00aa #enable trigger window: 965 ns (before), 5115 ns (after)
+#trbcmd w 0x6036 0xc801 0x80640028 #enable trigger window: 200 ns (before), 500 ns (after)
+trbcmd w 0x6036 0xc801 0x80c80028 #enable trigger window: 200 ns (before), 1000 ns (after)
--- /dev/null
+#!/bin/bash
+# JAM 8-mar-2019: switch bnet configuration to new servers
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "Change eventbulder configuration to setup mar19?")
+if [ $myvar == "256" ]; then exit; fi
+
+# first stop eventbuilders
+/home/hadaq/trbsoft/daq/control/gui/eb/65_____Stop_EB;
+# stop trigger
+/home/hadaq/trbsoft/daq/control/gui/daq/15_Start_Stop_Trigger;
+# change setup files
+cd /home/hadaq/trbsoft/daq/hub;
+rm register_configgbe_ip.db;
+ln -s register_configgbe_ip_newservers_secondgbe.db register_configgbe_ip.db;
+cd /home/hadaq/trbsoft/daq/evtbuild;
+rm eb.conf;
+ln -s eb_bnet_ltsm_newservers.conf eb.conf;
+rm start_eb_gbe.pl;
+ln -s start_eb_gbe_newservers.pl start_eb_gbe.pl;
+
+# restart daq
+/home/hadaq/trbsoft/daq/control/gui/daq/10_Start_DAQ;
+# start bnet master
+/home/hadaq/trbsoft/daq/control/gui/expert/Restart_BNET_Control;
+# start eventbuilders with 8 nodes
+/home/hadaq/trbsoft/daq/control/gui/eb/75_Set_8_EB;
+# restart hmon (because bnet master webserver was restarted)
+/home/hadaq/trbsoft/daq/control/gui/expert/Restart_Hmon
+
+echo changed eventbuilder configuration to new servers (March 2019)
+
+
+
+
+
--- /dev/null
+#!/bin/bash
+# JAM 8-mar-2019: switch bnet configuration to old servers
+export myvar=$(/home/hadaq/trbsoft/hadesdaq/utils/doyoureallywant.pl "Change eventbulder configuration to setup 2018?")
+if [ $myvar == "256" ]; then exit; fi
+
+# first stop eventbuilders
+/home/hadaq/trbsoft/daq/control/gui/eb/65_____Stop_EB;
+# stop trigger
+/home/hadaq/trbsoft/daq/control/gui/daq/15_Start_Stop_Trigger;
+# change setup files
+cd /home/hadaq/trbsoft/daq/hub;
+rm register_configgbe_ip.db;
+ln -s register_configgbe_ip_oldservers.db register_configgbe_ip.db;
+cd /home/hadaq/trbsoft/daq/evtbuild;
+rm eb.conf;
+ln -s eb_bnet_ltsm.conf eb.conf;
+rm start_eb_gbe.pl;
+ln -s start_eb_gbe_oldservers.pl start_eb_gbe.pl;
+
+# restart daq
+/home/hadaq/trbsoft/daq/control/gui/daq/10_Start_DAQ;
+# start bnet master
+/home/hadaq/trbsoft/daq/control/gui/expert/Restart_BNET_Control;
+# start eventbuilders with 8 nodes
+/home/hadaq/trbsoft/daq/control/gui/eb/75_Set_8_EB;
+# restart hmon (because bnet master webserver was restarted)
+/home/hadaq/trbsoft/daq/control/gui/expert/Restart_Hmon
+
+echo changed eventbuilder configuration to old servers (December 2018)
+
+
+
+
+
+++ /dev/null
-#
-# #Install: Run CPAN and install
-# perl -MCPAN -e shell
-#
-# #At CPAN shell prompt
-# install Config::Std
-
-#----------------------------------------------
-[Main]
-
-PORT_BASE: 11000
-WMARK: 60000
-
-EB_IP: 192.168.100.12
-EB_OUTDIR: /data/lxhadesdaq/tof_test
-
-# file/null
-EB_OUTDEV: null
-
-EB_EXT: te
-
-# file size in MBytes
-EB_FSIZE: 500
-
-EB_EVTID: 1
-SHMEMNAME: test
-
-QUEUESIZE: 4000000
-
-# enable online server: --online
-# disable online server:
-ONLINESERVER: --online
-
-# buffer sizes for evtbuild and netmem (MB)
-BUF_SIZE_LOW: 8
-BUF_SIZE_MID: 16
-BUF_SIZE_HIGH: 32
-
-#----------------------------------------------
-[Parallel]
-
-# EB IPS NOT USED IF CONF_FROM_DB
-
-EB_IP_1: 192.168.100.15
-EB_IP_2: 192.168.100.12
-EB_IP_3: 192.168.100.13
-EB_IP_4: 192.168.100.14
-EB_IP_5: 192.168.100.11
-
-# Number of EB processes per server NOT USED IF CONF_FROM_DB
-EB_NUM_1: 1
-EB_NUM_2: 1
-EB_NUM_3: 1
-EB_NUM_4: 1
-EB_NUM_5: 1
-
-BASE_PORT: 20100
-SHIFT_PORT: 100
-NUM_OF_SOURCES: 1
-
-QUEUESIZE: 32
-
-# JAM 12/2016-
-# the following list configures BNET for each EB SERVER node:
-# this will always imply DABC eventbuilder software.
-# BNETINP gives number of input processes per server node
-# BNETBLD gives number of builder processes per node
-# set BNETINP to 0 for conventional EB setup
-# EB server 0 1 2 3
-BNETINP: 0 0 0 0
-#BNETINP: 1 1 1 1
-BNETBLD: 2 2 2 2
-#BNETBLD: 4 4 4 4
-#BNETBLD: 1 1 1 1
-
-# EB Nr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-#EB_LIST: 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
-EB_LIST: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-
-# Switch to DABC mode (on=1/off=0) for 16 EB processes
-# EB Nr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-#DABC: 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-#DABC: 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
-#DABC: 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
-#DABC: 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-DABC: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-#DABC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-# Switch multiple disk ctrl via daq_disks (1=on,0=off)
-MULTIDISK: 1
-WRITE_TO_DISK: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-#WRITE_TO_DISK: 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 0
-
-
-# Log the output of EB processes (log=1/dev-null=0) (at lxhadeb0j:/tmp/log_eb_i.txt and log_nm_i.txt)
-EB_LOG: 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
-NM_LOG: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-# switch on extended evtbuild debug output for logfile (at lxhadeb0j:/tmp/log_eb_i.txt)
-EB_DEBUG: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-
-
-# Switch (on=1/off=0) EPICS Control of EB processes
-# IOC Master is by default the IOC for EB process 1
-EPICS_CTRL: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-
-# RFIO switch (on=1/off=0) for 16 EB processes
-# EB Nr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
-#RFIO: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
-RFIO: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
-
-# RFIO default options for all EB processes
-RFIO_PATH: /hadesnov14raw/prod01
-RFIO_pcOptions: wb
-#### if LUSTRE fails, switch the following RFIO_iCopyMode to 0: #####
-# 0 no copy to Lustre/hera
-# 1 copy to Lustre after the file is in the write cash,
-# 2 copy in parallel to Lustre
-RFIO_iCopyMode: 1
-RFIO_pcCopyPath: /hera/hades/raw/nov14/default
-RFIO_iCopyFraction: 1
-# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 files
-RFIO_iMaxFile: 0
-RFIO_iPathConvention: 0
-
-# Configure EBs based on info in DB files (1=yes,0=no)
-CONF_FROM_DB: 1
-
-# Table with active data sources
-
-DATA_SOURCES: ../main/data_sources.db
-GBE_CONF: ../hub/register_configgbe_ip.db
-CTS_CONF: ../cts/register_cts.db
-
-
-#
-# The following is the individual configuration of EBs
-#
-#----------------------------------------------
-[EB_PROC_1]
-
-OUTDIR: /data01/data/
-MULTIDISK: 1
-#RESDOWNSCALE: 20
-#RESNUMEVENTS: 2000
-#RESPATH: /data22/data/res
-#RESPATH: /data.local1/data/res
-#RESSIZELIMIT: 80
-
-#RFIO_pcFile:
-#RFIO_pcOptions:
-
-#----------------------------------------------
-[EB_PROC_2]
-
-ONLINESERVER: on
-
-OUTDIR: /data10/data/
-
-RESDOWNSCALE: 20
-RESNUMEVENTS: 2000
-RESPATH: /data.local1/data/res
-RESSIZELIMIT: 80
-
-#RFIO_pcFile:
-#RFIO_pcOptions:
-
-#MULTIDISK: 18
-
-#----------------------------------------------
-[EB_PROC_3]
-
-OUTDIR: /data10/data/
-
-#----------------------------------------------
-[EB_PROC_4]
-
-OUTDIR: /data10/data/
-MULTIDISK: 5
-
-
-#----------------------------------------------
-[EB_PROC_5]
-
-OUTDIR: /data02/data/
-MULTIDISK: 2
-#----------------------------------------------
-[EB_PROC_6]
-
-OUTDIR: /data11/data/
-
-#----------------------------------------------
-[EB_PROC_7]
-
-OUTDIR: /data11/data/
-
-#----------------------------------------------
-[EB_PROC_8]
-OUTDIR: /data11/data/
-
-#----------------------------------------------
-[EB_PROC_9]
-
-OUTDIR: /data03/data/
-MULTIDISK: 3
-#----------------------------------------------
-[EB_PROC_10]
-
-OUTDIR: /data.local1/data
-
-#----------------------------------------------
-[EB_PROC_11]
-
-OUTDIR: /data12/data/
-
-#----------------------------------------------
-[EB_PROC_12]
-
-OUTDIR: /data12/data/
-
-#----------------------------------------------
-[EB_PROC_13]
-
-OUTDIR: /data04/data/
-MULTIDISK: 4
-#----------------------------------------------
-[EB_PROC_14]
-
-OUTDIR: /data13/data/
-
-#----------------------------------------------
-[EB_PROC_15]
-
-OUTDIR: /data.local1/data
-
-#----------------------------------------------
-[EB_PROC_16]
-
-OUTDIR: /data.local1/data
# LTSM default options for all EB processes
-LTSM_PATH: /lustre/hebe/hades/raw/jul18/default/tsm
+LTSM_PATH: /lustre/hebe/hades/raw/mar19/default/tsm
#LTSM_Server: lxltsm01-tsm-server
LTSM_Server: lxltsm01
#BNETBLD: 3 3 3 0
## below enough ltsm connections? default with new servers
-BNETBLD: 3 3 3 3
+BNETBLD: 3 3 3 3
# JAM - do not modify this anymore, please use control button "Restart BNET 1 Builder" instead
#BNETBLD: 1 0 0 0
-./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 3;
+./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 8;
my %temp_args;
my $temp_args_href = \%temp_args;
read_config $opt_ebconf => %$temp_args_href;
-#print Dumper $temp_args_href;
+#rint Dumper $temp_args_href;
#exit;
my @bnetservers = ("192.168.100.8","192.168.100.9","192.168.100.10","192.168.105.11", "192.168.105.12");
+#my @bnetservers = ("192.168.100.10","192.168.100.9","192.168.100.8","192.168.105.11", "192.168.105.12");
+
+
+
# my %IP_GSI_lookup = (
# '192.168.100.15' => '140.181.66.160',
# '192.168.100.12' => '140.181.76.94',
'192.168.100.14' => 'lxhadeb04',
'192.168.100.8' => 'lxhadeb08',
'192.168.100.9' => 'lxhadeb09',
- '192.168.100.10' => 'lxhadeb10',
+ '192.168.100.10' => 'lxhadeb10',
'192.168.105.11' => 'lxhadeb11',
'192.168.105.12' => 'lxhadeb12',
'192.168.105.13' => 'lxhadeb13'
# BNET setup:
- my $listOfBnetInputs = $temp_args_href->{'Parallel'}->{'BNETINP'};
- my @bnet_in_list = split(/\s+/, $listOfBnetInputs);
-
- my $listOfBnetBuilders = $temp_args_href->{'Parallel'}->{'BNETBLD'};
- my @bnet_bld_list = split(/\s+/, $listOfBnetBuilders);
+ my $listOfBnetInputs = $temp_args_href->{'Parallel'}->{'BNETINP'};
+ my @bnet_in_list = split(/\s+/, $listOfBnetInputs);
+
+ my $listOfBnetBuilders = $temp_args_href->{'Parallel'}->{'BNETBLD'};
+ my @bnet_bld_list = split(/\s+/, $listOfBnetBuilders);
+ #print Dumper @bnet_bld_list;
#- Default RFIO settings
#exit;
foreach my $ebproc ( sort keys %{$eb_ids_gbe_href} ){
- #- If there was a list of EBs provided via command line options
- # go to the next $ebproc if the current $ebproc is not in this list.
- #print "active EBs:\n";
- #print Dumper $active_EBs_aref;
+ #- If there was a list of EBs provided via command line options
+ # go to the next $ebproc if the current $ebproc is not in this list.
+ #print "active EBs:\n";
+ #print Dumper $active_EBs_aref;
if(@$active_EBs_aref){
next unless( any {$_ == $ebproc} @$active_EBs_aref ); #from command line args
# we misuse this here to save complexity of setup
$href->{$ebproc}->{'BNET_INP'} = $bnet_in_list[$ebproc]; # 0|1|2...
$href->{$ebproc}->{'BNET_BLD'} = $bnet_bld_list[$ebproc]; # 0|1|2|3
+ #print "dump bnet_bld\n";
+ #print Dumper \$bnet_bld_list[$ebproc];
}
}
$numOfEBProcs = $ebproc;
+ #print "result\n";
+ #print Dumper $ebproc;
+ # exit;
}
sub isVarDefined()
my $lasttotalbuilders=$totalbuilders;
for ( my $ebserver=0; $ebserver<$maxbuildservers; $ebserver=$ebserver+1){
my $bnet_numbuilders = $EB_Args_href->{$ebserver}->{'BNET_BLD'};
+ print "numbuilders for $ebserver is $bnet_numbuilders";
if($totalbuilders < $maxbuilders)
{
if($localbuilders[$ebserver] < $bnet_numbuilders)
#
#my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu);
-
- # my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_inp 1</dev/null &\"";
- my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports $cmd_dabc $conf_bnet_inp >senderlog_$cpu.log 2>&1 &\"";
+ my $core_nr = &getCoreNr($cpu, 'input');
+ my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_inp 1</dev/null &\"";
+ # my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports $cmd_dabc $conf_bnet_inp >senderlog_$cpu.log 2>&1 &\"";
my $log = $log_path . "/log_" . $ebserver . "_" . "startBnetInp_". $sender. ".txt";
}
#my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu);
+ my $core_nr = &getCoreNr($cpu, 'build');
- #my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_bld 1</dev/null &\"";
- my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports $cmd_dabc $conf_bnet_bld >builderlog_$cpu.log 2>&1 &\"";
+ my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_bnet_bld 1</dev/null &\"";
+ #my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports $cmd_dabc $conf_bnet_bld >builderlog_$cpu.log 2>&1 &\"";
my $log = $log_path . "/log_" . $ebserver . "_" . "startBnetBld_". $builder . ".txt";
} # builder processes
} # servers
-
+
# finally, we need to set eb lut on cts for setup of EB1 => bnet distribution
#trbcmd w 0x0003 0xa0f0 0x8000`;
#`trbcmd w 0x0003 0xa0f0 0x1`;
# `trbcmd w 0x0003 0xa0f3 0xff0`;
`trbcmd setbit 0x0003 0xa0f3 0xff0`;
# use EB1 as pseudo receiver for calib triggers
-
- sleep (20); # need to wait until forking is done, otherwise it does not work via gui control xterm
+
+sleep (5); # seems also to be fine: michael, 2019-02-18
+
+# sleep (20) # old # need to wait until forking is done, otherwise it does not work via gui control xterm
}
waitpid($cur_child_pid,0);
}
- sleep 1;
+ #sleep 1;
### just kill the remaining stuff
@process_list = ();
print "Exec: $exe_eb\n" if($opt_verb);
system($exe_eb) unless($opt_test);
- sleep(1);
+ #sleep(1);
#--- Open permissions for EB shared memory
# ! Permissions should be opened by EB process
#print "Exec: $exe_open_eb\n" if($opt_verb);
#system($exe_open_eb) unless($opt_test);
- sleep(2);
+ #sleep(2);
#--- Execute Net-2-Memory
print "Exec: $exe_nm\n" if($opt_verb);
system($exe_nm) unless($opt_test);
- sleep(1);
+ #sleep(1);
#--- Open permissions for NM shared memory
# ! Permissions should be opened by EB process
#!/bin/bash
- echo setting CTS to calibration mode;
+echo setting CTS to calibration mode;
export DAQOPSERVER=hadesp31;
trbcmd r 0x003 0xa0c7 > /home/hadaq/tmp/precalibctsregs.txt 2> /home/hadaq/tmp/precalibctserr.txt ;
echo disabled output mask: `cat /home/hadaq/tmp/precalibctsregs.txt`;
trbcmd w 0x003 0xa0c7 0;
trbcmd clearbit 0x003 0xa0c0 0x1F;
trbcmd setbit 0x003 0xa0c0 0x1D;
- trbcmd w 0x003 0xa0e3 0x1E8480;
- echo Setting file prefix tc;
+# trbcmd w 0x003 0xa0e3 0x1E8480;
+ trbcmd w 0x003 0xa0e3 0x61A80;
+
+echo Setting file prefix tc;
/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix=tc&oninit=10";
echo set prefix tc on BNET master controller;
#!/bin/bash
echo Setting file prefix no file
- /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/StartRun/execute?prefix='--'&oninit=10"
+ /usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/StopRun/execute?tmout=10"
echo set prefix nofile on BNET master controller
sleep 2
echo setting CTS back to regular mode
# Voice Synthesis
###############################################################################
my $speaklog;
+my $oldmsg;
sub Speak {
my ($id,$str) = @_;
# print "$id $str $speaklog->{$id}\n";
if (!defined $speaklog->{$id} || $speaklog->{$id} < time()-120) {
# my $cmd = "ssh hades30 'espeak -ven-male2 -s 120 -g 1 \"$str\" ' 2>/dev/null";
+
+ return if $id =~ /once/ && (($speaklog->{$id}||0) < time()-600);
+ #print $id." ".$oldmsg->{$id}." ".$str."\n";
+ #($oldmsg->{$id} eq $str)
my $fh;
open($fh, ">>",Hmon::HMONDIR."/files/speaklog");
$fh->autoflush(1);
print $fh $str."\n";
$speaklog->{$id} = time();
close($fh);
+ $oldmsg->{$id}=$str;
}
}
];
# Order of entries in each cat
-$entries->{'main'} = ['time', 'rate','onlineqa','up',''];
+$entries->{'main'} = ['time', 'rate','onlineqa','up','outofsync'];
$entries->{'daq'} = ['trbnet', 'timeouts', 'busy','readout','spillcount'];
$entries->{'trg'} = ['spill', 'accepted', 'source','pt1rate', 'start']; #,
$entries->{'rate'} = ['pt1','start','hodo','pion1','pion2'];
$entries->{'eb'} = ['run', 'rate','bytes', 'lostevt', 'errbits'];
$entries->{'mdc'} = ['token', 'blocked', 'temp', 'linkqual', 'voltage'];
$entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other'];
-$entries->{'feeerr'} = ['trb', 'feeerr','trginp','trgqual',''];
+$entries->{'feeerr'} = ['trb', 'feeerr','trginp','trgqual','richthr'];
$entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu'];
$entries->{'rich'} = ['temp','volt','curr','bkpl','isob'];
-$entries->{'ecal'} = ['temp','count','','',''];
+$entries->{'ecal'} = ['temp','count','thr','',''];
$entries->{'hv'} = ['magnet','mdchv','richhv','ecalhv','sequencer'];
-$entries->{'misc'} = ['irq','calib','','',''];
+$entries->{'misc'} = ['irq','calib','tofhv','rpchv','fwhv'];
our $QAServer = "hades33";
our @TrgErrLimits = (100, 1000, 10000);
our @CPULimits = (95, 100, 100);
our @TimeoutLimits = (0, 0, 1);
+our @TimeoutLimitsOnlyRICHMDC = (0, 3, 4);
our @LinkErrLimits = (50, 500, 1000);
-our @MdcEndpMissingLimits = (0, 1, 2);
+our @MdcEndpMissingLimits = (0, 3, 4);
our @RichEndpMissingLimits = (0, 3, 4);
our @TofEndpMissingLimits = (0, 0, 0);
our @RpcEndpMissingLimits = (0, 0, 1);
our @OtherEndpMissingLimits = (0, 0, 0);#!!!
-our @EBDeltaRateLimits = (0.06, 0.1, 0.15); # as a ratio compared to the rate
+our @EBDeltaRateLimits = (0.1, 0.2, 0.3); # as a ratio compared to the rate
our $TrgCheckPolarity = 1;
-our @Eventsbroken = (.5,5,10);
+our @Eventsbroken = (.5,2,5);
our @MdcTokenMissLimits = (10,50,100);
our @MdcNominalHV = (1750,1770,1900,2150);
-our @MdcHVOffsetLimits = (5,10,55);
+our $MdcHVOffsetLimits = [[5,10,55],[5,10,55],[5,10,55],[10,110,125]];
our @EcalHvLimits = (326,325,320);
-our @TdcCalibrationInterval = (120000,250000,500000);
+our @RpcHvLimits = (12,12,11);
+our @TofHvLimits = (768,760,759);
+our @TdcCalibrationInterval = (320000,450000,600000);
our @TdcCalibrationTemperature = (5,7,10);
our @PionLvCurrLimits = (4,5,6);
our $MagnetOff = 1;
our $PadiwaECalNumber = 84;
-our @PadiwaEcalLimits = (0, 0, 0);
+our @PadiwaEcalLimits = (0, 1, 2);
our @LimitTriggerPerSpill = (1000, 0, 0);
our $AcceleratorCycle = 7;
<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
<ul>
+<li>If there is "readout waiting" reported at the same time, the real problem is to be found there.
<li>Check the list of board addresses, which board is busy.
<li>If the address starts with '2' (from MDC), try to resync missing OEPs
+<li>If the address starts with '7' (from RICH), a 'Resync DiRich' followed by a DAQ restart should help
<li>If not, a DAQ restart should solve the problem.
<li>If the misbehaving board is from MDC and the error happens several times for the same board,
do a MDC power-cycle of the corresponding chamber.
-<li>If the board is from MDC, and there is a "FEE Error" at the same time, the MDC power-cycle is needed.
+<li>If the board is from MDC, and there is a "FEE Error" at the same time, an MDC LV power-cycle is needed.
+<li>If the board is from another system* and fails several times, try a reboot of the corresponding system.
</ul>
-<br>Note that in some cases this is not the real source of the error -
+<br><b>Note that in many cases this is not the real source of the error - </b>
e.g. if the data transport to EB failed, the board with the smallest
-buffer and the most data gets busy first. Check also the next box "Read-out" for further information.
+buffer and the most data gets busy first.
+
+<p>*The list of addresses can be found at the wall next to the door to the server room.
+<ul>
+<li>If there is a "Sync" error reported at the same time, look there.
+<li>If the boards listed are from RICH (address starting with 7), do a Resync DiRich.
+If DAQ doesn't start again, make a DAQ Restart
+<li>If this didn't help, try a "Reboot DiRich" and "Reboot RICH Combiner" (takes 1 second only)
+followed by a DAQ restart
+<li>If the board is not from RICH, do a DAQ restart
+<li>If it happens several times for the same board, consider a reboot of the corresponding system (see the list on the wall next to the door to the server room for a list of addresses)
+
+Counts the "start of extraction" signals from the accelerator.
+This information is not critical to data taking.
+If there is beam and it doesn't count up, inform Jörn Adamczewski by mail.
This buttons shows the number of accepted events (written to disk) with errors reported by the front-ends.
<br>Try to do a DAQ restart
<br>In some cases a power-cycle of the corresponding system / chamber is necessary.
-
+<br>Please note that the error will not be reset on a DAQ restart! To reset it, restart EB.
<h3>Number of discarded events</h3>
<p>
This button gives you the number of discarded events in the Eventbuilders. Few discarded events (<1%) are fine.
-<br>If many events are discarded, try to restart the Eventbuilders.
-<br>If many events are lost, the EB might be overloaded. Check that the trigger rate is about the expected value
-<br>Check in the EB summary that writing data to the Lustre is working. There might be backpressure if too much data is written to tape. Try reducing the trigger rate.
-<br>If many or all events are lost, try a DAQ restart or reboot of the failing system. The data sent by some system might be corrupted.
+</p>
+
+<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
+<dl>
+<dt>Check the datarate that is delivered by DAQ</dt>
+<dd> If many events are lost, the EB might be overloaded. Check that the trigger rate is about the expected value.</dd>
+<dd> Check that the number of eventbuilders can handle the intended datarate. Beam runs require at least 4 builder nodes, 8 is usual. Try to increase the number of event builders using the buttons "Set x EB" in the operator GUI</dd>
+<dd> Check in the EB summary that writing data to local disk and TSM/lustre is working. There might be backpressure if too much data is written to tape. Try reducing the trigger rate.</dd>
+
+<dt>Restart the Eventbuilders</dt>
+<dd>Only if datarate from DAQ is ok and many events are discarded. See details on restarting eventbuilders at <a href="doc.cgi?eb-run">#EB running</a></dd>
+
+<dt>Try reboot of a failing DAQ system.</dt>
+<dd>If the data sent by some system should be corrupted, try to reboot it using
+the "Reboot XY" buttons in the DAQ section of the operator GUI. <b>Only if there is a hint (not green light in tactical overview) that something is wrong!</b> </dd>
+
+<dt>DAQ restart</dt>
+<dd>Use "Start DAQ" button in operator GUI. If eventbuilders still discard events or do not work properly, restart them as described in <a href="doc.cgi?eb-run">#EB running</a></dd>
+</dl>
<h3>Comparison of CTS Rate and Eventbuilder Rate</h3>
<p>
-This number gives the difference between the Eventbuilder and the CTS Rate. This difference should be around zero.
-As long as the button is green everything is O.K. - even if the box shows some large deviations for a short time.
+The left number shows the average event rate (Ev/s) accepted by the central trigger system (CTS) in previous 120 seconds. <br>
+The right number shows the average event rate collected by the event builders (BNET). <br>
+<b>Both values should be approximately the same.</b>
</p>
<h4>Error Handling if the button is not <font color="gree">Green</font> for more than 10 seconds: </h4>
<h3>Number of running Eventbuilders</h3>
<p>
-The right number gives the number of Eventbuilders where the DAQ sends data to (stays always the same).<br>
-The left number gives the number of Eventbuilders writing data to disc.<br>
-This number should be equal and in this case the button would be green. (Cosmics: 1 EB, Beamtime: 8 EB)
+Shown is the number of input nodes (i:5) and builder nodes (b:8) of the buider network BNET.<br>
+The input nodes are the data receivers from the detector front-ends. Their number should be always 5. <br>
+The builder nodes are the parallel Eventbuilders writing data to disc. Their number depends on the setup: <br>
+(Cosmics: 1 EB, Beamtime: 8 EB) Number of builders may be changed with the "Set x EB" button on operator GUI <br>
+Also shown is the file prefix currently written ("be"). <b>For data taking with beam this should be "be"</b>
</p>
<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
<dl>
+<dt>Check the datarate that is delivered by DAQ</dt>
+<dd>If no data is received from DAQ due to busy state, or if datarate is low because of spill pause/no beam/cosmic run, usually the BNET complains that not all nodes get data synchronously. This is not really an error of the event builders! Please check DAQ and BEAM state</dd>
+<dd>If DAQ is fine and you are doing a cosmics run with low rate, please consider changing the setup to one eventbuilder by using the "Set 1 EB" button</dd>
+
<dt>Restart Eventbuilders</dt>
+<dd>Press the "Restart EB" button in the eventbuilder tools section of the DAQ control gui and wait one minute. The eventbuilders should start
+again. If there should still be problems with eventbuilders, restart the BNET Control (see below.) </dd>
+<dt>Start file writing</dt>
+<dd>Press the "Beam Files" button in the eventbuilder tools section of the DAQ control gui (alternatively, cosmic files or test files depending on situation). All files should write in parallel with same rate. If this should not be the case, try to restart the BNET Control (see below) </dd>
+<dt>Restart BNET Control:</dt>
+<dd>
+<dl>
+<dt>First press the "Stop EB" button in the eventbuilder tools section of the DAQ control gui.</dt>
+<dd> All eventbuider nodes should disappear in monitoring gui</dd>
+<dt>Press the "Restart BNET Control" button in the expert tools section of the DAQ control gui.</dt>
+<dt>Wait 10 seconds and also restart the hmon processes by clicking "Restart Hmon"</dt>
+<dt>Do another "Restart Eventbuilder" (alternatively "Set x EB")</dt>
+<dd> Wait 60 seconds until eventbuilder nodes appear in monitoring gui. Watch if all eventbuilders show the same event rate.</dd>
+<dt>Do not forget to switch on file writing if everything is OK again!</dt>
+</dl>
+</dd>
</dl>
+<p>This tries to check if all ECal front-ends (Padiwa boards) are working. Check with the ECal
+operator if there
+are boards missing. Note that this check might fail for short amounts of times, e.g. when thresholds
+are reset.
+<p>You can try a "ECal Padiwa Powercycle" and reload thresholds using "Set ECal Thr".
<h3>MDC Endpoints</h3>
-This button shows if all MDC front-end modules are active. The button is red if at least one module is missing.<br>
+This button shows if all MDC front-end modules are active. The button is red if too many modules are
+missing.<br>
<h4>Error Handling</h4>
<li>If this doesn't help, do a DAQ restart.
<li>If this doesn't help, do a power cycle of the MDC sector and Reboot OEP.
<li>If this doesn't help, use "Reboot MdcHub" plus 2 DAQ restarts.
-<!--<li>If 1-3 boards show an error, do a power-cycle of the corresponding sector
-<li>If 7-9 boards show an error, do a DAQ restart-->
-<li>If 14/18 boards show an error after a power-cycle, click "MDC LV Turn On ALL Relais"
+<li>If 1-3 boards show an error, do a power-cycle of the corresponding sector
+<li>If 7-9 boards show an error, do a DAQ restart
+<li>If 14/16 boards show an error after a power-cycle, click "MDC LV Turn On ALL Relais". You can
+check the status of relais <a href="/mon/monitor.cgi?1-window-MDCLV">here</a>.
</ul>
<br>
<h3>Other Endpoints</h3>
-This button shows if all front-end modules of Shower, Forward Wall, Start-/Veto-detector and CTS are active.
+This button shows if all modules of Start-/Veto-detector, CTS as well
+as network hubs are active.
The button is red if at least one module is missing.
<h4>Error Handling</h4>
<p> Restart DAQ. If this doesn't help, do a power-cycle of the corresponding system.
+ - see the list of addresses on the wall next to the door to the server room.
<h3>RICH Endpoints</h3>
-This button shows if all RICH front-end modules are active. The button is red if at least one module is missing.
+This button shows if all RICH front-end modules are active. The button is red if too many
+modules are missing.
<h4>Error Handling</h4>
-<p> Restart DAQ. If this doesn't help, do a power-cycle of the corresponding system.
-
+<ul>
+<li>Do a DAQ restart
+<li>If the same board (with 7xxx address) misses again afterwards, use "Resync DiRich" and another DAQ restart
+<li>If this doesn't help, use "Reboot DiRich", "Reboot Rich Combiner" and a DAQ restart
+<li>If many boards are missing (>100), check RICH power supplies
+<li>If a hub board (with 8xxx address) is missing as well and a DAQ restart does not help, consider a RICH power cycle
+</ul>
-<h3>RPC Endpoints</h3>
+<h3>ECal Endpoints</h3>
-This button shows if all RPC front-end modules are active. The button is red if at least one module is missing.
+This button shows if all ECal front-end modules are active. The button is red if at least one module
+is missing.
<h4>Error Handling</h4>
-<p> Restart DAQ. If this doesn't help, do a power-cycle of the corresponding system.
+<p> Restart DAQ.
+<p>If this doesn't help after the third try, do a power-cycle of the ECalRpc 48V supply. Afterward,
+do a Reprogram FPGA and Restart DAQ.
+
<h3>TOF Endpoints</h3>
-This button shows if all TOF front-end modules are active. The button is red if at least one module is missing.
+This button shows if all TOF and RPC front-end modules are active. The button is red if at least one
+module is missing.
<h4>Error Handling</h4>
-<p> Restart DAQ. If this doesn't help, do a power-cycle of the corresponding system.
+<p> Restart DAQ. If this doesn't help, do a power-cycle of the corresponding system - see the list
+of addresses on the wall next to the door to the server room.
--- /dev/null
+<h3>RICH Thresholds
+
+If there is an error with RICH threshold settings, use "Set RICH Thr".
+Note that this is updated only every 2 minutes and loading threshold takes a while.
--- /dev/null
+Shows the amount of channels without proper thresholds. 468 are currently missing, but it shouldn't be more.
+<br>Do a "Set RICH Thr" if an error is shown. You can keep the DAQ running and writing files during this process because
+only few pixels are affected.
+Just a monitor - if it's read, it's in the responsibility of the ECal operator
--- /dev/null
+Just a monitor - if it's red, it's in the responsibility of the Forward Wall operator
+Just a monitor - if it's red, it's in the responsibility of the MDC operator
--- /dev/null
+<h3>Number of out-of-sync boards</h3>
+<p>
+Checks which boards are out of sync with the rest of the boards
+
+<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
+
+<ul>
+<li>Check the list of board addresses, which board is busy.
+<li>If the address starts with '7' (from RICH), try to resync DiRich
+<li>If not, a DAQ restart should solve the problem.
+</ul>
+
+
+
+
+
<h3>MDC Link Errors</h3>
<p>
This button shows the number of link errors per second. If this number is too high, this could indicate that a front-end board is damaged. Usually, this doesn't need any error handling. Problems can be related to unstable HV in some chambers.
-<p>If this number is huge and at the same time "trigger errors" also shows problems, there might be a problem with a front-end. Restart the DAQ - usually it will tell you that the compile time of one OEP is wrong, so you have to do a "Reload MDC".
+<p>If this number is huge and at the same time "trigger errors" also shows problems, there might be
+a problem with a front-end. Restart the DAQ - usually it will tell you that the compile time of one
+OEP is wrong, so you have to do a "Reboot OEP".
+Checks a certain setting of the interrupts on our eventbuilder servers. If not ok, monitor if the EB lose more data than
+usual.
+This should usually fix itself within 5 minutes.
+Call an expert if it doesn't.
--- /dev/null
+Just a monitor - if it's red, it's in the responsibility of the RPC operator, please inform them.
--- /dev/null
+Just a monitor - if it's red, it's in the responsibility of the TOF operator. Please inform them.
-<h3>Rate on the PT6</h3>
-The actual rate on the PT6 trigger input. The left number is the raw count, the right number is after subtraction of the off-spill count rate to reduce noise.
+<h3>Rate on the PT3</h3>
+The actual rate on the PT3 trigger input. The left number is the raw count, the right number is
+after subtraction of the off-spill count rate to reduce noise.
<h3>Server CPU</h3>
<p>
-This number gives you the server cpu with the highest load, which should not be exceeding ##%. A high server cpu leads to discarded events. <br>
+This number gives you the server cpu with the highest load, which should not be too high,
+a high server cpu may lead to discarded events. <br>
See a list of the CPU loads <a href="/mon/monitor.cgi?10-window-EBCPU">here</a>.
</p>
<h4>Error Handling if the button is not <font color="gree">Green</font></h4>
<h4>Error Handling</h4>
-<p>
-In case of an error (red field), please take a look to
-the Icinga <a href="http://icingaadmin@cerberus.x-matter.uni-frankfurt.de:9999/icinga/" target="_blank">tactical overview</a>. An eMail is automatically sent to a DAQ-expert,
-who should know how to proceed.
<p>A DAQ restart will not change the situation.
-<p>An overview of the different servers and services monitored is given in the <a href="http://hades-wiki.gsi.de/cgi-bin/view/DaqSlowControl/IcingaMonitor" target="_blank">HADES Wiki</a>.
+<p>In case of an error (red field), you can take a look to the Icinga <a href="/icinga/" target="_blank">tactical overview</a>. An eMail is automatically sent to a DAQ-expert, who should know how to proceed.
+
+<p>Most errors reported are not directly fatal for data taking. The information might help to debug error conditions (e.g. unreachable power supplies). Talk to the expert if you are unsure.
<h3>PT3 Rate</h3>
<p>
This button shows the triggered high multiplicity events per second compared to the countrate in the Start-detector.
-The second number should be around 0.7% during beam time since the interaction rate is around 1%. The first value is the rate
-of PT3 triggers provided to the CTS.
+<!--The second number should be around 0.7% during beam time since the interaction rate is around
+1%. The first value is the rate
+of PT3 triggers provided to the CTS.-->
+The number shown is the Start rate divided by the PT3 rate. Values around 80 are typical.
<br>
If something goes wrong, ask your shift leader.
<p>
This button displays the used Trigger source. It is <font color="yellow">yellow</font> if there is a trigger input error to CTS.
</p>
-If the button is <font color="#AC0">green-yellow</font>, the pulser is switched on.
+If the button is <font color="#AC0">olive</font>, the pulser is switched on.
<h4>How to deal with problems:</h4>
resetColor();
var trbs = [
- [ //["0x6025",14,14,14], ["0x6025",9,15,15], ["0x6041",3,22,22], ["0x6041",7,23,23]
+ [ ["0x6013",1,0,0], ["0x6013",2,1,1], ["0x6013",3,2,2], ["0x6013",4,3,3], ["0x6013",5,4,4]
+ //["0x6025",14,14,14], ["0x6025",9,15,15], ["0x6041",3,22,22], ["0x6041",7,23,23]
],
//["0x6051",1,0,23], ["0x6045",25,0,23], ["0x6011",49,0,23], ["0x6014",73,0,23], ["0x6042",97,0,23], ["0x6015",121,0,23], ["0x6026",145,0,18] ], //sector 0
- [ ["0x6013",1,0,0], ["0x6013",2,1,1], ["0x6013",3,2,2], ["0x6013",4,3,3], ["0x6013",5,4,4],
+ [ //["0x6013",1,0,0], ["0x6013",2,1,1], ["0x6013",3,2,2], ["0x6013",4,3,3], ["0x6013",5,4,4],
["0x6013",6,8,8], ["0x6013",7,5,5], ["0x6013",8,6,6], ["0x6013",9,7,7], ["0x6013",10,16,16],
["0x6013",11,9,9], ["0x6013",12,10,10], ["0x6013",13,11,11], ["0x6013",14,17,17], ["0x6013",15,18,18], ["0x6013",16,19,19], ["0x6013",17,20,20],
["0x6013",18,12,12], ["0x6013",19,13,13], ["0x6013",20,14,14], ["0x6013",21,15,15], ["0x6013",22,21,21], ["0x6013",23,22,22], ["0x6013",24,23,23],
['mV (3.3)','mV (2.5)','mV (1.2)','mA (@1.2)'],
['mV (3.3)','mV (2.5)','mV (1.2)','mV (1.1)'],
['mA (@1.1)','mA (@1.2)','mA (@2.5)','mA (@3.3)']];
-my $channel = [7,7,7,6,5]; #SPI interface number
+my $channel = [7,7,7,6,6]; #SPI interface number
#1:4V, 2:2V, 3:1V
my $resolution = [[2,1,2,1], [2,2,2,1], [2,2,2,4], [2,2,2,2], [3,3,2,2]];
my ($board,$mode) = @_;
#2 MHz SPI
trb_register_write($board,0xd41a,25);
-
+ trb_register_write($board,0xd417,0x40) if $mode == 4;
my $cmd; my $s;
my $return;
for(my $i = 0; $i <= 4; $i++) {
$cmd = 0xc1830000 + ($resolution->[$mode][0] << 25) + (($i % 4) << 28);
$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]);
+# printf("0x%x\n",$board);
if($i) {
foreach my $t (keys %$s) {
$return->[$i-1]{$t} = ($s->{$t}>>19&0xfff)*$multiplier->[$mode][$i-1];
}
usleep(5000);
}
+ trb_register_write($board,0xd417,0x0) if $mode == 4;
return $return;
}
my $maxpercent = max(@{$diff->{0x8000}});
my $msgstr = sprintf("%3.1f%%",$maxpercent);
my $qastate = QA::OK;
+ $qastate = QA::WARN if ($maxpercent > 50);
+ $qastate = QA::WARN_2 if ($maxpercent > 75);
$qastate = QA::ERROR if ($maxpercent > 99);
- QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"") unless ($maxpercent > 99);
+ QA::WriteQALog($fqa,"daq","busy",5,$qastate,"Busy",$msgstr,"") unless ($maxpercent >= 99);
}
}
if($export->{quality} && $export->{quality} < 1) {
$longtext .= "Quality reported by EB is below 1";
- $status = max(QA::ERROR,$status);
+ $status = max(QA::FATAL,$status);
}
################ comparing timestamps of calib files ############
- my $ls_out = `ls /home/hadaq/oper/*/*.cal -lah --time-style=long-iso`;
+ my $ls_out = `ls /home/hadaq/oper/*/*.cal -rtlah --time-style=long-iso`;
my @ls_out_list = split("\n",$ls_out);
my $calib_file_epochs;
HPlot::PlotInit({
name => "SpillSum",
file => "files/SpillSumDuty",
- entries => 50,
+ entries => 100,
type => HPlot::TYPE_HISTORY,
output => HPlot::OUT_PNG,
xlabel => "Spills",
ylabel => "Total Sum",
sizex => 600,
sizey => 200,
+ ymin => 0,
+ ymax => "*<9E7",
curves => 1,
buffer => 0,
nokey => 1,
+ storable => 1,
});
+
+HPlot::PlotInit({
+ name => "SpillPeak",
+ file => "files/SpillPeak",
+ entries => 100,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ xlabel => "Spills",
+ ylabel => "Peak Intensity [Hz]",
+ sizex => 600,
+ sizey => 200,
+ ymin => 0,
+ ymax => "*<9E6",
+ curves => 1,
+ buffer => 0,
+ nokey => 1,
+ storable => 1,
+ });
+
my $old;
my $diff;
my @store;
my $time = 0;
my $empties = 0;
+my @lastspills;
my $SPS = 10; #samples per second
my $sampletime = 1E6/$SPS;
while(1) {
- my $o = trb_registertime_read_mem(0x5000,0xc000,0,17);
+ my $o = trb_registertime_read_mem(0x5001,0xc000,0,17);
#Just the usual calculation of differences on counters & normalization based on time between reads.
if (defined $old) {
#sum strips & store
my $sum = 0;
for my $c (1..16) {
- $sum += $diff->{0x5000}[$c];
+ $sum += $diff->{0x5001}[$c];
}
# $sum = $dummy[$iter++]; #You can't do that on stage
my $lastsum = 0;
for my $c (1..5) { $lastsum += $store[-$c]//0;}
- if($lastsum < 20*5*$SPS && ($store[-6]//0) > 9*$SPS) {
+ if($lastsum < 100*5*$SPS && ($store[-6]//0) > 100*$SPS) {
my $total = sum(@store)/$SPS;
my $max = max(@store);
my $avg = sum(@store)/$samples;
my $duty = $avg/$max;
+ push(@lastspills,$total);
+ shift(@lastspills) if scalar @lastspills > 50;
+
+ my $spillmin = min(@lastspills);
+ my $spillmax = max(@lastspills);
+ my $spillavg = sum(@lastspills)/(scalar @lastspills);
+ my $flucqual = ($spillmax-$spillmin)/$spillavg;
+
HPlot::PlotAdd("DutyFactor",$duty,0);
HPlot::PlotAdd("SpillSum", $total,0);
+ HPlot::PlotAdd("SpillPeak", $max,0);
HPlot::PlotDraw('DutyFactor');
HPlot::PlotDraw('SpillSum');
+ HPlot::PlotDraw('SpillPeak');
my $length = sprintf("%0.1f s (%i samples)",time()-$time,$samples);
my $offtime = $empties/(1E6/$sampletime);
- $str = Hmon::MakeTitle(8, 16, "SpillShapeAnalysis",1);
+ $str = Hmon::MakeTitle(8, 19, "SpillShapeAnalysis",1);
$str .= qq@<img width="600" src="%ADDPNG files/StartRateXhistbar.png%" type="image/png"><br>\n@;
$str .= qq@<img src="%ADDPNG files/DutyFactor.png%" type="image/png"><br\>\n@;
$str .= qq@<img src="%ADDPNG files/SpillSumDuty.png%" type="image/png"><br\>\n@;
+ $str .= qq@<img src="%ADDPNG files/SpillPeak.png%" type="image/png"><br\>\n@;
$str .= "<table style=\"margin:auto;\"><tr><td>Last Sum<td>".QA::SciNotation($total);
- $str .= "<tr><td>Last Duty<td>".sprintf("%0.3f",$duty);
+ $str .= "<td>Last Duty<td>".sprintf("%0.3f",$duty);
$str .= "<tr><td>Last Duration<td>".$length;
- $str .= "<tr><td>Last Break<td>".$offtime." s";
+ $str .= "<td>Last Break<td>".$offtime." s";
$str .= "<tr><td>Last Max<td>".QA::SciNotation($max)." Hz (100ms)";
+ $str .= "<td>Spill Fluctuation<td>".QA::SciNotation($spillmin)." - ".QA::SciNotation($spillmax)."<br>∅ ".QA::SciNotation($spillavg)." (".QA::SciNotation($flucqual).")";
$str .= "</table>";
$str .= Hmon::MakeFooter();
Hmon::WriteFile("SpillShapeAnalysis",$str);
my $status = QA::GetQAState('inside', ($avg_daq - $avg_eb)/($avg_daq?$avg_daq:1), @QA::EBDeltaRateLimits);
$status = QA::OK if $loop_counter < 60;
+ $status = QA::OK if($avg_eb > $avg_daq);
+
if (!$actmask) {
$status = QA::WARN_2;
#$diff_p_str = "---";
$error_ctr++;
$status = QA::OK;
} else {
- $error_ctr = 0;
+ if ($status != QA::ERROR) {
+ $error_ctr = 0;
+ }
}
#$status = QA::ERROR if ($diff > 2000 || $diff < -2000);
my $ratestr_eb = &QA::SciNotation($avg_eb);
my $ratediff = &QA::SciNotation($avg_daq - $avg_eb);
my $shorttext = $ratestr_daq . "/" . $ratestr_eb;
- my $longtext = "The average rates over 120s are shown: vg. CTS 120s: " . $ratestr_daq . " - Rate Eventbuilders: $ratestr_eb - ΔRate: $ratediff";
+ my $longtext = "The average rates over 120s are shown: avg. CTS 120s: " . $ratestr_daq . " - Rate Eventbuilders: $ratestr_eb - ΔRate: $ratediff";
$longtext = " $longtext ErrorCtr: $error_ctr" if ($error_ctr > 0);
- QA::WriteQALog($flog, "eb", "rate", 1,
+ QA::WriteQALog($flog, "eb", "rate", 2,
$status, $title, $shorttext, $longtext); # unless $opt_debug>0;
print "status: $status title:$title short:$shorttext long: $longtext \n" unless $opt_debug<1;
if ($status >= QA::ERROR) {
for my $i (1.. scalar @{$data->{Builders}{value}}) {
$databui[$i] = getjsonhash('eb',"BNET-EB-$i/HadaqCombiner/get.json");
}
-
+ #print Dumper @databui;
$data->{RunIdStr}{value} =~ /(\d\d)(\d\d)(\d\d)$/;
my $runstart = "--";
$runstart = "$1:$2:$3" if $3;
$str .= "<table><col><col style='width:130px;text-align:right;background:white;'> ";
$class = "bgn";
- $class = "bye" if (time() - $data->{LastCalibr}{'time'} > 84600);
+ $class = "bye" if (time() - $data->{LastCalibr}{'time'} > 284600);
$str .= "<tr><th>Calib Time<td class=\"$class\">".strftime("%d.%m. %H:%M",localtime($calibdata->{LastCalibr}));
$class = "bgn";
$str .= "<div style='float:left;display:inline;margin:0px 10px;background:#ccc;'>";
- $str .= "<table class=\"eb\"><col style='width:80px;'><col style='width:80px'><col style='width:80px'><col style='width:80px'>";
+ $str .= "<table class=\"eb\"><col style='width:80px;'><col style='width:60px'><col style='width:60px'><col style='width:60px'><col style='width:60px'>";
$str .= "<tr><th colspan='5' style='background:white'>Input Nodes";
- $str .= "<tr><td><th>Data B/s<th>Events/s<th>Dropped Ev/s";
+ $str .= "<tr><td><th>Data B/s<th>Events/s<th>Lost Ev/s<th>Dropped Ev/s";
for my $i (1.. scalar @{$data->{Inputs}{value}}){
$str .= "<tr><th>$nodename".
"<td class=\"$class\">".QA::SciNotation(($datainp[$i]->{HadaqData}{value}//0)*1E6).
"<td class=\"$class\">".QA::SciNotation(ceil($datainp[$i]->{HadaqEvents}{value}//0)).
- "<td class=\"$class\">".QA::SciNotation(ceil($datainp[$i]->{HadaqLostEvents}{value}//0))
-# "<td class=\"$class\">".QA::SciNotation(($datainp[$i]->{HadaqDroppedData}{value}//0)*1E6)."B "
+ "<td class=\"$class\">".QA::SciNotation(ceil($datainp[$i]->{HadaqLostEvents}{value}//0)).
+ "<td class=\"$class\">".QA::SciNotation(($datainp[$i]->{HadaqDroppedData}{value}//0)*1E6)."B "
;
--- /dev/null
+#!/usr/bin/perl
+use warnings;
+use strict;
+use HADES::TrbNet;
+use Time::HiRes qw(usleep);
+use Data::Dumper;
+
+use lib "/home/hadaq/trbsoft/daqtools/dmon/code";
+use Dmon;
+
+my $dirich = 0xfe71;
+my $std_thresh = 0x6800;
+
+my $monitor = 0xc001;
+
+my $hit_counters_reg = 0xc000;
+
+my $first_channel = 0;
+my $last_channel = 47;
+
+my @res; my $res; my $rh_res;
+
+
+trb_init_ports() or die trb_strerror();
+
+# enable monitor counters
+$res = trb_register_write($dirich, 0xdf80 , 0xffffffff);
+if(!defined $res) {
+ $res = trb_strerror();
+ print "error output: $res\n";
+}
+
+my $command;
+my $chain=0;
+
+my $READ = 0x0<<20; # bits to set for a read command
+my $WRITE = 0x8<<20; # bits to set for a write command
+my $REGNR = 24; # number of bits to shift for the register number
+
+my $skipped_both_counter=0;
+
+my $rh_tdc_skip_list = {6011=>1, 6012=>1, 6013=>1, 6014=>1, 6015=>1, 6050=>1, 6051=>1, 6052=>1, 6053=>1, 6054=>1, 6055=>1, 6056=>1 };
+#print Dumper $rh_tdc_skip_list;
+#exit;
+
+while (1) {
+
+ $res = trb_register_read_mem($dirich, $hit_counters_reg + 1 , 0, 48);
+ unshift(@res, $res);
+ pop @res if ($#res >1);
+ print "res: $#res\n";
+
+ my $final_counter = 0;
+
+ if($#res==0) {
+ sleep 1;
+ next;
+ }
+
+ my $rh_thresh = {};
+ my $rh_affected = {};
+ my $rh_final_list = {};
+ my $rh_diffs = {};
+ for my $channel (0 .. $last_channel) {
+ foreach my $cur_ep (keys %{$res[0]}) {
+ my $rate = $res[0]->{$cur_ep}->[$channel] - $res[1]->{$cur_ep}->[$channel];
+ $rh_diffs->{$cur_ep}->[$channel] = $rate;
+ }
+ }
+
+ for my $channel (0 .. $last_channel) {
+ foreach my $cur_ep (keys %{$rh_diffs}) {
+ my $rate = $rh_diffs->{$cur_ep}->[$channel];
+ if ($rate == 0) {
+ $rh_affected->{$cur_ep}->[$channel] = 1;
+ }
+ }
+ }
+
+ #print Dumper $rh_affected;
+ #exit;
+
+ for my $channel (0 .. $last_channel) {
+ $chain = int($channel/16);
+ $command = ($channel&0xf)<<$REGNR | $READ ;
+ #print "$command\n";
+ $res = Dmon::PadiwaSendCmd($command,$dirich, $chain);
+ foreach my $cur_ep (keys %$res) {
+ $rh_thresh->{$cur_ep}->[$channel] = $res->{$cur_ep} &0xffff;
+ }
+ }
+
+#print Dumper $rh_thresh->{0x6024};
+#print Dumper $rh_thresh;
+#exit;
+
+ for my $channel (0 .. $last_channel) {
+ if($channel%2 == 0) {
+ next;
+ }
+
+ foreach my $cur_ep (keys %$rh_affected) {
+ if (defined $rh_tdc_skip_list->{$cur_ep} && $rh_tdc_skip_list->{$cur_ep} == 1) {
+ next;
+ }
+ my $affected = $rh_affected->{$cur_ep}->[$channel];
+ if (!defined $affected) {
+ next;
+ }
+ if (defined $rh_affected->{$cur_ep}->[$channel-1]) {
+ # fast and slow affected: So, no problem of the threshold of the slow
+ $skipped_both_counter++;
+ next;
+ }
+ my $value = $rh_thresh->{$cur_ep}->[$channel];
+ if (!defined $value or $value == 0) {
+ next;
+ }
+ $rh_final_list->{$cur_ep}->{$channel} = 1;
+ $final_counter++;
+ }
+ }
+
+ print Dumper $rh_final_list;
+ print "thresholds to bw written: $final_counter\n";
+
+ foreach my $cur_ep (keys %$rh_final_list) {
+ foreach my $channel (keys %{$rh_final_list->{$cur_ep}}) {
+ $chain = int($channel/16);
+ $command = ($channel&0xf)<<$REGNR | $WRITE | 0x1ff;
+ #print "write: chain: $chain, Channel: $channel, value: $cur_value\n";
+ Dmon::PadiwaSendCmd($command,$cur_ep, $chain);
+ }
+ }
+
+
+ usleep(30E3);
+
+ foreach my $cur_ep (keys %$rh_final_list) {
+ foreach my $channel (keys %{$rh_final_list->{$cur_ep}}) {
+ my $value = $rh_thresh->{$cur_ep}->[$channel];
+ $chain = int($channel/16);
+ printf "want to write: $value to ecal: 0x%x, chain %d channel: $channel\n",$cur_ep,$chain;
+ $command = ($channel&0xf)<<$REGNR | $WRITE | $value;
+ Dmon::PadiwaSendCmd($command,$cur_ep, $chain);
+ }
+ }
+
+ sleep 4;
+}
+
+exit;
+
# $store->{hex($b)}{$chain*16+$channel} = $val;
# $b = sprintf('0x')hex($b);
my $v = $chain*16+$channel;
-
+
if (($v % 2) == 0 && ($b ne "6036")) {
$data->{fast}{"0x".$b}{$v/2} = sprintf('%.2f',$val);
if ($val > $fastmax ) {$fastmax = $val;}
if ($val < $slowmin ) {$slowmin = $val;}
}
}
-
+
$data->{fast}{min} = $fastmin;
$data->{fast}{max} = $fastmax;
$data->{fast}{symbol} = 'threshold';
print $fh encode_json($data->{fast});
close $fh;
-sleep 120;
+sleep 2;
}
-
-
-
-
+
+
+
+
# print Dumper $store;
#0x6000,0x6001,0x6002,0x6003,0x6004,0x6005,0x6006,
0x6010,0x6011,0x6012,0x6013,0x6014,0x6015,0x6016,
0x6020,0x6021,0x6022,0x6023,0x6024,0x6025,0x6026,
- 0x6036,#0x6030,0x6031,0x6032,0x6033,0x6034,0x6035,
+ #0x6030,0x6031,0x6032,0x6033,0x6034,0x6035,0x6036
0x6040,0x6041,0x6042,0x6043,0x6044,0x6045,0x6046,
0x6050,0x6051,0x6052,0x6053,0x6054,0x6055,0x6056,
);
if ($num_mdc_missing > 0) {$longtext = "Endp @sorted_mdc_results missing"};
if ($num_mdc_mistake > 0) {$longtext .= " Endp @{$mdc_results[4]} not known";}
- my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
- Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate > 60);
+ my $qastate = QA::GetQAState('below',$num_mdc_missing,@QA::MdcEndpMissingLimits);
+ Hmon::Speak('mdcmissonce',"$num_mdc_missing MDC Frontends missing") if($qastate > 60 && $qastate < QA::ERROR );
+ Hmon::Speak('mdcmiss',"$num_mdc_missing MDC Frontends missing") if($qastate >= QA::ERROR );
QA::WriteQALog($flog,"endp","mdc",$waittime,$qastate,$title,$value,$longtext);
if($qastate > 60) {
system("logger -p local1.info -t DAQ Endp \\<E\\> $longtext") unless (($timecnt->{mdc}++)%$loggerperiod);
if ($num_rich_mistake > 0) {$rich_longtext .= " Endp @{$rich_results[4]} not known";}
$qastate = QA::GetQAState('below',$num_rich_missing,@QA::RichEndpMissingLimits);
- Hmon::Speak('richmiss',"$num_rich_missing Rich Frontends missing") if($qastate > 60);
+ Hmon::Speak('richmissonce',"$num_rich_missing Rich Frontends missing") if($qastate > 60 && $qastate < QA::ERROR );
+ Hmon::Speak('richmiss',"$num_rich_missing Rich Frontends missing") if($qastate >= QA::ERROR );
+
+
QA::WriteQALog($flog,"endp","rich",$waittime,$qastate,
$rich_title,$rich_value,$rich_longtext);
if($qastate > 60) {
qx(./hmon_hadplotnew.sh -d 400 -o 5 -n 1500 -yscale 1000 -yoverflow 65.536 -ytitle "Event Rate [kHz]" -xtitle "" -output "PNG.files/eventratehistlong.700.315" eventrate 1>/dev/null 2>/dev/null);
}
else{
- qx(./hmon_hadplotnew.sh -d 10 -o 50 -n 1000 -yscale 1000 -yoverflow 65.536 -ytitle "Event Rate [kHz]" -xtitle "" -output "PNG.files/eventratehistshort.700.315" eventrate 1>/dev/null 2>/dev/null);
+ qx(./hmon_hadplotnew.sh -d 10 -o 50 -n 2000 -yscale 1000 -yoverflow 65.536 -ytitle "Event Rate [kHz]" -xtitle "" -output "PNG.files/eventratehistshort.700.315" eventrate 1>/dev/null 2>/dev/null);
}
}
$msg .= "$bitnames[$b]:";
foreach my $s (sort keys %{$store->{$b}}) {
if (($b != 8) && ($b != 7 || $s > 0x2400)) { #no bit 8
+ next if ($s > 0x7000 && $b == 10);
$msg .= sprintf(" %04x",$s);
$t = 1;
}
--- /dev/null
+#!/usr/bin/perl -w
+
+use warnings;
+use Time::HiRes qw(usleep);
+use List::Util qw(min max);
+use strict;
+use Data::Dumper;
+use Hmon;
+use QA;
+use HADES::TrbNet;
+use HPlot;
+#use Perl2Epics;
+use LWP::Simple;
+
+my $fqa = QA::OpenQAFile();
+trb_init_ports() or die trb_strerror();
+
+
+while(1){
+ my $msg = "";
+ my $cnt = 0;
+
+ my $temp = trb_register_read(0xffff,0);
+ foreach my $b (keys %{$temp}) {
+ if ($temp->{$b} & 0x10) {
+ $cnt++;
+ $msg .= sprintf("%04x ",$b);
+ }
+ }
+
+ my $txt = "OK";
+ $txt = "$msg" if $cnt && $cnt < 2;
+ $txt = "Error" if $cnt >= 2;
+ $msg = "None" if $cnt == 0;
+ $msg = "Following endpoints report to be out of sync: ".$msg;
+ my $status = QA::OK;
+ $status = QA::ERROR if $cnt;
+
+ QA::WriteQALog($fqa,"main","outofsync",20,$status,'Sync',$txt,$msg);
+ sleep 2;
+ }
if($plots) {
while(1) {
- $str = Hmon::MakeTitle(10,12,"Mux Histogram",0);
+ $str = Hmon::MakeTitle(10,22,"Mux Histogram",0);
my $binning = trb_register_read(3,0xa0c8) or sleep 5 and next;
my $offset = trb_register_read(3,0xa0c6) or sleep 5 and next;
my $source = trb_register_read(3,0xa0c2) or sleep 5 and next;
}
- $str .= qq@Source A: @.$src[0].qq@, Source B: @.$src[1].qq@<br>Offset: $offset@.qq@s - Binning: $binning@.qq@s<img src="%ADDPNG files/muxhist.png%" type="image/png">@;
+ $str .= qq@Source A: @.$src[0].qq@, Source B: @.$src[1].qq@<br>Offset: $offset@.qq@s - Binning: $binning@.qq@s<img src="%ADDPNG files/muxhist.png%" type="image/png">\n@;
+ $str .= qq@<br><img src="%ADDPNG files/muxhist2.png%" type="image/png">@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("Muxhist",$str);
sleep(5);
qx(./hmon_hadplot_daqtools.sh -d 3000 \\
-a 0x0003 -r 41216 -m 500 -p 0 -w 32 -t "A" \\
-a 0x0003 -r 41716 -m 500 -p 0 -w 32 -t "B" \\
- -output "PNG.files/muxhist.760.530" -curvestyle steps -key genreg 2>/dev/null &
+ -output "PNG.files/muxhist.760.500" -curvestyle steps -key genreg 2>/dev/null &
+
+./hmon_hadplot_daqtools.sh -d 3000 \\
+ -a 0x0003 -r 41216 -m 500 -p 0 -w 32 -t "A" \\
+ -output "PNG.files/muxhist2.760.500" -curvestyle steps -key genreg 2>/dev/null &
- );
+ );
+
}
my $evtnum = 0;
my $rate = 0;
-
+my $timer = 0;
trb_init_ports() or die trb_strerror();
my $fqa = QA::OpenQAFile();
Hmon::TraceDBLoad();
my $hubs = "8401 8411 8601 8701 8801 0x8204,0x8206,0x8212,0x8213,0x8214,0x8215,0x8216,0x8217,0x8221,0x8222,0x8223,0x8224,0x8225,0x8226,0x8227,0x8228,0x8229,
0x8231,0x8239,0x8240,0x8241,0x8242,0x8243,0x8244,0x8245,0x8246,0x8247,0x8248,0x8249,0x824a,0x8251,0x8252,0x8254,0x8256,0x8258,0x8259,
0x8260,0x8261,0x8262,0x8263,0x8264,0x8265,0x8266,0x8267,0x8268,0x8269,0x826a,0x8271,0x8279,0x8281,0x8282,0x8283,0x8284,0x8285,0x8286,0x8287,0x8288,0x8289,
- 0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x82a4,0x82a6, 8a00 8a01 8a02 8a03 8a04 8a05 ";
+ 0x8292,0x8293,0x8294,0x8295,0x8296,0x8297,0x82a4,0x82a6, 8a00 8a01 8a02 8a03 8a04 8a05
+ 0x1002 0x1001 0x1003 0x1004 0x1011 0x1012 0x1013 0x1014 0x1022 0x1021 0x1023 0x1024
+ 0x1031 0x1032 0x1033 0x1034 0x1041 0x1042 0x1043 0x1044 0x1051 0x1052 0x1053 0x1054
+ 0x1111 0x1112 0x1113 0x1114 0x1101 0x1102 0x1103 0x1104 0x1121 0x1122 0x1123 0x1124
+ 0x1131 0x1132 0x1133 0x1134 0x1141 0x1142 0x1143 0x1144 0x1151 0x1152 0x1153 0x1154
+ ";
my $hs = sprintf("%04x",$h);
# print $h."\n";
if (index($hubs,$hs) != -1) {
return 1;
}
- if ($h > 0x1000 && $h < 0x1200 && $h%16) {
+ if ($h >= 0x1000 && $h < 0x1200) {
return 1;
}
return 0;
$status = "Waiting" if $boardlist ne "";
$longmsg = "Read-out seems to be stuck. Hubs waiting for read-out: $boardlist" if $boardlist ne "";
+ system("logger -p local1.info -t DAQ Readout \\<E\\> $longmsg") if $boardlist ne "" && $timer == 0;
Hmon::Speak('busy', "Error: Data taking not running.") if $qastate >= QA::ERROR;
QA::WriteQALog($fqa, "daq", "readout", 30, $qastate,"Read-out", $status,$longmsg);
# print $qastate." ".$status." ".$longmsg."\n";
+
+ $timer++ if $boardlist ne "";
+ $timer = 0 if $timer >= 15;
sleep(1);
}
$str .= Hmon::MakeFooter();
Hmon::WriteFile("RichThresh",$str);
+my $fqa = QA::OpenQAFile();
+
my $filename = 'rich_pmt_parameters_xy.geo';
open(my $fh, '<:encoding(UTF-8)', $filename)
}
}
+my $timecnt=0;
+my $missChn = 470; # Nmbr of missing channels that is allowed.
+my $thr_cnt = 0;
+
+
while(1){
-my @t;
-my $store;
-for my $i (0..15) {
- my $cmd = "/home/hadaq/trbsoft/daqtools/tools/spi_slave.pl -e=0xfe51 -c=0 -x pwm --channel=".$i;
- push(@t,qx($cmd));
- $cmd = "/home/hadaq/trbsoft/daqtools/tools/spi_slave.pl -e=0xfe51 -c=1 -x pwm --channel=".$i;
- push(@t,qx($cmd));
+
+if ($timecnt == 0){
+ $timecnt = 12;
+ my @t;
+ my $store;
+ $thr_cnt = 0;
+ for my $i (0..15) {
+ my $cmd = "/home/hadaq/trbsoft/daqtools/tools/spi_slave.pl -e=0xfe51 -c=0 -x pwm --channel=".$i;
+ push(@t,qx($cmd));
+ $cmd = "/home/hadaq/trbsoft/daqtools/tools/spi_slave.pl -e=0xfe51 -c=1 -x pwm --channel=".$i;
+ push(@t,qx($cmd));
}
-foreach my $s (@t) {
- my ($b,$chain,$channel,$val) = $s =~ /endpoint: 0x(\w\w\w\w) chain: (\d) channel: (\d+) .+ voltage: (\d+\.\d+) mV/;
-# $store->{hex($b)}{$chain*16+$channel} = $val;
- $b = hex($b);
- my $v = $chain*16+$channel;
- HPlot::PlotFill('RichThresh',$val,$pos[$b&0xfff][$v+1][0],$pos[$b&0xfff][$v+1][1]);
+ foreach my $s (@t) {
+ my ($b,$chain,$channel,$val) = $s =~ /endpoint: 0x(\w\w\w\w) chain: (\d) channel: (\d+) .+ voltage: (\d+\.\d+) mV/;
+# $store->{hex($b)}{$chain*16+$channel} = $val;
+ $b = hex($b);
+ my $v = $chain*16+$channel;
+ if ($val < 1330 || $val > 2500) {
+ $thr_cnt++;
+ }
+ HPlot::PlotFill('RichThresh',$val,$pos[$b&0xfff][$v+1][0],$pos[$b&0xfff][$v+1][1]);
}
-HPlot::PlotDraw('RichThresh');
+
+ HPlot::PlotDraw('RichThresh');
+
+}
+my $qastate = QA::OK;
+ $qastate = QA::ERROR if ($thr_cnt > $missChn);
+
+my $str = sprintf("%i", $thr_cnt);
+my $longstr = sprintf("Thresholds are well loaded. (%i chnls missing)", $thr_cnt);
+ $longstr = "load Thresholds to RICH" if ($thr_cnt > $missChn) ;
+QA::WriteQALog($fqa,"feeerr","richthr", 40, $qastate, "RICH Thresholds", $str, $longstr);
+
+$timecnt--;
-sleep 120;
+sleep 10;
}
QA::SciNotation($spillavgshort),
QA::SciNotation($spillavglong),
$spilllength);
- QA::WriteQALog($fqa,"trg", "spill", 30, $qastate, "Spill Sum",
+ QA::WriteQALog($fqa,"trg", "spill", 50, $qastate, "Spill Sum",
$qashort, $qalong) unless $opt_debug>0;
HPlot::PlotAdd("EvtsPerSpill",$events/1E3) unless $opt_debug>0;
HPlot::PlotDraw("EvtsPerSpill") unless $opt_debug>0;
$events = 0;
$spilllength = 0;
- } elsif ($spilllength > 20) {
- QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum",
+ } elsif ($spilllength > 30) {
+ QA::WriteQALog($fqa, "trg", "spill", 50, QA::NOTE, "Spill Sum",
"No Spills", "No Spills detected at the moment") unless $opt_debug>0;;
#print $spilllength."\n" unless $spilllength%10;
- if($spilllength >= 25 && ($spilllength%25 == 0)) {
+ if($spilllength >= 30 && ($spilllength%30 == 0)) {
# my $data = Perl2Epics::GetAll();
# print STDERR $data->{'prefix'}->{val}."\n";
# if(($data->{'prefix'}->{val} eq '-1') || ($data->{'prefix'}->{val} eq 'be')) {
$qashort, $qalong) unless $opt_debug>0;
my $spillcountstate = QA::OK;
- if ($countnochange > 15) {$spillcountstate = QA::WARN;}
+ if ($countnochange > 25) {$spillcountstate = QA::WARN;}
QA::WriteQALog($fqa, "daq", "spillcount", 5, $spillcountstate, "Spill Count",
$spillcount,"Number of spills: $spillcount" ) unless $opt_debug>0;
if($lastspillcount == $spillcount) {
buffer => 1,
stacked => 1,
curvewidth => .9,
+ additional => "
+ set obj 1 rect from -1, 3.5E6 to 200, 4E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 4E6 to 200, 10E6 fc rgb '#ffdddd' behind
+ "
});
HPlot::PlotInit({
xscale => 10,
buffer => 1,
stacked => 1,
+ additional => "
+ set obj 1 rect from -1, 3.5E6 to 200, 4E6 fc rgb '#ffffbb' behind \n
+ set obj 2 rect from -1, 4E6 to 200, 10E6 fc rgb '#ffdddd' behind \n
+ ",
curvewidth => .9,
});
$msg2 =~ s/\s+\)/\)/g; $msg2 =~ s/\(\s+/\(/g;
my $status = "on ".($cnt+$cnt2)." boards";
my $qastate = QA::GetQAState('below', $cnt+$cnt2, @QA::TimeoutLimits);
- $qastate = QA::ERROR if (($MDCRICH_fail == 0) && ($qastate == QA::FATAL));
+ #$qastate = QA::ERROR if (($MDCRICH_fail == 0) && ($qastate == QA::FATAL));
+ if ($MDCRICH_fail == 0) {
+ $qastate = QA::GetQAState('below', $cnt+$cnt2, @QA::TimeoutLimitsOnlyRICHMDC);
+ }
+
if($boardlist1 ne "") {
- Hmon::Speak('timeout',"$cnt Frontend had a timeout: $boardlist1 ") if $cnt < 3;
+ Hmon::Speak('timeout'.(($qastate<QA::ERROR)?'once':''),"$cnt Frontend had a timeout: $boardlist1 ") if $cnt < 3;
Hmon::Speak('timeout',"$cnt Frontend had a timeout ") if $cnt >= 3;
}
if($boardlist2 ne "" && $boardlist1 eq "" ) {
- Hmon::Speak("timeout","$cnt2 Frontend disabled after a timeout: $boardlist2") if $cnt2 < 3;
+ Hmon::Speak("timeout".(($qastate<QA::ERROR)?'once':''),"$cnt2 Frontend disabled after a timeout: $boardlist2") if $cnt2 < 3;
Hmon::Speak('timeout',"$cnt2 Frontend had a timeout ") if $cnt2 >= 3;
}
$plot2->{sizex} = 630;
$plot2->{sizey} = 220;
$plot2->{nokey} = 1;
+$plot2->{storable} = 1;
HPlot::PlotInit($plot2);
$str = Hmon::MakeTitle(8,5,"PT3 accepted over total PT3 per spill (%)",0);
$str .= qq@<img src="%ADDPNG files/Pt1AcceptRatio.png%" type="image/png">@;
my $longmsgcheck = $longmsg;
#Input polarity wrong?
- if($QA::TrgCheckPolarity && (($polarity->{3}->[1] & 0x7fff0000) || $polarity->{3}->[0] & 0x1e0)) {
+ if($QA::TrgCheckPolarity && (($polarity->{3}->[1] & 0x7fff0000))) { # || $polarity->{3}->[0] & 0x1e0)
$qastate = QA::WARN;
$longmsg .= " - Signal polarity wrong on inputs ";
foreach my $i(0..30) {
$longmsg .= ", ";
}
}
- foreach my $i(5..8) {
- if($polarity->{3}->[0] & (1<<$i)) {
- $longmsg .= "PT ".$i;
- $longmsg .= ", ";
- }
- }
+# foreach my $i(5..8) {
+# if($polarity->{3}->[0] & (1<<$i)) {
+# $longmsg .= "PT ".$i;
+# $longmsg .= ", ";
+# }
+# }
chop $longmsg foreach(0..1);
}
my $qastateacc = QA::OK;
QA::WriteQALog($fqa, "trg", "source", 10, $qastate, "Trigger Source", $msg, $longmsg);
- QA::WriteQALog($fqa, "trg", "accepted", 10, $qastateacc, "Accept. PT1", $accmsg, $acclmsg);
+ QA::WriteQALog($fqa, "trg", "accepted", 10, $qastateacc, "Accept. PT3", $accmsg, $acclmsg);
my $qastatept = QA::OK;
my $ptoverStattart = $rStat->{3}->[0x24]/($rStat->{3}->[0x2c] || 1)*100;
-<div class="linkbox" style="width:730px;"><h4>Main</h4><ul>
-<li style="width:600px;"><a href="monitor.cgi?1-window-QA" style="color:#d33">Tactical Overview (the central screen)</a></li>
-<li style="width:600px;"><a href="monitor.cgi?3-window-logfile">Logfile (most important messages)</a></li>
-<li style="width:600px;"><a href="monitor.cgi?10-window-chat">Chat Log</a></li>
-<li style="width:600px;"><a href="../daqtools/index.pl" target="_blank">Web Tools</a></li>
-<li style="width:600px;"><a href="../eb/?browser=fix" target="_blank">Eventbuilder Monitor</a></li>
-<li style="width:600px;"><a href="../rawmon/" target="_blank">Raw Data Monitor</a></li>
+<div class="linkbox" style="float:left"><h4>Main</h4><ul>
+<li><a href="monitor.cgi?1-window-QA" style="color:#d33">Tactical Overview (the central screen)</a></li>
+<li><a href="monitor.cgi?3-window-logfile">Logfile (most important messages)</a></li>
+<li><a href="monitor.cgi?10-window-chat">Chat Log</a></li>
+<li><a href="../daqtools/index.pl" target="_blank">Web Tools (daqtools)</a></li>
+<li><a href="../eb/?browser=fix" target="_blank">Eventbuilder Monitor</a></li>
+<li><a href="../rawmon/" target="_blank">Raw Data Monitor</a></li>
+<li><a href="/mon/files/runstatscompare.png" target="_blank">Accumulated Run Statistics</a>
+</ul></div>
+
+<div class="linkbox" style="float:right"><h4>Documents</h4><ul>
<li><a href="phonenumbers.jpg">Phone Numbers</a>
<li><a href="https://jspc29.x-matter.uni-frankfurt.de/docu/qadocu.pdf">QA manual</a>
<li><a href="https://jspc29.x-matter.uni-frankfurt.de/docu/hadesoperator.pdf">Operator manual</a>
-<li><a href="/mon/files/runstats.png" target="_blank">Accumulated Run Statistics</a>
-</ul></div>
-
-<div class="linkbox" style="width:730px;"><h4>Other Ressources</h4><ul>
-<li style="width:600px;"><a href="files/qa.htm">QA Plots (updated every 5 minutes)</a></li>
-<li style="width:500px;"><a href="files/vertex.htm">Vertex Plots (updated after each file)</a></li>
-<li style="width:500px;"><a href="../spillmon/?browser=no&monitoring=1000&layout=grid4x4&items=[%22EventBuilder/Run/HLD/HLD_HitsFast%22,%22EventBuilder/Run/HLD/HLD_HitsSlow%22,%22EventBuilder/Run/HLD/HLD_TrendX%22,%22EventBuilder/Run/HLD/HLD_TrendY%22,%22EventBuilder/Run/HLD/HLD_BeamX%22,%22EventBuilder/Run/HLD/HLD_BeamY%22,%22EventBuilder/Run/HLD/HLD_VETO_Patt%22,%22EventBuilder/Run/HLD/HLD_QSlow%22,%22EventBuilder/Run/HLD/HLD_HALO_Patt%22,%22EventBuilder/Run/HLD/HLD_XHALOSlow%22,%22EventBuilder/Run/HLD/HLD_YHALOSlow%22,%22EventBuilder/Run/HLD/HLD_LastSpill_Q_factor%22]">Beam Properties</a></li>
-<li style="width:500px;"><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection">Beamtime Logbook</a></li>
-<li style="width:500px;"><a href="http://lxhadeb06/icinga">Icinga Server Monitoring</a>
-<li style="width:500px;"><a href="../munin">Munin Server Monitoring</a></li>
-<li style="width:500px;"><a href="archive">Archive of Hmon Windows (updated every 10 minutes)</a></li>
+<li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hlogbook2.form_selection">Beamtime Logbook</a></li>
+<li><a href="https://hades-db.gsi.de/pls/hades_webdbs/hades_oper.hshiftcrews2.form_select">Shift Crew</a></li>
+<li><a href="/mon/daqoperatornotes.pdf">DAQ Operator Notes</a>
+</div>
+
+<div class="linkbox" style="clear:both;width:730px;"><h4>Other Ressources</h4><ul>
+<li><a href="files/qa.htm">QA Plots (updated every 5 minutes)</a></li>
+<li><a href="files/vertex.htm">Vertex Plots (updated after each file)</a></li>
+<li><a href="../spillmon/?browser=no&monitoring=1000&layout=grid4x4&items=[%22EventBuilder/Run/HLD/HLD_HitsFast%22,%22EventBuilder/Run/HLD/HLD_HitsSlow%22,%22EventBuilder/Run/HLD/HLD_TrendX%22,%22EventBuilder/Run/HLD/HLD_TrendY%22,%22EventBuilder/Run/HLD/HLD_BeamX%22,%22EventBuilder/Run/HLD/HLD_BeamY%22,%22EventBuilder/Run/HLD/HLD_VETO_Patt%22,%22EventBuilder/Run/HLD/HLD_QSlow%22,%22EventBuilder/Run/HLD/HLD_HALO_Patt%22,%22EventBuilder/Run/HLD/HLD_XHALOSlow%22,%22EventBuilder/Run/HLD/HLD_YHALOSlow%22,%22EventBuilder/Run/HLD/HLD_LastSpill_Q_factor%22]">Beam Properties</a></li>
+<li><a href="http://lxhadeb06/icinga">Icinga Server Monitoring</a>
+<li><a href="../munin">Munin Server Monitoring</a></li>
+<li style="width:600px;"><a href="archive/?C=M;O=D">Archive of Hmon Windows (updated every 10 minutes)</a></li>
</ul></div>
<div class="linkbox" style="width:730px;"><h4>Operator Monitor - the "must-have" windows</h4><ul>
<li><a href="monitor.cgi?1-StartRateBars-StartBars-StartPosition-VetoHalo-ForwardQuartz">Beam Summary</a></li>
</ul></div>
-<div class="linkbox" style="float:left"><h4>ECal</h4><ul>
+<div class="linkbox" style="float:right"><h4>ECal</h4><ul>
<li><a href="monitor.cgi?1-window-ECalRate">Rate Summary for ECal</a></li>
<li><a href="ecal_drawing.htm#ecalrate_slow">Rate for ECal</a></li>
<li><a href="monitor.cgi?2-EcalHVVMap">ECAL HV Voltage Map</a></li>
<li><a href="monitor.cgi?2-EcalHVCMap">ECAL HV Current Map</a></li>
</ul></div>
+<div class="linkbox" style="float:left"><h4>RICH</h4><ul>
+<li><a target="_blank" href="rich_drawing_2.htm#richTemperature">Temperature</a></li>
+<li><a target="_blank" href="rich_drawing_bkpl.htm#richTemperatureBackplane">Temperature Backplane</a></li>
+<li><a target="_blank" href="rich_drawing_2.htm#rich1V">DiRich 1.1V</a></li>
+<li><a target="_blank" href="rich_drawing_2.htm#rich2V5">DiRich 2.5V</a></li>
+<li><a href="monitor.cgi?10-richvolt">Voltage & Current</a></li>
+<li><a href="monitor.cgi?2-window-RichHV">High Voltage</a></li>
+<li><a href="monitor.cgi?2-RichRatev2">Rates on all channels</a></li>
+<li><a target="_blank" href="rich_drawing_2.htm#custom-0xfe51-0xc001-0-30-0.03125-ratesum32">Mean rate per DiRICH</a></li>
+<li><a href="monitor.cgi?10-window-RichMagnet">Rich Inner Magnet fields</a></li>
+<li><a href="monitor.cgi?10-window-RichInnerTemp">Rich Inner Temperatures</a></li>
+<li><a href="monitor.cgi?10-window-RichGas">Rich Gas Information</a></li>
+</ul></div>
<div class="linkbox" style="float:right"><h4>MDC</h4><ul>
<li><a href="monitor.cgi?10-MDCRates-MDCBusy-MDCTemperature-MDCRetransmission-MDCTriggerError-MDCTokenMiss">MDC Overview</a></li>
</ul></div>
-<div class="linkbox" style="float:left"><h4>RICH</h4><ul>
-<li><a target="_blank" href="rich_drawing_2.htm#richTemperature">Temperature</a></li>
-<li><a target="_blank" href="rich_drawing_bkpl.htm#richTemperatureBackplane">Temperature Backplane</a></li>
-<li><a target="_blank" href="rich_drawing_2.htm#rich1V">DiRich 1.1V</a></li>
-<li><a target="_blank" href="rich_drawing_2.htm#rich2V5">DiRich 2.5V</a></li>
-<li><a href="monitor.cgi?10-richvolt">Voltage & Current</a></li>
-<li><a href="monitor.cgi?2-window-RichHV">High Voltage</a></li>
-<li><a href="monitor.cgi?2-RichRatev2">Rates on all channels</a></li>
-<li><a target="_blank" href="rich_drawing_2.htm#custom-0xfe51-0xc001-0-30-0.03125-ratesum32">Mean rate per DiRICH</a></li>
-<li><a href="monitor.cgi?10-window-RichMagnet">Rich Inner Magnet fields</a></li>
-<li><a href="monitor.cgi?10-window-RichInnerTemp">Rich Inner Temperatures</a></li>
-<li><a href="monitor.cgi?10-window-RichGas">Rich Gas Information</a></li>
-</ul></div>
<div class="linkbox" style="float:left"><h4>Eventbuilder</h4><ul>
<title>Hmon</title>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<link href="files/styles.css" rel="stylesheet" type="text/css"/>
+<link rel="alternate stylesheet" href="files/styles-lcars.css" type="text/css" title="LCARS"/>
</head>
<body >
<script type="text/javascript">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<!--<meta http-equiv="refresh" content="$.$delay.qq$"/> -->
<link href="files/styles.css" rel="stylesheet" type="text/css"/>
-<title>Hmon $.$ENV{'QUERY_STRING'}.qq$</title>
+<link rel="alternate stylesheet" href="files/styles-lcars.css" type="text/css" title="LCARS"/>
+<title>Hmon
+$.$ENV{'QUERY_STRING'}.qq$</title>
</head>
<body ><!--onmousedown="stoprefresh(0);" onmouseup="stoprefresh(0);" ondblclick="stoprefresh(0);"-->
<div class="button" style="width:45px;right:-8px;" onclick="askclose();"> close </div>
$out .= qq$<script language='javascript'>
var reloadevery = setTimeout('reload()',10);
var saveScrollTop = 0;
- var forcereloadbecauseofmemoryleak = setTimeout("location.reload()",1800000);
+ var forcereloadbecauseofmemoryleak = setTimeout("location.reload()",7200000);
blinkcnt = 0;
blinking = setInterval("blink()",490);
currentzoom = 1;
my $footer = "</div></body></html>";
+my $time;
while(1) {
my $filetype = get("http://lxhadeb07:8099/Master/BNET/RunPrefix/get.json?field=%22value%22");
- if ($filetype =~ /be/ || $filetype =~ /co/) {
+ if ($filetype =~ /be/ || $filetype =~ /co/ || ($ARGV[0] && $ARGV[0] eq 'once')) {
- my $time = strftime("%Y%m%d%H%M",localtime());
+ $time = strftime("%Y%m%d%H%M",localtime());
# my $time = "201204111356";
system("mkdir /home/hadaq/trbsoft/daq/hmon/archive/$time");
}
system("mv /home/hadaq/trbsoft/daq/hmon/archive/$time/*.htt /home/hadaq/trbsoft/daq/hmon/archive/$time/files/");
}
+ if( $ARGV[0] && $ARGV[0] eq 'once') {
+ print "A snapshot of all Hmon windows has been created in:\n";
+ print "http://hades33/mon/archive/$time\n";
+ print "lxhadesdaq:/trbsoft/daq/hmon/archive/$time\n";
+ exit;
+ }
sleep(590);
}
}
}
+ my $busy_counter = 0;
+ my $qa_overwrite = 0;
my $max = 0;
my $maxstr = "";
my $busystr = "";
my $color = Hmon::findcolor($busy||.001,0,100,0);
if ($irq > 80) {$color = '#f0f';}
$str .= sprintf("style=\"background-color:%4s;\">%2i",$color,$busy);
+ if ($busy > 80) {
+ $busy_counter++;
+ }
if($s>=0 && $s<5 && $max < $busy) {
+ # check if it is a known process
+ my $command = qq|ssh $srv[$s] 'export R=\$(pgrep -fx "dabc_exe hades.xml"); if [ -n \$R ]; then export R=1; fi; ps -h -o psr -p \$R'|;
+ #print "command: $command\n";
+ my $result = qx($command);
+ $result = "0" if (!defined $result);
+ ($result)= $result =~/^\s*(\d+)/;
+ #print "result: $result: cpu= $c\n";
+
+ if(!defined $result || $result == $c) {
+ $qa_overwrite++;
+ next;
+ }
+
+
$max = $busy;
$maxstr = sprintf("%d%%",$max);
$busystr = sprintf("Max. Load: %.1f%% on %s CPU %d (sys %.1f, wait %.1f, irq %.1f)",$max,$srv[$s],$c,$sys,$io,$irq);
}
-
+
if($c%32==31 && defined $store->{$s}->{$c+1}->{'idle'}) {
$str .= "<tr><th>";
- }
+ }
}
else {
#$str .= "<td>";
$str .= Hmon::MakeFooter();
Hmon::WriteFile("EBCPU",$str);
my $qastate = QA::GetQAState('below',$max,@QA::CPULimits);
+ if($busy_counter - $qa_overwrite > 0) {
+ $qastate = QA::OK;
+ }
QA::WriteQALog($fqa,"server","cpu",40,$qastate,"Max. CPU",$maxstr,$busystr);
- sleep 10;
+ sleep 10;
}
else {
sleep 1;
my $opt_debug = 0;
my $error_counter = 0;
my $persistent_error_state;
+my $speak_counter =0;
# sub cntbits32 {
# return (unpack('%32b*', pack('i',$_[0])));
my $url_cts_histo = $masterurl . '/BNET-IN-4/TRB8800_TdcCal/TRB_8800/TRB_8800_TrigType/get.json?field="bins"';
+my $url_master_state = $masterurl . 'Master/BNET/State/get.json?field="value"';
+
# my $eb_drate = get ($url_drate);
# die "Couldn't get $url_drate" unless defined $eb_drate;
#
#print Dumper $prefix;
$prefix = "--" unless defined $prefix;
-
+
+ my $masterstate ="";
+ $masterstate = get ($url_master_state);
+ $masterstate = " unknown " unless defined $masterstate;
+ $masterstate = substr $masterstate, 1, -1;
+
# print "----------- \nDEBUG: Run prefix:$prefix, datarate: $totalbytes kB/s, event rate: $totalrate Ev/s \n";
####################################################################################
} else {
$qamsg .= "Builder nodes: $num_bnetbuild. ";
}
-
+# if (defined $masterstate)
+# $qamsg .= "State - " . $masterstate;
# here check if some hub sources are not active:
my @notactivehubs = `$cmdchecksources`;
if($qastate == QA::ERROR) {
$error_counter++;
- if($error_counter <= 4) {
+ if($error_counter <= 6) {
$qastate = QA::OK;
$qamsg .= " error_counter: $error_counter ";
}
$totalrate,$ebavgrate,$totalrate/($num_act_build || $totalrate || 1));
}
+ $qamsg .= sprintf("<br> Run control -%s", $masterstate);
+
$qamsgdisc = "Discarded events: $totaldiscarded - ".$qamsgdisc;
my $qatitle = "#EB running";
$qatitle = "EB stopped" if ($num_bnetbuild == 0) ;
+ if (index($masterstate, 'Mismatch') != -1) {
+ $qatitle = "EB mismatch!";
+ $qastate = QA::ERROR;
+ }
if ($opt_debug<1) {
}
if ($totalbytes < 20 && $lasttotalbytes <20) {
$qastate = QA::WARN_2;
- Hmon::Speak('ebfiles', "Warning: event builders do not write files to disk. Please check.") unless $opt_debug>0;
- print "No files are written by eventbuilders.\n" unless $opt_debug<1;
+ $speak_counter++;
+ if($speak_counter>20)
+ {
+ $speak_counter=0;
+ Hmon::Speak('ebfiles', "Warning: event builders do not write files to disk. Please check.") unless $opt_debug>0 ||($masterstate =~ /NoNodes/);
+ print "No files are written by eventbuilders.\n" unless $opt_debug<1;
+ }
}
if ($trbneterr == 0) {
for (my $d=1;$d<=15;$d++) {
$str .= "<th>$d";
}
- for (my $n=5;$n<=10;$n++) {
+ for (my $n=5;$n<=12;$n++) {
my $hostn=sprintf("lxhadeb%02d", $n);
my @out = Hmon::qxtimeout("ssh $hostn \"df -h \"",10);
foreach my $a (@out) {
my $sources = {
-TRB_0x8800 => "CentralCTS",
-TRB_0x8400 =>"RPC123 ",
-TRB_0x8410 =>"RPC456 ",
-TRB_0x8600 =>"TOF ",
-TRB_0x8700 =>"FW ",
-TRB_0x8880 => "StartTRB3",
-TRB_0x8890 => "VetoTRB3",
-TRB_0x8900 => "Pion1 ",
-TRB_0x8910 => "Pion2 ",
-TRB_0x1000 => "MDC12sec1",
-TRB_0x1010 => "MDC12sec2",
-TRB_0x1020 => "MDC12sec3",
-TRB_0x1030 => "MDC12sec4",
-TRB_0x1040 => "MDC12sec5",
-TRB_0x1050 => "MDC12sec6",
-TRB_0x1100 => "MDC34sec1",
-TRB_0x1110 => "MDC34sec2",
-TRB_0x1120 => "MDC34sec3",
-TRB_0x1130 => "MDC34sec4",
-TRB_0x1140 => "MDC34sec5",
-TRB_0x1150 => "MDC34sec6",
-TRB_0x8a00 => "ECal0 ",
-TRB_0x8a01 => "ECal1 ",
-TRB_0x8a02 => "ECal2 ",
-TRB_0x8a03 => "ECal3 ",
-TRB_0x8a04 => "ECal4 ",
-TRB_0x8a05 => "ECal5 ",
-TRB_0x83c0 => "RICH0 ",
-TRB_0x83c1 => "RICH1 ",
-TRB_0x83c2 => "RICH2 ",
-TRB_0x83c3 => "RICH3 ",
-TRB_0x83c4 => "RICH4 ",
-TRB_0x83c5 => "RICH5 ",
-TRB_0x83c6 => "RICH6 ",
-TRB_0x83c7 => "RICH7 ",
-TRB_0x83c8 => "RICH8 ",
-TRB_0x83c9 => "RICH9 ",
-TRB_0x83ca => "RICHa ",
-TRB_0x83cb => "RICHb "
+TRB_8800 => "CentralCTS",
+TRB_8400 =>"RPC123 ",
+TRB_8410 =>"RPC456 ",
+TRB_8600 =>"TOF ",
+TRB_8700 =>"FW ",
+TRB_8880 => "StartTRB3",
+TRB_8890 => "VetoTRB3",
+TRB_8900 => "Pion1 ",
+TRB_8910 => "Pion2 ",
+TRB_1000 => "MDC12sec1",
+TRB_1010 => "MDC12sec2",
+TRB_1020 => "MDC12sec3",
+TRB_1030 => "MDC12sec4",
+TRB_1040 => "MDC12sec5",
+TRB_1050 => "MDC12sec6",
+TRB_1100 => "MDC34sec1",
+TRB_1110 => "MDC34sec2",
+TRB_1120 => "MDC34sec3",
+TRB_1130 => "MDC34sec4",
+TRB_1140 => "MDC34sec5",
+TRB_1150 => "MDC34sec6",
+TRB_8a00 => "ECal0 ",
+TRB_8a01 => "ECal1 ",
+TRB_8a02 => "ECal2 ",
+TRB_8a03 => "ECal3 ",
+TRB_8a04 => "ECal4 ",
+TRB_8a05 => "ECal5 ",
+TRB_83c0 => "RICH0 ",
+TRB_83c1 => "RICH1 ",
+TRB_83c2 => "RICH2 ",
+TRB_83c3 => "RICH3 ",
+TRB_83c4 => "RICH4 ",
+TRB_83c5 => "RICH5 ",
+TRB_83c6 => "RICH6 ",
+TRB_83c7 => "RICH7 ",
+TRB_83c8 => "RICH8 ",
+TRB_83c9 => "RICH9 ",
+TRB_83ca => "RICHa ",
+TRB_83cb => "RICHb "
};
+
my @bits = qw(OK Collision WordMissing ChecksumMismatch DontUnderstand BufferMismatch AnswerMissing 7 8 9 10 11 12 13 14 15 EventNumberMismatch TriggerCodeMismatch WrongLength AnswerMissing NotFound PartiallyMissing SevereProblem BrokenEvent EthernetLinkError SubEventBufferFull EthernetError TimingTriggerError 28 29 30 31);
$maxperc = $perc if $perc > $maxperc;
$sumperc += $perc;
my $ts = sprintf("%s has %i events (%.2f%%) with %s - ",
- $sources->{$k},
+ $sources->{$k},
+ # substr ($sources->{$k}, 1, -1),
$store->{$k}->{$b},
$perc,
$bits[$b]);
$longstring .= $ts;
$brokenevents += $store->{$k}->{$b};
}
- }
+ }
}
}
$value = sprintf("%s (%.1f%%)",QA::SciNotation($brokenevents), $sumperc);
-
\ No newline at end of file
+
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Time::HiRes qw( gettimeofday usleep time );
+use POSIX qw(strftime);
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
+use Hmon;
+use QA;
+use Perl2Epics;
+use HADES::TrbNet;
+use HPlot;
+
+my $flog = QA::OpenQAFile();
+my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd");
+
+
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCurr$i",
+# file => "files/EcalCurr$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - current",$i+1)],
+# xlabel => "Module number",
+# ylabel => "uA",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 1600,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVolt$i",
+# file => "files/EcalVolt$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - voltage",$i+1)],
+# xlabel => "Module number",
+# ylabel => "V",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 2500,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVMap$i",
+# file => "files/EcalVMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Voltage [V]",
+# titles => ["Voltage [V]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2500",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCMap$i",
+# file => "files/EcalCMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Current [uA]",
+# titles => ["Current [uA]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2000",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+
+my $timer=0;
+my $str = "";
+my $s="";
+
+#for(my $i = 1; $i <=6; $i++) {
+# for(my $j = 1; $j<=2; $j++) {
+# my $cnt = (($i-1)*2)+$j-1;
+# $s = sprintf("HAD:RPC:HV:S%i:L%i:imon",$i,$j);
+# Perl2Epics::Connect("I$cnt",$s);
+# $s = sprintf("HAD:RPC:HV:S%i:L%i:vmon",$i,$j);
+# Perl2Epics::Connect("U$cnt",$s);
+# }
+#}
+
+
+print "Connected.\n";
+
+#OVERCURRENT variables
+my $overcurrent_flag = 0;
+my $OVERCURRENT_YELLOW = 200;
+my $OVERCURRENT_RED = 300;
+
+my $OVERCURRENT_period = 3;
+my $overcurrent_alarm_flag = 0;
+my $current_average = 0;
+my $current_sum = 0;
+
+my $errortimer = 0;
+
+# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163);
+#
+# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
+#
+# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14);
+
+
+my @i_integrated=(0,0,0,0,0,0,0,0,0,0,0,0);
+my $ChnlsOn = 0;
+
+while(1) {
+ my $min_v = -1E5;
+ my $max_v = 1E5;
+ my $min_i = -1E5;
+ my $max_i = 1E5;
+ # my $data = Perl2Epics::GetAll();
+
+
+ # for(my $i = 0; $i <=5; $i++) {
+ # for(my $j = 0; $j<=1; $j++) {
+ # my $cnt = ($i*2)+$j;
+ # $i_integrated[$cnt]=$i_integrated[$cnt]+$data->{"I$cnt"}->{val};
+ # }
+ # }
+
+
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+# $str .= qq@<img src="%ADDPNG files/EcalCurr0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCurr", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+#
+# $str .= qq@<img src="%ADDPNG files/EcalVolt0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVolt", $str);
+#
+#
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVMap", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCMap", $str);
+
+ $timer++;
+
+ my $qastate = QA::NOTE;
+ my $value = sprintf("Work in progress");
+ my $longtext = sprintf("Work in progress");
+
+ #$qastate = QA::GetQAState('above', 12, @QA::RpcHvLimits);
+ #if ($ChnlsOn == 0){
+ #$qastate = QA::NOTE;}
+
+
+ $str = "";
+ if($timer%8 == 0) {
+ QA::WriteQALog($flog,"misc","fwhv",30,$qastate,"FWALL HV",$value,$longtext);
+
+
+ }
+
+
+
+# for (my $i = 0; $i <= 5;$i++){
+# if($i==1 or $i==2 or $i==4 or $i==5){
+# for (my $j = 0; $j<=167; $j++) {
+# my $cnt = ($i*168)+$j;
+# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,);
+# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,);
+# }
+#
+# for(my $j=254;$j>=0;$j--){
+# my $cnt =-1;
+# if($mod_tab[$j]!=0){
+# $cnt=($i*168)+$mod_tab[$j]-1;
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# if($mod_tab[$j]==0){
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# }
+#
+#
+# }
+# }
+#
+#
+# #print Dumper $data;
+# if($timer%8 == 0) {
+# for (my $i = 0; $i <= 5;$i++){
+# HPlot::PlotDraw("EcalCurr$i");
+# HPlot::PlotDraw("EcalVolt$i");
+# HPlot::PlotDraw("EcalVMap$i");
+# HPlot::PlotDraw("EcalCMap$i");
+# }
+# }
+ usleep(250000);
+ }
next if ($a =~ /opened connection to Data Mover/);
}
if ($a =~ m/(BNET)/) {
+ next;
next if ($a =~ /Start/);
next if ($a =~ /Application/);
next if ($a =~ /Set/);
+ next if ($a =~ /auto mode/);
next if ($a =~ /CTRL/);
next if ($a =~ /Ctrl/);
- next if ($a =~ /CONN\s/);
+ next if ($a =~ /CONN/);
+ next if ($a =~ /SIGPIPE/);
next if ($a =~ /flushing/);
next if ($a =~ /open/);
next if ($a =~ /base/);
next if ($a =~ /plugins/);
next if ($a =~ /Worker/);
next if ($a =~ /Create/i);
+ next if ($a =~ /tsm/i);
+ next if ($a =~ /RCVBUF/i);
next if ($a =~ /datamover/);
next if ($a =~ /Transmitter/);
next if ($a =~ /has closed file/);
next if ($a =~ /conne?cted LTSM/);
next if ($a =~ /connect retries/);
next if ($a =~ /HADAQ/);
+ next if ($a =~ /TDC/i);
+ next if ($a =~ /Combiner/i);
next if ($a =~ /DropAllInputBuffers/);
next if ($a =~ /Lost\sEvent\srate/);
next if ($a =~ /CLOSE FILE/);
'TC1238' => {'min' => 4.6 , 'max' =>4.9 },
'TC1248' => {'min' => 4.5 , 'max' =>4.7 },
'FI1400' => {'min' => 0.36 , 'max' =>0.49 },
- 'PSUI_rbk' => {'min' => 2495 , 'max' =>2497 },
+ 'PSUI_rbk' => {'min' => 3190 , 'max' =>3200 },
'PSUV_rbk' => {'min' => 0 , 'max' =>1 },
'BBI' => {'min' => 419 , 'max' =>450 },
'LL1708' => {'min' => 55.2 , 'max' =>63.0 },
while(1) {
my $fatal_error_string = "";
-
+ my $current = "OFF";
my $get_filename_command = "ssh -o BatchMode=yes magnet\@hadesp28 \"ls -rtl /home/magnet/Hades_Magnet_Labview/Log/log1 | tail -n 1\"";
my @get_filename_result = qx($get_filename_command);
#printf("$get_filename_result[0]");
$fatal_error_string = "Found entry '$name' which is not existing";
$red_error_counter = $old_red_error_counter + 1;
} else {
+ if($name eq 'PSUI_rbk') {
+ $current = $val;
+ }
+
+
$range_list_href->{$name}->{'value'} = $val;
if (defined $range_list_href->{$name}->{'max'} && $val > $range_list_href->{$name}->{'max'}) {
if ($yellow_error_counter>0) {
}
}
- if(!$magnet_on) {$fatal_error_string .= "-- MAGNET IS DEFINED TO BE OFF --"; $value = "OFF";}
+ if(!$magnet_on) {$fatal_error_string .= "-- MAGNET IS DEFINED TO BE OFF --"; $value = "$current";}
#print $fatal_error_string . "\n";
if ($fatal_error_counter>3) {
$fatal_error_string .= " (last good check at $last_good_time)";
# if($p>2) {
# $logString .= " ".$volt." ".$current." ";
# }
- if($current > 50.0) {
+ if($current > 90.0 || (!($p == 2 && $s == 4) & $current > 80.0) ) {
$spikeString .= "P$p S$s F/C $i: HV = ".$volt." , I = ".$current." - ".localtime()."\n";
$currenterr++;
}
}
}
- if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits[0]) {$qastate = max($qastate,QA::WARN);}
- if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits[1]) {$qastate = max($qastate,QA::WARN_2);}
- if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits[2]) {$qastate = max($qastate,QA::ERROR);}
- if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits[0]) {$qastate = max($qastate,QA::WARN);}
- if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits[1]) {$qastate = max($qastate,QA::WARN_2);}
- if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits[2]) {$qastate = max($qastate,QA::ERROR);}
+ if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits->[$p-1][0]) {$qastate = max($qastate,QA::WARN);}
+ if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits->[$p-1][1]) {$qastate = max($qastate,QA::WARN_2);}
+ if($mdcHvMax[$p] > $QA::MdcNominalHV[$p-1] + $QA::MdcHVOffsetLimits->[$p-1][2]) {$qastate = max($qastate,QA::ERROR);}
+ if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits->[$p-1][0]) {$qastate = max($qastate,QA::WARN);}
+ if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits->[$p-1][1]) {$qastate = max($qastate,QA::WARN_2);}
+ if($mdcHvMin[$p] < $QA::MdcNominalHV[$p-1] - $QA::MdcHVOffsetLimits->[$p-1][2]) {$qastate = max($qastate,QA::ERROR);}
}
$qastate = min($qastate,$QA::MdcHvOff?QA::NOTE:200);
- my $value = sprintf("%.1f/%.1f/%.1f/%.1f",$mdcHvMin[1]/1000.,$mdcHvMin[2]/1000.,$mdcHvMin[3]/1000.,$mdcHvMin[4]/1000.);
+ my $value =
+sprintf("%.1f/%.1f/%.1f/%.1f",$mdcHvMin[1]/1000.,$mdcHvMin[2]/1000.,$mdcHvMin[3]/1000.,$mdcHvMin[4]/1000.);
my $longtext = "MDC high voltage in all four planes".
"<br>Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4].
"<br>Maximum [V]: ".$mdcHvMax[1]." / ".$mdcHvMax[2]." / ".$mdcHvMax[3]." / ".$mdcHvMax[4].
"<br>Nominal [V]: ".$QA::MdcNominalHV[0]." / ".$QA::MdcNominalHV[1]." / ".$QA::MdcNominalHV[2]." / ".$QA::MdcNominalHV[3];
QA::WriteQALog($flog,"hv","mdchv",10,$qastate,"MDC HV",$value,$longtext);
-
+# print Dumper $QA::MdcHVOffsetLimits;
if($currenterr > 0 ) {
$currenterrtimer++;
my $presserr = 0;
my $presserrtimer = 0;
-
+HPlot::PlotInit({
+ name => "VacuumLow",
+ file => "files/VacuumLow",
+ entries => 1000,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["low vacuum [mbar]"],
+ xlabel => "Minutes",
+ ylabel => "",
+ sizex => 600,
+ sizey => 250,
+ ymin => "94",
+ ymax => "100",
+ curves => 1,
+ xscale => 6,
+ buffer => 1,
+ storable => 1,
+ });
+
+HPlot::PlotInit({
+ name => "VacuumHigh",
+ file => "files/VacuumHigh",
+ entries => 1000,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["high vacuum [1E-7 mbar]",],
+ xlabel => "Minutes",
+ ylabel => "",
+ ymin => "*<3",
+ ymax => "3.4<*",
+ sizex => 600,
+ sizey => 250,
+ curves => 1,
+ xscale => 6,
+ buffer => 1,
+ storable => 1,
+ });
+
+
my $plot = ();
$plot->{name} = "AtmosPress";
$plot->{file} = "files/AtmosPress";
$str .= qq@<img src="%ADDPNG files/MdcPressurePlane4.png%" type="image/png">@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("MdcPressurePlane4",$str);
+
+
+
my $timer = 0;
Perl2Epics::Connect("reflowPressureAthmaverage","HAD:MDC:GAS:reflowPressureAthm:average");
Perl2Epics::Connect("p1CO2","HAD:MDC:GAS:CO2:concentration:average");
Perl2Epics::Connect("p2CO2","HAD:MDC:GAS:CO2:concentration2:average");
+
+Perl2Epics::Connect("Vachigh","HAD:VAC:tpg366-1:ch1");
+Perl2Epics::Connect("Vaclow" ,"HAD:VAC:tpg366-1:ch2");
+
print "Connected.\n";
while(1) {
# Hmon::SendEmail('c.wendisch@gsi.de',"Warning: MDC Over-Pressure","Pressures in MDC are too high: \n$valstr");
}
}
+
+ HPlot::PlotAdd("VacuumLow",$data->{"Vaclow"}->{val},0);
+ HPlot::PlotAdd("VacuumHigh",$data->{"Vachigh"}->{val}*1E7,0);
+ HPlot::PlotDraw("VacuumLow");
+ HPlot::PlotDraw("VacuumHigh");
+
+ $str = Hmon::MakeTitle(8,12,"Vacuum",0);
+ $str .= qq@<img src="%ADDPNG files/VacuumHigh.png%" type="image/png">\n@;
+ $str .= qq@<img src="%ADDPNG files/VacuumLow.png%" type="image/png"><br>@;
+ $str .= sprintf("Low Vacuum %.2f mbar</br>",$data->{"Vaclow"}->{val});
+ $str .= sprintf("High Vacuum %.2fE-7 mbar",$data->{"Vachigh"}->{val}*1E7);
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("Vacuum",$str);
+
$timer++;
sleep(10);
}
<li><a href="qaplot_Physics.htm">Physics</a>
</ul></div>
<div class="linkbox">
- <ul><li><a href="../qa">All PDFs</a></ul>
+ <ul><li><a href="../qa/?C=M;O=D">All PDFs</a></ul>
$;
$out .= $foot;
storable => 1,
buffer => 1,
colors => ["#00ff00"],
- additional => "set offsets 0,0,0.25,0.05"
+ additional => "set offsets 0,0,0.05,0.05"
};
HPlot::PlotInit($plot);
storable => 1,
buffer => 1,
colors => ["#00ff00"],
- additional => "set offsets 0,0,0.25,0.05"
+ additional => "set offsets 0,0,30,30"
};
HPlot::PlotInit($plotO2);
storable => 1,
buffer => 1,
colors => ["#00ff00"],
- additional => "set offsets 0,0,0.25,0.05"
+ additional => "set offsets 0,0,0.15,0.05"
};
HPlot::PlotInit($plotRefR);
+my $plotScale = {
+ name => "RichIsobScale",
+ file => "files/RichIsobScale",
+ entries => 1200,
+ type => HPlot::TYPE_HISTORY,
+ output => HPlot::OUT_PNG,
+ titles => ["Isobutan Scales0","Isobutan Scale1"],
+ xlabel => "Hour",
+ ylabel => "bottle weight [kg]",
+ sizex => 400,
+ sizey => 180,
+ curves => 2,
+ xscale => 20,
+ storable => 1,
+ buffer => 1,
+ colors => ["#00ff00","#ff0000"],
+ additional => "set offsets 0,0,2.5,2.5"
+};
+HPlot::PlotInit($plotScale);
+
my $timer = 0;
my $str = "";
Perl2Epics::Connect("IsoO2Concentr","HAD:RICH:GAS:concentration:O2:average");
Perl2Epics::Connect("IsoRefRatio","HAD:RICH:GAS:reflowRatioIsob:average");
+Perl2Epics::Connect("IsoScale0","HAD:scale:1:net");
+Perl2Epics::Connect("IsoScale1","HAD:scale:2:net");
+
print "Connected.\n";
while(1) {
my $IsobPressStr = sprintf("Isobutan pressure: %.2f bar",$IsobPress);
my $IsobO2 = $data->{"IsoO2Concentr"}->{val};
- my $IsobO2Str = sprintf("O2 concentration: %.1f ppm",$IsobO2);
+ my $IsobO2Str = sprintf("O2 concentration: %.1f dppm",$IsobO2);
my $IsobRefR = $data->{"IsoRefRatio"}->{val};
my $IsobRefRStr = sprintf("Isobutan reflow ratio: %.1f %",$IsobRefR);
+
+ my $IsobScale0 = $data->{"IsoScale0"}->{val};
+ my $IsobScale1 = $data->{"IsoScale1"}->{val};
+
- $str = Hmon::MakeTitle(6, 12, "RICH Isobutan pressure", 1, "");
+ $str = Hmon::MakeTitle(6, 16, "RICH Isobutan", 1, "");
$str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 300px\">";
$str .= qq@<img src="%ADDPNG files/RichIsobPress.png%" type="image/png">\n@;
$str .= qq@<img src="%ADDPNG files/RichIsobO2.png%" type="image/png">\n@;
$str .= qq@<img src="%ADDPNG files/RichIsobRefR.png%" type="image/png">\n@;
+ $str .= qq@<img src="%ADDPNG files/RichIsobScale.png%" type="image/png">\n@;
$str .= Hmon::MakeFooter();
Hmon::WriteFile("RichGas", $str);
my $longtext = "";
$qastate = QA::OK if ($IsobPress <= 2.0 && $IsobPress >= 0.9);
- $qastate = QA::WARN_2 if (($IsobPress < 0.9) || ($IsobO2 > 500.0) || ($IsobRefR < 70.0));
- $qastate = QA::ERROR_2 if (($IsobPress > 2.0) || ($IsobPress < 0.7) || ($IsobO2 > 800.0) || ($IsobRefR
-< 50.0));
+ $qastate = QA::WARN_2 if (($IsobPress < 0.9) || ($IsobO2 >3000.0) || ($IsobRefR < 70.0));
+ $qastate = QA::ERROR_2 if (($IsobPress > 2.0) || ($IsobPress < 0.7) || ($IsobO2 > 8000.0) || ($IsobRefR < 50.0));
if( $timer % 4 == 0) {
$value = sprintf("%.1f|%.0f|%.0f",$IsobPress,$IsobO2,$IsobRefR);
- $longtext = sprintf("isobutan pressure near Gassystem: %.2f bar <br/> O2 concentration: %.0f
-ppm <br/> Isobutanreflow ratio: %.2f",$IsobPress,$IsobO2,$IsobRefR);
+ $longtext = sprintf("isobutan pressure : %.2f bar | O2 concentration: %.1f ppm <br>|Isobutanoutput ratio: %.2f | Scales: %.1fkg / %.1fkg",$IsobPress,$IsobO2,$IsobRefR,$IsobScale0,$IsobScale1);
QA::WriteQALog($flog,"rich","isob",30,$qastate,"Gas",$value,$longtext);
}
HPlot::PlotAdd('RichIsobRefR',$IsobRefR,0);
HPlot::PlotDraw('RichIsobRefR');
+
+# HPlot::PlotAdd('RichIsobScale',50.6,0);
+# HPlot::PlotAdd('RichIsobScale',$IsobRefR,0);
+
+ }
+
+ if ( $timer % 240 == 0) {
+ HPlot::PlotAdd('RichIsobScale',$IsobScale0,0);
+ HPlot::PlotAdd('RichIsobScale',$IsobScale1,1);
+ HPlot::PlotDraw('RichIsobScale');
}
sleep 1;
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Time::HiRes qw( gettimeofday usleep time );
+use POSIX qw(strftime);
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
+use Hmon;
+use QA;
+use Perl2Epics;
+use HADES::TrbNet;
+use HPlot;
+
+my $flog = QA::OpenQAFile();
+my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd");
+
+
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCurr$i",
+# file => "files/EcalCurr$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - current",$i+1)],
+# xlabel => "Module number",
+# ylabel => "uA",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 1600,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVolt$i",
+# file => "files/EcalVolt$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - voltage",$i+1)],
+# xlabel => "Module number",
+# ylabel => "V",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 2500,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVMap$i",
+# file => "files/EcalVMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Voltage [V]",
+# titles => ["Voltage [V]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2500",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCMap$i",
+# file => "files/EcalCMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Current [uA]",
+# titles => ["Current [uA]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2000",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+
+my $timer=0;
+my $str = "";
+my $s="";
+
+for(my $i = 1; $i <=6; $i++) {
+ for(my $j = 1; $j<=2; $j++) {
+ my $cnt = (($i-1)*2)+$j-1;
+ $s = sprintf("HAD:RPC:HV:S%i:L%i:imon",$i,$j);
+ Perl2Epics::Connect("I$cnt",$s);
+ $s = sprintf("HAD:RPC:HV:S%i:L%i:vmon",$i,$j);
+ Perl2Epics::Connect("U$cnt",$s);
+ }
+}
+
+
+print "Connected.\n";
+
+#OVERCURRENT variables
+my $overcurrent_flag = 0;
+my $OVERCURRENT_YELLOW = 200;
+my $OVERCURRENT_RED = 300;
+
+my $OVERCURRENT_period = 3;
+my $overcurrent_alarm_flag = 0;
+my $current_average = 0;
+my $current_sum = 0;
+
+my $errortimer = 0;
+
+# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163);
+#
+# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
+#
+# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14);
+
+
+my @i_integrated=(0,0,0,0,0,0,0,0,0,0,0,0);
+my $ChnlsOn = 0;
+my $cnt;
+
+while(1) {
+ my $min_v = -1E5;
+ my $max_v = 1E5;
+ my $min_i = -1E5;
+ my $max_i = 1E5;
+ my $data = Perl2Epics::GetAll();
+
+ $ChnlsOn=0;
+ for(my $i = 0; $i <=5; $i++) {
+ for(my $j = 0; $j<=1; $j++) {
+ $cnt = ($i*2)+$j;
+ if ($data->{"U$cnt"}->{val}>=5490){$ChnlsOn++;}
+
+ }
+ }
+
+
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+# $str .= qq@<img src="%ADDPNG files/EcalCurr0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCurr", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+#
+# $str .= qq@<img src="%ADDPNG files/EcalVolt0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVolt", $str);
+#
+#
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVMap", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCMap", $str);
+ my $qastate = QA::OK;
+ my $value = sprintf("%i/12",$ChnlsOn);
+ my $longtext = sprintf("HV channels On: %i/12",$ChnlsOn);
+
+ $qastate = QA::GetQAState('above', $ChnlsOn, @QA::RpcHvLimits);
+ if ($ChnlsOn == 0){
+ $qastate = QA::NOTE;}
+
+$timer++;
+
+ $str = "";
+ if($timer%8 == 0) {
+
+ if ($ChnlsOn>0 and $ChnlsOn<12) {
+ for(my $i = 1; $i <=6; $i++) {
+ for(my $j = 1; $j<=2; $j++) {
+ $cnt = (($i-1)*2)+$j-1;
+ if($data->{"U$cnt"}->{val}<5490){
+ if ($j==1){
+ $str .= sprintf("Low voltage on front plane, sector %i.<br>",$i);
+ }
+ else{
+ $str .= sprintf("Low voltage on back plane, sector %i.<br>",$i);
+ }
+
+ }
+
+ if($data->{"U$cnt"}->{val}<10){
+ if ($j==1){
+ $str .= sprintf("Front plane, sector %i is switched off. Check!<br>",$i);
+ }
+ else{
+ $str .= sprintf("Back plane, sector %i is switched off. Check!<br>",$i);
+ }
+ }
+ }
+ }
+# $value = sprintf("%i/652",$ChnlsOn);
+ $longtext = sprintf("HV channels On: %i/12<br>Check the current and voltage monitoring plots!<br>%s",$ChnlsOn,$str);
+ }
+ elsif($ChnlsOn==0) {
+ $value = sprintf("HV is OFF");
+ $longtext = sprintf("HV is OFF");
+ }
+ QA::WriteQALog($flog,"misc","rpchv",30,$qastate,"RPC HV",$value,$longtext);
+
+ }
+
+
+# for (my $i = 0; $i <= 5;$i++){
+# if($i==1 or $i==2 or $i==4 or $i==5){
+# for (my $j = 0; $j<=167; $j++) {
+# my $cnt = ($i*168)+$j;
+# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,);
+# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,);
+# }
+#
+# for(my $j=254;$j>=0;$j--){
+# my $cnt =-1;
+# if($mod_tab[$j]!=0){
+# $cnt=($i*168)+$mod_tab[$j]-1;
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# if($mod_tab[$j]==0){
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# }
+#
+#
+# }
+# }
+#
+#
+# #print Dumper $data;
+# if($timer%8 == 0) {
+# for (my $i = 0; $i <= 5;$i++){
+# HPlot::PlotDraw("EcalCurr$i");
+# HPlot::PlotDraw("EcalVolt$i");
+# HPlot::PlotDraw("EcalVMap$i");
+# HPlot::PlotDraw("EcalCMap$i");
+# }
+# }
+ usleep(250000);
+ }
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Time::HiRes qw( gettimeofday usleep time );
+use POSIX qw(strftime);
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
+use Hmon;
+use QA;
+use Perl2Epics;
+use HADES::TrbNet;
+use HPlot;
+
+my $flog = QA::OpenQAFile();
+
+my $timer=0;
+my $store;
+
+Perl2Epics::Connect("StartV","HAD:DIAMOND:HV:START:positive:vmon");
+Perl2Epics::Connect("VetoV" ,"HAD:DIAMOND:HV:VETO:negative:vmon" );
+Perl2Epics::Connect("StartI","HAD:DIAMOND:HV:START:positive:imon");
+Perl2Epics::Connect("VetoI" ,"HAD:DIAMOND:HV:VETO:negative:imon" );
+print "Connected.\n";
+
+
+
+
+
+while(1) {
+
+ my $data = Perl2Epics::GetAll();
+# print Dumper $data;
+# print($data->{"StartI"}->{val}." ".$data->{"StartV"}->{val}." ".$data->{"VetoI"}->{val}." ".$data->{"VetoV"}->{val}."\n");
+ push(@{$store->{si}},$data->{"StartI"}->{val});
+ push(@{$store->{vi}},$data->{"VetoI"}->{val});
+ shift(@{$store->{si}}) if scalar @{$store->{si}} > 30;
+ shift(@{$store->{vi}}) if scalar @{$store->{vi}} > 30;
+
+ if($timer++ % 10 == 0) {
+
+ my $sv = $data->{"StartV"}->{val};
+ my $vv = $data->{"VetoV"}->{val};
+ my $simin = min(@{$store->{si}});
+ my $simax = max(@{$store->{si}});
+ my $vimin = min(@{$store->{vi}});
+ my $vimax = max(@{$store->{vi}});
+
+ my $str = Hmon::MakeTitle(2, 3, "Start HV", 1, "");
+
+ $str .= "<table><col style=\"width:50px\"><col style=\"width:80px\"><tr><th>Start V<td>".QA::SciNotation($sv)." V";
+ $str .= "<tr><th>Start I<td>".ceil($simin*1000).' - '.ceil($simax*1000)." nA";
+ $str .= "<tr><th>Veto V<td>".QA::SciNotation($vv)." V";
+ $str .= "<tr><th>Veto I<td>".ceil($vimin*1000).' - '.ceil($vimax*1000)." nA";
+
+ $str .= Hmon::MakeFooter();
+ Hmon::WriteFile("StartHV", $str);
+ }
+
+
+ sleep(1);
+ }
--- /dev/null
+#!/usr/bin/perl -w
+use strict;
+use warnings;
+use Time::HiRes qw( gettimeofday usleep time );
+use POSIX qw(strftime);
+use FileHandle;
+use Data::Dumper;
+use POSIX qw/floor ceil/;
+use List::Util qw/min max/;
+use Hmon;
+use QA;
+use Perl2Epics;
+use HADES::TrbNet;
+use HPlot;
+
+my $flog = QA::OpenQAFile();
+my @colors = ("#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd");
+
+
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCurr$i",
+# file => "files/EcalCurr$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - current",$i+1)],
+# xlabel => "Module number",
+# ylabel => "uA",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 1600,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVolt$i",
+# file => "files/EcalVolt$i",
+# entries => 168,
+# type => HPlot::TYPE_BARGRAPH,
+# output => HPlot::OUT_PNG,
+# titles => [sprintf("Sector %i - voltage",$i+1)],
+# xlabel => "Module number",
+# ylabel => "V",
+# sizex => 430,
+# sizey => 190,
+# xmin => 0,
+# xmax => 168,
+# ymin => 0,
+# ymax => 2500,
+# curves => 1,
+# countup => 1,
+# xscale => 1,
+# nokey => 0,
+# buffer => 1,
+# bargap => 0.4,
+# curvewidth => 1,});
+# }
+#
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalVMap$i",
+# file => "files/EcalVMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Voltage [V]",
+# titles => ["Voltage [V]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2500",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+# for my $i (0..5) {
+# HPlot::PlotInit( {
+# name => "EcalCMap$i",
+# file => "files/EcalCMap$i",
+# title => "",
+# entries => 17,
+# curves => 15,
+# type => HPlot::TYPE_HEATMAP,
+# output => HPlot::OUT_PNG,
+# zlabel => "Current [uA]",
+# titles => ["Current [uA]"],
+# sizex => 255,
+# sizey => 200,
+# nokey => 0,
+# buffer => 1,
+# xmin => -0.5,
+# xmax => 16.5,
+# ymin => -0.5,
+# ymax => 14.5,
+# cbmax => "1.1<*<2000",
+# cbmin => "0.1<*<0.9",
+# noinit => 0,
+# showvalues => 0, });
+# }
+#
+
+
+my $timer = 0;
+my $str = "";
+my $s="";
+
+for(my $i = 1; $i <=6; $i++) {
+ for(my $j = 1; $j<=8; $j++) {
+ for(my $k = 0; $k<=7; $k++) {
+ for(my $l = 1; $l<=2; $l++) {
+ my $cnt = (($i-1)*8*8*2)+(($j-1)*8*2)+(2*$k)+($l-1);
+ if ($l==1) {
+ $s = sprintf("HAD:TOFHV:S%i:M%i:%iL:imon",$i,$j,($k+1));
+ }
+ else {
+ $s = sprintf("HAD:TOFHV:S%i:M%i:%iR:imon",$i,$j,($k+1));
+ }
+ Perl2Epics::Connect("I$cnt",$s);
+ if ($l==1) {
+ $s = sprintf("HAD:TOFHV:S%i:M%i:%iL:vmon",$i,$j,($k+1));
+ }
+ else {
+ $s = sprintf("HAD:TOFHV:S%i:M%i:%iR:vmon",$i,$j,($k+1));
+ }
+ Perl2Epics::Connect("U$cnt",$s);
+ }
+ }
+ }
+}
+
+
+print "Connected.\n";
+
+#OVERCURRENT variables
+my $overcurrent_flag = 0;
+my $OVERCURRENT_YELLOW = 200;
+my $OVERCURRENT_RED = 300;
+
+my $OVERCURRENT_period = 3;
+my $overcurrent_alarm_flag = 0;
+my $current_average = 0;
+my $current_sum = 0;
+
+my $errortimer = 0;
+
+# my @mod_tab=(0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 12, 13, 14, 15, 16, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 19, 20, 21, 22, 23, 24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 30, 31, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 34, 35, 36, 37, 38, 39, 40, 41, 42, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 46, 47, 48, 49, 50, 51, 0, 0, 0, 0, 0, 0, 0, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 0, 0, 0, 0, 0, 0, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 0, 0, 0, 0, 0, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 0, 0, 0, 0, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 0, 0, 0, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 0, 0, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 0, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163);
+#
+# my @x_tab=(10, 9, 8, 7, 6, 10, 9, 8, 7, 6, 11, 10, 9, 8, 7, 6, 5, 11, 10, 9, 8, 7, 6, 5, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 12, 11, 10, 9, 8, 7, 6, 5, 4, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
+#
+# my @y_tab=(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14);
+
+
+
+
+while(1) {
+ my $min_v = -1E5;
+ my $max_v = 1E5;
+ my $min_i = -1E5;
+ my $max_i = 1E5;
+ my $ChnlsOn = 0;
+ my $data = Perl2Epics::GetAll();
+
+ for(my $i = 1; $i <=6; $i++) {
+ for(my $j = 1; $j<=8; $j++) {
+ for(my $k = 0; $k<=7; $k++) {
+ for(my $l = 1; $l<=2; $l++) {
+ my $cnt = (($i-1)*8*8*2)+(($j-1)*8*2)+(2*$k)+($l-1);
+ if (abs($data->{"U$cnt"}->{val})>=950 and $data->{"I$cnt"}->{val}>=400.0) {$ChnlsOn++;}
+ }
+ }
+ }
+ }
+
+
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Current", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+# $str .= qq@<img src="%ADDPNG files/EcalCurr0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalCurr3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCurr", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(11, 18, "ECAL HV - Voltage", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n";
+#
+#
+# $str .= qq@<img src="%ADDPNG files/EcalVolt0.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt5.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt1.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt4.png%" type="image/png">\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt2.png%" type="image/png"><br>\n@;
+# $str .= qq@<img src="%ADDPNG files/EcalVolt3.png%" type="image/png"><br>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVolt", $str);
+#
+#
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Voltage Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalVMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVVMap", $str);
+#
+#
+#
+# $str = Hmon::MakeTitle(10, 13, "ECAL HV - Current Map", 1, "");
+# $str .= "<link rel=\"stylesheet\" type=\"text/css\" href=\"files/styles.css\">";
+#
+# $str .= "<div style=\"text-align:left; margin-top: 10px; width: 200px\">";
+#
+# if ($ChnlsOn == 0) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\" title=\"channels off\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels off (";
+# } elsif ($ChnlsOn < 652 and $ChnlsOn >= 642) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: orange;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn < 642) {
+# $str .= "<div><div class=\"redbutton\" style=\"float:left;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } elsif ($ChnlsOn > 652) {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left; background-color: #ffcc00;\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# } else {
+# $str .= "<div><div class=\"greenbutton\" style=\"float:left\"></div><p style=\"text-align:left;position: relative; left: 10px;top: 6px;\"> Channels on (";
+# }
+# $str .= "$ChnlsOn";
+# $str .= "/652)</p></div>";
+#
+# $str .= "</div>\n\n<table>\n<tr><td>Sector 1</td>\n<td>Sector 2</td>\n<td>Sector 3</td>\n</tr>\n<tr>";
+#
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap0.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap1.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap2.png%" type="image/png"></td>\n</tr>\n@;
+#
+# $str .= "<tr><td>Sector 4</td>\n<td>Sector 5</td>\n<td>Sector 6</td>\n</tr>\n<tr>\n";
+#
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap3.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap4.png%" type="image/png"></td>\n@;
+# $str .= qq@<td><img src="%ADDPNG files/EcalCMap5.png%" type="image/png"></td>\n</tr>\n</table>\n@;
+#
+#
+# $str .= Hmon::MakeFooter();
+# $str .= "</body>";
+# $str .= "</html>";
+# Hmon::WriteFile("EcalHVCMap", $str);
+
+
+ $timer++;
+
+
+ my $qastate = QA::OK;
+ my $value = sprintf("%i/768",$ChnlsOn);
+ my $longtext = sprintf("HV channels On: %i/768",$ChnlsOn);
+
+ $qastate = QA::GetQAState('above', $ChnlsOn, @QA::TofHvLimits);
+if ($ChnlsOn == 0){
+ $qastate = QA::NOTE;}
+
+ $str = "";
+ if($timer%8 == 0) {
+ if ($ChnlsOn>0 and $ChnlsOn<768) {
+ for(my $i = 1; $i <=6; $i++) {
+ for(my $j = 1; $j<=8; $j++) {
+ for(my $k = 0; $k<=7; $k++) {
+ for(my $l = 1; $l<=2; $l++) {
+ my $cnt = (($i-1)*8*8*2)+(($j-1)*8*2)+(2*$k)+($l-1);
+
+ if($data->{"U$cnt"}->{val}<950 and $data->{"I$cnt"}->{val}>=400){
+ if ($l==1){
+ $str .= sprintf("Low voltage(%i V) on sector %i, module %i, rod %i, left side.<br>",abs($data->{"U$cnt"}->{val}),$i,$j,$k+1);
+ }
+ else{
+ $str .= sprintf("Low voltage(%i V) on sector %i, module %i, rod %i, right side.<br>",abs($data->{"U$cnt"}->{val}),$i,$j,$k+1);
+ }
+ }
+ if($data->{"I$cnt"}->{val}<400.0 and $data->{"U$cnt"}->{val}>=950){
+ if ($l==1){
+ $str .= sprintf("Low current(%i uA) on sector %i, module %i, rod %i, left side.<br>",abs($data->{"I$cnt"}->{val}),$i,$j,$k+1);
+ }
+ else{
+ $str .= sprintf("Low current(%i uA) on sector %i, module %i, rod %i, right side.<br>",abs($data->{"I$cnt"}->{val}),$i,$j,$k+1);
+ }
+ }
+ if($data->{"U$cnt"}->{val}<10 and $data->{"I$cnt"}->{val}<1){
+ if ($l==1){
+ $str .= sprintf("PMT on sector %i, module %i, rod %i, left side is switched off.<br>",$i,$j,$k+1);
+ }
+ else{
+ $str .= sprintf("PMT on sector %i, module %i, rod %i, right side is switched off..<br>",$i,$j,$k+1);
+ }
+ }
+
+ }
+ }
+ }
+ }
+ $value = sprintf("%i/768",$ChnlsOn);
+ $longtext = sprintf("HV channels On: %i/768<br>%s",$ChnlsOn,$str);
+ }
+ elsif($ChnlsOn==0) {
+ $value = sprintf("HV is OFF");
+ $longtext = sprintf("HV is OFF");
+ }
+ QA::WriteQALog($flog,"misc","tofhv",30,$qastate,"TOF HV",$value,$longtext);
+ }
+
+
+# for (my $i = 0; $i <= 5;$i++){
+# if($i==1 or $i==2 or $i==4 or $i==5){
+# for (my $j = 0; $j<=167; $j++) {
+# my $cnt = ($i*168)+$j;
+# HPlot::PlotAdd("EcalCurr$i",$data->{"I$cnt"}->{val}||-1,);
+# HPlot::PlotAdd("EcalVolt$i",$data->{"U$cnt"}->{val}||-1,);
+# }
+#
+# for(my $j=254;$j>=0;$j--){
+# my $cnt =-1;
+# if($mod_tab[$j]!=0){
+# $cnt=($i*168)+$mod_tab[$j]-1;
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||-1,$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# if($mod_tab[$j]==0){
+# HPlot::PlotAdd("EcalVMap$i",$data->{"U$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# HPlot::PlotAdd("EcalCMap$i",$data->{"I$cnt"}->{val}||'NaN',$y_tab[$j],$x_tab[$mod_tab[$j]-1]);
+# }
+# }
+#
+#
+# }
+# }
+#
+#
+# #print Dumper $data;
+# if($timer%8 == 0) {
+# for (my $i = 0; $i <= 5;$i++){
+# HPlot::PlotDraw("EcalCurr$i");
+# HPlot::PlotDraw("EcalVolt$i");
+# HPlot::PlotDraw("EcalVMap$i");
+# HPlot::PlotDraw("EcalCMap$i");
+# }
+# }
+
+ usleep(250000);
+ }
--- /dev/null
+body {
+ font-family:sans-serif;
+ background:#346;/*#def;*/
+ margin:0px;
+ border:0px;
+ text-align:left;
+ font-size:12px;
+ }
+
+body>div>div {
+ float:left;
+ margin: 0px 8px 0px 0;
+ padding: 0 0 0 0 ;
+ border: 1px solid #777;
+ border-width:0 1px 1px 1px;
+ text-align:center;
+ /*box-shadow:1px 1px 4px 4px #eee;/*, inset 3px 3px 3px 3px #eee, inset -3px -3px 3px 3px #eee;*/
+ border-radius: 5px 5px 5px 5px;
+ background:#fff;
+ overflow-y:hidden;
+
+}
+
+div#content {
+ background:transparent !important;
+/* transition: opacity .5s; */
+}
+
+div.timestamp {
+ font-size:11px;
+ color:#888;
+ width: 70px;
+ height:15px;
+ margin:-3px -70px -15px 0;
+ padding:0 0 0 0;
+ border:none;
+ border-top:3px solid #eee;
+ border-radius:0;
+ text-align:center;
+ overflow:hidden;
+}
+
+div.button {
+ position:absolute;
+ top:0px;
+ height:16px;
+ margin: 0px 8px 8px 0;
+ padding: 0 0 0 0 ;
+ cursor:pointer;
+ font-size:12px;
+ color:#aaa;
+ border: 1px solid #777;
+ border-width:0 1px 1px 1px;
+ border-radius:0 20px 20px 0px;
+ text-align:center;
+ background:#444;
+ overflow:hidden;
+ z-index:10;
+}
+
+div.errorstamp {
+ font-size:11px;
+ color:red;
+ font-weight:bold;
+ width: 70px;
+ height:15px;
+ margin:-3px -70px -15px 0;
+ padding:0 0 0 0;
+ border:none;
+ border-top:3px solid #eee;
+ border-radius:0;
+ text-align:center;
+ overflow:hidden;
+}
+
+
+div#content {
+ -moz-transform-origin:0 0;
+ -moz-transform:scale(1);
+}
+
+div#contentback {
+ z-index : -1;
+ position:absolute;
+}
+
+
+/*
+ //plus 24 in width, plus 29 in height for each size step.
+ //base is 70x40, 80x50 with border
+ */
+div.width1 {width:70px;}
+div.width2 {width:150px;}
+div.width3 {width:230px;}
+div.width4 {width:310px;}
+div.width5 {width:390px;}
+div.width6 {width:470px;}
+div.width7 {width:550px;}
+div.width8 {width:630px;}
+div.width9 {width:710px;}
+div.width10 {width:790px;}
+div.width11 {width:870px;}
+div.width12 {width:950px;}
+div.width13 {width:1030px;}
+div.width14 {width:1110px;}
+div.width15 {width:1190px;}
+div.width16 {width:1270px;}
+div.width17 {width:1350px;}
+div.width18 {width:1430px;}
+div.width19 {width:1510px;}
+div.width20 {width:1590px;}
+
+div.height1 {height:40px;}
+div.height2 {height:90px;}
+div.height3 {height:140px;}
+div.height4 {height:190px;}
+div.height5 {height:240px;}
+div.height6 {height:290px;}
+div.height7 {height:340px;}
+div.height8 {height:390px;}
+div.height9 {height:440px;}
+div.height10{height:490px;}
+div.height11{height:540px;}
+div.height12{height:590px;}
+div.height13{height:640px;}
+div.height14{height:690px;}
+div.height15{height:740px;}
+div.height16{height:790px;}
+div.height17{height:840px;}
+div.height18{height:890px;}
+div.height19{height:940px;}
+div.height20{height:990px;}
+div.height21{height:1040px;}
+div.height22{height:1090px;}
+div.height23{height:1140px;}
+div.height24{height:1190px;}
+div.height25{height:1240px;}
+div.height26{height:1290px;}
+
+
+body>div h3{
+ background:#444;
+ padding:0 0 2px 0;
+ margin: 0 0 0 0;
+ color:#eee;
+ border-radius: 5px 5px 0px 0px;
+ font-size: 13px;
+ cursor:default;
+ }
+
+
+
+table {
+ margin:0;
+ padding:0;
+ }
+
+
+.textbox, #logbox {
+ margin:auto;
+ background:white;
+ font-family: monospace;
+ text-align:left;
+ overflow-y:scroll;
+ }
+
+.height9 .textbox { height:420px; }
+.height6 .textbox { height:270px; }
+.height11 .textbox { height:520px; }
+
+table.rates{
+ border-collapse:collapse;
+ margin:0px 5px 0px 5px;
+ font-size:13px;
+ }
+
+table.rates th {
+ padding:0px 5px;
+}
+
+
+table.rates td{
+}
+
+table.rates th+th, table.rates td+th{
+ font-weight:bold;
+ width:90px;
+ border-bottom:1px solid black;
+ border-left: 1px solid black;
+ }
+
+table.rates th+td, table.rates td+td {
+ border-left:1px solid black;
+ padding-right:20px;
+ text-align:right;
+ }
+
+table.rates td.on {
+ color:#000;
+ background:#dfd;
+
+ }
+
+table.rates td.off {
+ color:#000;
+ background:#fdd;
+}
+
+table.rates .linebelow {
+ border-bottom:1px solid black;
+ }
+
+
+table.mdc td.ctr{
+ background-position: 50% 50%;
+ background-image: url('../mdc.png');
+ background-repeat: no-repeat;
+ }
+
+table.mdc, table.scale, table.colorfields {
+ font-family:monospace;
+ border-collapse:collapse;
+ margin:0px 10px;
+ display:inline-block;
+ }
+
+table.mdc tr {
+ height:12px;
+ max-height:12px;
+ }
+
+table.mdc td, table.scale td{
+ width: 11px;
+ height: 13px;
+ max-height:12px !important;
+ overflow:hidden;
+ margin: 0;
+ padding: 0px 0 0px 0;
+ color:white;
+ font-size: 8px;
+ border:1px solid white;
+ text-align:center;
+ }
+
+table.mdc td.ctr {
+ font-size:12px;
+ color:black;
+ }
+
+
+table.scale {
+ display:block;
+ margin: 10px auto 0 auto;
+ }
+
+table.scale td {
+ width:13px;
+ }
+
+table.scale td.label {
+ color:black;
+ width:40px;
+ font-size:10px;
+ text-align:right;
+ }
+
+table.scale td+td+.label {
+ text-align:left;
+ }
+
+
+table.colorfields tr{
+ height:20px;
+ color:black;
+
+ }
+
+table.colorfields td {
+ width:25px;
+ font-size:13px;
+ border:2px solid white;
+ cursor:default;
+ }
+
+table.cpu td{
+ width:16px;
+ font-size:10px;
+ border-width:1px;
+ }
+
+table.cpu tr {
+ height:18px;
+ }
+
+table.colorfields th.title {
+/* width:80px; */
+ margin:0 10px 0 0;
+ padding:0;
+ text-align:right;
+}
+
+table.logfile tr>td {
+ width:150px;
+ vertical-align:top;
+}
+
+table.logfile td+td {
+ width:100px;
+}
+
+table.logfile td+td+td {
+ width:1000px;
+ font-family:monospace;
+
+}
+
+table.logfile {
+ width:100%;
+ font-size:12px;
+ font-family:sans-serif;
+ border-collapse:collapse;
+ text-align:left;
+}
+
+table.logfile tr {
+ margin:0;
+ padding:0;
+}
+
+table.hubmon {
+ border-collapse:collapse;
+ border:hidden;
+ background:#222;
+ color:white;
+ font-size:11px;
+ width:100%;
+ height:100%;
+ }
+
+table.hubmon td{
+ border-right:1px solid black;
+ border-left:1px solid black;
+ padding:0 15px 0 10px;
+ vertical-align:top;
+ }
+
+.rd {background-color:#f00; color:black;}
+.rdn {color:#f00;}
+.gr {color:#3d3;}
+.or {color:#fa0;}
+
+.mg {
+ background-color:magenta;
+ color:black;
+}
+
+.wh {
+ color:#ddd;
+}
+
+.bl {
+ color:lightblue;
+}
+
+svg {
+ overflow:hidden;
+ margin:-17px 0px 0px 0;
+ border:0;
+ padding:10px 0 10px 0;
+}
+
+.QA {
+ background:#333;
+ height:100%;
+ width:100%;
+ overflow:hidden;
+
+}
+
+.QA .header {
+ width: 27px;
+ height:25px;
+ border-radius: 0;
+ -moz-transform: rotate(-90deg);
+ margin:12px -6px 0 6px;
+ font-size:10px;
+ padding:0;
+ border:0;
+ color:white;
+ box-shadow:none;
+}
+
+.QA div::first-line {
+ color: rgba(0,0,0,0.1);
+}
+
+.QA div{
+ text-align:right;
+ width: 95px;
+ height: 35px;
+ padding:2px 5px 0 0;
+ margin:3px 0 0 3px;
+ overflow:hidden;
+ font-size:12px;
+ line-height:1.3;
+ border:0px solid #000;
+ border-collapse:collapse;
+ float:left;
+ border-radius:2px 20px 20px 2px;
+ font-family:FifthLeg;
+ position:relative;
+ color:black;
+ cursor:default;
+/* box-shadow:inset 0px 0px 1px 1px #000; */
+}
+
+.QA div:hover{
+/* border-bottom:0.5px solid white; */
+ box-shadow:inset 0px -1px 1px 1px #fff;
+ }
+
+
+.blinkon .brdb {
+ background:#f00;
+ color:#000;
+ box-shadow: 0px 0px 3px 3px #f31;
+ z-index:5;
+ }
+
+.blinkoff .brdb {
+ background:#000;
+ color:#f33;
+ }
+
+
+.QA .stamp {
+ color:#aaa;
+ font-size:6px;
+ position:absolute;
+ top:2px;
+ right:0px;
+}
+
+.QA .footer {
+ margin:0;
+/* position:absolute; */
+/* left:0; */
+/* bottom:0; */
+ border:none;
+ border-top:1px solid #aaa;
+ border-radius:0;
+ margin-top:10px;
+ color:white;
+ width:100%;
+ height:100px;
+ font-size:13px;
+ box-shadow:none !important;
+ clear:both;
+}
+
+
+.greenbutton, .redbutton {
+ width: 20px;
+ height:20px;
+ border-radius:10px;
+ margin:5px 0px 5px 30px;
+}
+
+.greenbutton {
+ background:green;
+}
+
+.redbutton {
+ background:red;
+}
+
+table.status td {
+ text-align:center;
+}
+
+table.status th {
+ min-width:60px;
+ padding-top:5px;
+}
+
+/*.ebinputs {
+ text-align:left;
+ cursor:pointer;
+}
+
+.ebinputs div{
+ width:30px;
+ font-size:10px;
+ text-align:center;
+ height:18px;
+ display:inline-block;
+ background:#ccc;
+ margin:2px;
+ padding:0;
+ padding-top:5px;
+ }*/
+
+table.eb th {
+ background:#ccc;
+}
+
+table.eb td {
+ background:#fff;
+}
+
+div.flex {
+ display: flex;
+ width:100%;
+ }
+div.flex div {
+ flex: 1 1 auto;
+ }
+div.flex table {
+ background:#ccc;
+}
+
+
+.bgn {background:#f8da56 !important;}
+.byg {background:#ebe69e !important;}
+.bye {background:#96a1fd !important;}
+.bor {background:#fa0 !important;}
+.brd {background:#fe0000 !important;}
+.bgr {background:#000;color:#aaa !important;}
+.bwh {background:#eee !important;}
+.bmg {background:#f0a !important;}
+
0x83ca 1 0x83ca 1 1
0x83cb 1 0x83cb 1 1
- 0x8400 1 0x8400 1 0
- 0x8410 1 0x8410 1 0
+ 0x8400 1 0x8400 1 1
+ 0x8410 1 0x8410 1 1
# 0x8420 1 0x8420 1 0
0x8600 1 0x8600 1 0
0x8700 1 0x8700 1 0
-register_configgbe_ip_newservers.db
\ No newline at end of file
+register_configgbe_ip_newservers_secondgbe.db
\ No newline at end of file
0x8410 1 RPC456 mid
0x8600 1 TOF low
0x8700 1 FW low
-0x8880 0 StartTRB3 low
+0x8880 1 StartTRB3 low
#0x8890 0 VetoTRB3 low5t
#0x8900 0 Pion1 mid
#0x8910 0 Pion2 mid
0x8a03 1 ECal3 mid
0x8a04 1 ECal4 mid
0x8a05 1 ECal5 mid
-0x83c0 0 RICH0 mid
-0x83c1 0 RICH1 mid
-0x83c2 0 RICH2 mid
-0x83c3 0 RICH3 mid
-0x83c4 0 RICH4 mid
-0x83c5 0 RICH5 mid
-0x83c6 0 RICH6 mid
-0x83c7 0 RICH7 mid
-0x83c8 0 RICH8 mid
-0x83c9 0 RICH9 mid
-0x83ca 0 RICHa mid
-0x83cb 0 RICHb mid
+0x83c0 1 RICH0 mid
+0x83c1 1 RICH1 mid
+0x83c2 1 RICH2 mid
+0x83c3 1 RICH3 mid
+0x83c4 1 RICH4 mid
+0x83c5 1 RICH5 mid
+0x83c6 1 RICH6 mid
+0x83c7 1 RICH7 mid
+0x83c8 1 RICH8 mid
+0x83c9 1 RICH9 mid
+0x83ca 1 RICHa mid
+0x83cb 1 RICHb mid
}
}
}
-
+ print "Please reboot OEP!\n" if ($oldCompileTime);
&askUser() if ($oldCompileTime);
}
# print $host." ".Time::HiRes::time()."\n" ;
my $p = Net::Ping->new();
- if ( $p->ping( $host, 1 ) ) {
+ if ( $p->ping( $host, 2 ) ) {
$retval = "$host:alive";
}
else {
- $retval = "$host:dead";
- return $retval;
+ if ( $p->ping( $host, 2 ) ) {
+ $retval = "$host:alive";
+ }
+ else {
+ $retval = "$host:dead";
+ return $retval;
+ }
+
}
$p->close();
# print $host." ".Time::HiRes::time()."\n" ;
#Jan 06.01.12
my $sock = new IO::Socket::INET(
- PeerAddr => $host,
- PeerPort => $cmd_server_port,
- Proto => 'tcp'
- );
- $retval = "$host:cmdserverdead" unless $sock;
+ PeerAddr => $host,
+ PeerPort => $cmd_server_port,
+ Proto => 'tcp'
+ );
+ if ($sock) {
+ $retval = "$host:alive";
+ close($sock) if ( defined $sock );
+ }
+ else {
+ close($sock) if ( defined $sock );
+ $sock = new IO::Socket::INET(
+ PeerAddr => $host,
+ PeerPort => $cmd_server_port,
+ Proto => 'tcp'
+ );
+ if ($sock) {
+ $retval = "$host:alive";
+ close($sock) if ( defined $sock );
+ }
+ else {
+ $retval = "$host:cmdserverdead";
+ }
+ }
+
close($sock) if ( defined $sock );
#Jan 06.01.12
notifyall.sh "DAQ" "<I> DAQ is going to be restarted." "STARTUP" &
-#Stop monitoring scripts
- echo " <Logger> Killing log-scripts"
- ssh hadesp33 "cd /home/hadaq/trbsoft/hadesdaq/hmon; ./stop.sh" &
- ssh hadesp33 "killall -USR1 speakdaemon.pl" &
- ssh hadesp33 "killall mdc_calibration_masks.pl" &
-
+if [ -z $1 ]
+then
+ #Stop monitoring scripts
+ echo " <Logger> Killing log-scripts"
+ ssh hadesp33 "cd /home/hadaq/trbsoft/hadesdaq/hmon; ./stop.sh" &
+ ssh hadesp50 "killall -USR1 speakdaemon.pl" 2>/dev/null &
+ ssh hadesp33 "killall -USR1 speakdaemon.pl" 2>/dev/null &
+ ssh hadesp33 "killall mdc_calibration_masks.pl" 2>/dev/null &
+fi
#Stop Eventbuilder
# echo " <EB> Killing EB, scheduling restart";
# JAM 23-01-2019: get last run prefix from bnet master:
if [ ! -f "/tmp/EB_prefix.txt" ]
then
-/usr/bin/wget -a /tmp/EB_restart.log -O /tmp/EB_prefix.txt "http://lxhadeb07:8099/Master/BNET/RunPrefix/value/get.json"
+/usr/bin/wget -a /tmp/EB_restart.log -O /tmp/EB_prefix.txt "http://lxhadeb07:8099/Master/BNET/RunPrefix/value/get.json"
fi
prefix="$(/bin/cat /tmp/EB_prefix.txt)"
-echo " <EB> DAQ restart: Found previous prefix $prefix";
+echo " <EB> DAQ restart: Found previous prefix $prefix";
-echo " <EB> DAQ restart: Closing file run";
-/usr/bin/wget -a /tmp/EB_restart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/StopRun/execute"
+echo " <EB> DAQ restart: Closing file run";
+/usr/bin/wget -a /tmp/EB_restart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/StopRun/execute" &
#echo " <EB> DAQ restart: Resetting Eventbuilder buffers...";
#/usr/bin/wget -a /tmp/EB_restart.log -O /tmp/EB_fileres.txt "http://lxhadeb07:8099/Master/BNET/ResetDAQ/execute"
-
-
+
export DAQOPSERVER=hadesp31
- echo " <TrbNet> Pexor clean-up..."
+ #echo " <TrbNet> Pexor clean-up..."
#set DMA transfer size, flush buffers, reset DMA core"
- ssh hadesp31 "pkill -USR1 trbnetd 2>/dev/null; killall trbcmd 2>/dev/null; trbcmdlocal W 0x703 0x20; trbcmdlocal f 3; trbcmdlocal W 0x702 2;"
+
+ #-USR1
+ ssh hadesp31 "pkill trbnetd 2>/dev/null; killall trbcmd 2>/dev/null; trbcmdlocal W 0x703 0x20; trbcmdlocal f 3; trbcmdlocal W 0x702 2;"
+
echo " <TrbNet> Doing Reset..."
- ssh hadesp31 "tryreset.pl; pkill -USR2 trbnetd"
- ssh hadesp31 "pgrep trbnetd 1>/dev/null || trbnetd"
+ #ssh hadesp31 "tryreset.pl; pkill -USR2 trbnetd"
+ ssh hadesp31 "tryreset.pl"
+ ssh hadesp31 "cd /home/hadaq/trbnettools/bin/; LD_LIBRARY_PATH=../libtrbnet/ trbnetd";
+# ssh hadesp31 "pgrep trbnetd 1>/dev/null || trbnetd"
echo " <TrbNet> Enable ports..."
trbcmd w 0xfffe 0xc5 0x4000
#switchport.pl 0x1124 4 off #222a # noisy
#MBO init failures, switch off for testing all others otherwise DAQ crasehs. MBO will be repaired the next weeks
#switchport.pl 0x1001 7 off #2044
-#switchport.pl 0x1024 2 off #2059
+#
+ # enabled again: 2019-2-26 14:14
+ #### switchport.pl 0x1101 4 off #2203
+switchport.pl 0x1024 7 off #2057, 19/03/12
+
#Retransmission on as early as possible
trbcmd setbit 0xfffd 0x22 0x08000000 #enable retransmission on oep
trbcmd setbit 0xfe11 0x22 0x08000000 #enable retransmission on mdchub
+ #/home/hadaq/trbsoft/hadesdaq/rich/retransmission.sh 2>/dev/null
#Main Start-up
echo " <Startup> Running Startup script"
-m STARTCTS -m NORESET -m CONFIGONLY -m MON_CTS \
-m MDC -m MDCreg0current -m MDCnomasks -m MDCDATASET -m MDCindiv
+ echo "startup.pl finished"
+
+# /home/hadaq/trbsoft/daq/nettools/revivedirich.pl
+
+# time ./startup.pl -f main_hades.script -eb off -o file \
+# -m TOF -m RPC -m WALL -m RICH -m NOPION -m NOECAL\
+# -m STARTCTS -m NORESET -m CONFIGONLY -m MON_CTS \
+# -m MDC -m MDCreg0current -m MDCnomasks -m MDCDATASET -m MDCindiv
########################################
### DO NOT CHANGE ANY MDC SETTINGS HERE - without changing them in reviveoep.pl as well!!!!!!
########################################
+# reduce maximum number of events in a multievent-queue
+#trbcmd w 0xffff 0x830e 4
#All calib to EB1
#trbcmd w 0x0003 0xa0f3 0xff1
rm /tmp/EB_prefix.txt
- #Start-up finished
- notifyall.sh "DAQ" "<N> DAQ has been started." "STARTUP" &
- echo " <Startup> Configuration finished!"
+#Start-up finished
+notifyall.sh "DAQ" "<N> DAQ has been started." "STARTUP" &
+echo " <Startup> Configuration finished!"
+
+#/home/hadaq/trbsoft/hadesdaq/rich/retransmission.sh 2>/dev/null &
+
+if [ -z $1 ]
+then
+ #Start Monitoring
+ echo " <Startup> Restart Monitoring"
+ # /home/hadaq/jan/crashlog.pl #Log timeouts after restart
+ nohup ssh hadesp33 "cd /home/hadaq/trbsoft/hadesdaq/hmon; ./start.sh &" </dev/null &>/dev/null &
+ nohup ssh hadesp33 "/home/hadaq/trbsoft/daq/utils/mdc_calibration_masks.pl" &>/dev/null &
+ nohup ssh hadesp50 "sleep 20; killall -USR2 speakdaemon.pl" &>/dev/null &
+ nohup ssh hadesp33 "sleep 20; killall -USR2 speakdaemon.pl" &>/dev/null &
+ echo " <Startup> Everything done. Closing window automatically after 10 seconds."
+ sleep 10;
+fi
-
-#Start Monitoring
- echo " <Startup> Restart Monitoring"
-# /home/hadaq/jan/crashlog.pl #Log timeouts after restart
- nohup ssh hadesp33 "cd /home/hadaq/trbsoft/hadesdaq/hmon; ./start.sh &" </dev/null &>/dev/null &
- nohup ssh hadesp33 "/home/hadaq/trbsoft/daq/utils/mdc_calibration_masks.pl" &>/dev/null &
- nohup ssh hadesp33 "sleep 20; killall -USR2 speakdaemon.pl" &>/dev/null &
- echo " <Startup> Everything done. Closing window automatically after 10 seconds."
- sleep 10;
#disown
0x202c 236 1 12 0
0x202d 249 1 12 0
###################################################
-0x2030 256 1 12 0 # 443 -> 013 2012012 // 013 -> 256 20120315
+0x2030 189 1 12 0 # 29.1.2019 256 (unstable) --> 189 // 443 -> 013 2012012 // 013 -> 256 20120315
0x2031 230 1 12 0
-0x2032 327 1 12 0
+0x2032 190 1 12 0 # 29.1.2019 327 (unstable) --> 190 //
0x2033 324 1 12 0
0x2034 206 1 12 0
0x2035 497 1 12 0
-0x2036 289 1 12 0 # 289 20110713 017 just "place holder", not existing! 20111215 467
+0x2036 191 1 12 0 # 29.1.2019 289 (unstable) --> 191 // 289 20110713 017 just "place holder", not existing! 20111215 467
0x2037 240 1 12 0
0x2038 153 1 12 0
0x2039 445 1 12 0
0x2231 282 1 12 0 ## exchange 1 and 8 (201010)
0x2232 288 1 12 0
0x2233 192 1 12 0 ## 1.8.2017 exchange with OEP of 0x224c (old one was OEP#379)
-0x2234 176 1 12 0
+0x2234 176 1 12 0
0x2235 152 1 12 0
0x2236 300 1 12 0
0x2237 284 1 12 0
%hublist = (
+ '4403' => {
+ '7' => 8761,
+ '5' => 8763,
+ '6' => 8762,
+ '8' => 8760,
+ '1' => 8767,
+ '2' => 8766,
+ '4' => 8764,
+ '3' => 8765
+ },
+ '4176' => {
+ '0' => 4177,
+ '1' => 4178,
+ '2' => 4179,
+ '3' => 4180
+ },
+ '33321' => {
+ '5' => 30098,
+ '7' => 30323,
+ '1' => 30067,
+ '6' => 30099,
+ '3' => 30082,
+ '12' => 30355,
+ '11' => 30354,
+ '9' => 30338,
+ '10' => 30339,
+ '2' => 30066,
+ '8' => 30322,
+ '4' => 30083
+ },
+ '32790' => {
+ '0' => 4352,
+ '1' => 4368,
+ '2' => 4384,
+ '4' => 4416,
+ '5' => 4432,
+ '3' => 4400
+ },
+ '33736' => {
+ '4' => 33416,
+ '0' => 33385,
+ '2' => 33386,
+ '1' => 33384,
+ '6' => 33417,
+ '5' => 33401,
+ '3' => 33368
+ },
+ '4416' => {
+ '2' => 4419,
+ '1' => 4418,
+ '0' => 4417,
+ '3' => 4420
+ },
+ '33401' => {
+ '5' => 29844,
+ '7' => 29557,
+ '1' => 29813,
+ '6' => 29845,
+ '3' => 29828,
+ '12' => 29589,
+ '11' => 29588,
+ '9' => 29572,
+ '4' => 29829,
+ '2' => 29812,
+ '8' => 29556,
+ '10' => 29573
+ },
+ '33734' => {
+ '3' => 33410,
+ '5' => 33426,
+ '6' => 33379,
+ '2' => 33362,
+ '0' => 33364,
+ '1' => 33378
+ },
'4434' => {
- '8' => 8794,
'3' => 8799,
- '4' => 8795,
- '2' => 8793,
'5' => 8796,
'7' => 8798,
+ '4' => 8795,
+ '2' => 8793,
+ '8' => 8794,
'1' => 8792,
'6' => 8797
},
- '33304' => {
- '9' => 30819,
- '7' => 30562,
- '1' => 30578,
- '2' => 30579,
- '10' => 30818,
- '4' => 30834,
- '3' => 30835,
- '8' => 30563
+ '33376' => {
+ '4' => 29367,
+ '2' => 29110,
+ '10' => 29351,
+ '8' => 29094,
+ '9' => 29350,
+ '11' => 29606,
+ '6' => 29623,
+ '1' => 29111,
+ '7' => 29095,
+ '5' => 29622,
+ '12' => 29607,
+ '3' => 29366
},
- '4132' => {
- '4' => 8283,
- '6' => 8285,
- '3' => 8282,
- '1' => 8280,
- '5' => 8284,
- '2' => 8281
- },
- '4402' => {
- '2' => 9014,
- '5' => 9011,
- '1' => 9015,
- '7' => 9009,
- '6' => 9010,
- '8' => 9008,
- '3' => 9013,
- '4' => 9012
- },
- '33425' => {
- '10' => 30823,
- '9' => 30822,
- '7' => 30567,
- '1' => 30583,
- '2' => 30582,
- '8' => 30566,
- '3' => 30838,
- '4' => 30839
+ '33353' => {
+ '5' => 29074,
+ '7' => 29299,
+ '1' => 29043,
+ '6' => 29075,
+ '3' => 29058,
+ '12' => 29331,
+ '11' => 29330,
+ '9' => 29314,
+ '4' => 29059,
+ '8' => 29298,
+ '10' => 29315,
+ '2' => 29042
},
- '4401' => {
- '7' => 9017,
- '1' => 9023,
- '6' => 9018,
- '2' => 9022,
- '5' => 9019,
- '8' => 9016,
- '3' => 9021,
- '4' => 9020
+ '33314' => {
+ '7' => 29792,
+ '5' => 30289,
+ '6' => 30288,
+ '1' => 29776,
+ '3' => 30033,
+ '12' => 30304,
+ '9' => 30049,
+ '11' => 30305,
+ '4' => 30032,
+ '2' => 29777,
+ '10' => 30048,
+ '8' => 29793
+ },
+ '4179' => {
+ '3' => 8530,
+ '7' => 8470,
+ '5' => 8532,
+ '6' => 8533,
+ '1' => 8529,
+ '2' => 8528,
+ '8' => 8471,
+ '4' => 8531
},
- '33384' => {
- '6' => 29525,
- '1' => 29013,
- '12' => 29541,
- '7' => 29029,
- '9' => 29284,
- '5' => 29524,
- '2' => 29012,
- '11' => 29540,
- '10' => 29285,
- '4' => 29269,
- '3' => 29268,
- '8' => 29028
+ '32792' => {
+ '3' => 33731,
+ '5' => 33739,
+ '4' => 33732,
+ '0' => 33733,
+ '2' => 33735,
+ '1' => 33734,
+ '6' => 34944
},
- '4352' => {
- '3' => 4356,
- '1' => 4354,
- '2' => 4355,
- '0' => 4353
+ '4400' => {
+ '3' => 4404,
+ '1' => 4402,
+ '2' => 4403,
+ '0' => 4401
},
- '4180' => {
- '5' => 8476,
- '2' => 8473,
- '6' => 8477,
- '4' => 8475,
- '3' => 8474,
- '7' => 8478,
- '8' => 8479
+ '33316' => {
+ '6' => 30224,
+ '4' => 29968,
+ '1' => 29712,
+ '10' => 29984,
+ '2' => 29713,
+ '8' => 29729,
+ '7' => 29728,
+ '9' => 29985,
+ '11' => 30241,
+ '5' => 30225,
+ '12' => 30240,
+ '3' => 29969
+ },
+ '4435' => {
+ '2' => 9041,
+ '8' => 9047,
+ '1' => 9040,
+ '4' => 9043,
+ '6' => 9045,
+ '5' => 9044,
+ '7' => 9046,
+ '3' => 9042
},
- '33285' => {
- '10' => 31490,
- '1' => 31233,
- '7' => 31489,
- '9' => 31491,
- '2' => 31232,
- '8' => 31488,
- '4' => 31234,
- '3' => 31235
+ '33431' => {
+ '11' => 31060,
+ '9' => 30804,
+ '8' => 30548,
+ '2' => 30532,
+ '10' => 30805,
+ '4' => 30789,
+ '3' => 30788,
+ '12' => 31061,
+ '5' => 31044,
+ '7' => 30549,
+ '1' => 30533,
+ '6' => 31045
},
- '33792' => {
- '2' => 33793
+ '33393' => {
+ '3' => 29575,
+ '12' => 29846,
+ '7' => 29814,
+ '5' => 29591,
+ '6' => 29590,
+ '1' => 29558,
+ '11' => 29847,
+ '9' => 29831,
+ '8' => 29815,
+ '2' => 29559,
+ '10' => 29830,
+ '4' => 29574
},
+ '4370' => {
+ '5' => 8979,
+ '7' => 8977,
+ '4' => 8981,
+ '8' => 8976,
+ '1' => 8983,
+ '2' => 8982,
+ '6' => 8978,
+ '3' => 8980
+ },
'4419' => {
- '8' => 8775,
'3' => 8770,
- '4' => 8771,
- '2' => 8769,
- '5' => 8772,
'7' => 8774,
+ '5' => 8772,
+ '6' => 8773,
'1' => 8768,
- '6' => 8773
+ '8' => 8775,
+ '2' => 8769,
+ '4' => 8771
},
- '4420' => {
- '3' => 8778,
- '4' => 8779,
- '8' => 8783,
- '2' => 8777,
- '5' => 8780,
- '7' => 8782,
- '1' => 8776,
- '6' => 8781
+ '4387' => {
+ '3' => 8750,
+ '7' => 8739,
+ '5' => 8741,
+ '6' => 8740,
+ '8' => 8738,
+ '1' => 8748,
+ '2' => 8749,
+ '4' => 8751
},
- '4355' => {
- '8' => 8967,
- '3' => 8962,
- '4' => 8963,
- '1' => 8960,
- '7' => 8966,
- '6' => 8965,
- '2' => 8961,
- '5' => 8964
+ '4162' => {
+ '3' => 8250,
+ '1' => 8248,
+ '8' => 8472,
+ '2' => 8249,
+ '4' => 8251,
+ '6' => 8253,
+ '5' => 8252
},
- '4177' => {
- '6' => 8517,
- '7' => 8518,
- '1' => 8512,
- '5' => 8516,
- '2' => 8513,
- '4' => 8515,
- '3' => 8514,
- '8' => 8519
+ '4436' => {
+ '4' => 9051,
+ '1' => 9048,
+ '2' => 9049,
+ '8' => 9055,
+ '6' => 9053,
+ '5' => 9052,
+ '7' => 9054,
+ '3' => 9050
},
- '33414' => {
- '11' => 30244,
- '10' => 29989,
- '6' => 30229,
- '12' => 30245,
- '7' => 29733,
- '9' => 29988,
- '1' => 29717,
- '5' => 30228,
- '2' => 29716,
- '8' => 29732,
- '4' => 29973,
- '3' => 29972
- },
- '4147' => {
- '8' => 8231,
- '3' => 8225,
- '4' => 8227,
- '2' => 8224,
- '5' => 8228,
- '7' => 8230,
- '1' => 8235,
- '6' => 8229
+ '4417' => {
+ '3' => 9026,
+ '2' => 9025,
+ '1' => 9024,
+ '8' => 9031,
+ '4' => 9027,
+ '6' => 9029,
+ '5' => 9028,
+ '7' => 9030
},
- '32786' => {
- '2' => 33792,
- '1' => 34304,
- '3' => 33808,
- '0' => 34560
+ '33329' => {
+ '8' => 29553,
+ '10' => 29568,
+ '2' => 29809,
+ '4' => 29824,
+ '11' => 29585,
+ '9' => 29569,
+ '1' => 29808,
+ '6' => 29840,
+ '5' => 29841,
+ '7' => 29552,
+ '12' => 29584,
+ '3' => 29825
},
- '33432' => {
- '10' => 30837,
- '2' => 30564,
- '1' => 30565,
- '9' => 30836,
- '7' => 30581,
- '8' => 30580,
- '3' => 30820,
- '4' => 30821
+ '33428' => {
+ '4' => 30743,
+ '2' => 30486,
+ '8' => 30470,
+ '10' => 30727,
+ '9' => 30726,
+ '11' => 30982,
+ '12' => 30983,
+ '3' => 30742,
+ '1' => 30487,
+ '6' => 30999,
+ '5' => 30998,
+ '7' => 30471
+ },
+ '33354' => {
+ '2' => 29107,
+ '8' => 29091,
+ '10' => 29346,
+ '4' => 29362,
+ '9' => 29347,
+ '11' => 29603,
+ '12' => 29602,
+ '3' => 29363,
+ '6' => 29618,
+ '1' => 29106,
+ '7' => 29090,
+ '5' => 29619
},
+ '4098' => {
+ '1' => 8264,
+ '2' => 8262,
+ '4' => 8268,
+ '6' => 8266,
+ '5' => 8267,
+ '3' => 8269,
+ '7' => 8247
+ },
'33299' => {
- '4' => 30752,
- '3' => 30753,
'8' => 30513,
- '6' => 31008,
+ '10' => 30768,
+ '2' => 30497,
+ '4' => 30752,
+ '11' => 31025,
'9' => 30769,
- '1' => 30496,
- '7' => 30512,
'12' => 31024,
+ '3' => 30753,
+ '1' => 30496,
+ '6' => 31008,
'5' => 31009,
- '2' => 30497,
- '11' => 31025,
- '10' => 30768
+ '7' => 30512
},
- '33735' => {
- '0' => 33301,
- '4' => 33317,
- '1' => 33286,
- '3' => 33318,
- '5' => 33302,
- '2' => 33303
+ '33733' => {
+ '0' => 33376,
+ '1' => 33409,
+ '6' => 33425,
+ '5' => 33377,
+ '3' => 33393
},
- '33732' => {
- '5' => 33427,
- '2' => 33444,
- '4' => 33429,
- '6' => 33411,
- '3' => 33412,
- '0' => 33428
+ '4384' => {
+ '3' => 4388,
+ '1' => 4386,
+ '0' => 4385,
+ '2' => 4387
+ },
+ '33366' => {
+ '4' => 28709,
+ '8' => 28690,
+ '2' => 28692,
+ '1' => 28693,
+ '10' => 28707,
+ '6' => 28725,
+ '5' => 28724,
+ '7' => 28691,
+ '9' => 28706,
+ '11' => 28722,
+ '12' => 28723,
+ '3' => 28708
},
- '33401' => {
- '8' => 29556,
- '3' => 29828,
- '4' => 29829,
- '11' => 29588,
- '10' => 29573,
- '12' => 29589,
- '7' => 29557,
- '9' => 29572,
- '1' => 29813,
- '6' => 29845,
- '2' => 29812,
- '5' => 29844
+ '33364' => {
+ '11' => 28727,
+ '9' => 28711,
+ '10' => 28710,
+ '2' => 28689,
+ '8' => 28695,
+ '4' => 28704,
+ '3' => 28705,
+ '12' => 28726,
+ '7' => 28694,
+ '5' => 28721,
+ '6' => 28720,
+ '1' => 28688
},
- '33337' => {
- '4' => 29571,
- '3' => 29570,
- '8' => 29810,
- '5' => 29586,
- '2' => 29554,
- '6' => 29587,
- '1' => 29555,
- '12' => 29843,
- '7' => 29811,
- '9' => 29826,
- '10' => 29827,
- '11' => 29842
+ '33409' => {
+ '5' => 30103,
+ '7' => 30326,
+ '9' => 30343,
+ '11' => 30359,
+ '4' => 30086,
+ '10' => 30342,
+ '8' => 30327,
+ '1' => 30070,
+ '2' => 30071,
+ '6' => 30102,
+ '3' => 30087,
+ '12' => 30358
},
- '33329' => {
- '10' => 29568,
- '11' => 29585,
- '5' => 29841,
- '2' => 29809,
- '6' => 29840,
- '1' => 29808,
- '9' => 29569,
- '7' => 29552,
- '12' => 29584,
- '8' => 29553,
- '4' => 29824,
- '3' => 29825
+ '33417' => {
+ '3' => 30340,
+ '12' => 30101,
+ '11' => 30100,
+ '9' => 30084,
+ '7' => 30069,
+ '5' => 30356,
+ '6' => 30357,
+ '1' => 30325,
+ '10' => 30085,
+ '2' => 30324,
+ '8' => 30068,
+ '4' => 30341
},
- '4176' => {
- '0' => 4177,
- '1' => 4178,
- '3' => 4180,
- '2' => 4179
+ '34561' => {
+ '3' => 17440,
+ '2' => 17424,
+ '1' => 17408
+ },
+ '4180' => {
+ '5' => 8476,
+ '3' => 8474,
+ '7' => 8478,
+ '8' => 8479,
+ '2' => 8473,
+ '4' => 8475,
+ '6' => 8477
},
- '33379' => {
- '12' => 29495,
- '7' => 28983,
- '9' => 29238,
- '1' => 28999,
- '6' => 29511,
- '2' => 28998,
- '5' => 29510,
- '11' => 29494,
- '10' => 29239,
- '3' => 29254,
- '4' => 29255,
- '8' => 28982
+ '33410' => {
+ '10' => 30039,
+ '2' => 29798,
+ '8' => 29782,
+ '4' => 30055,
+ '11' => 30294,
+ '9' => 30038,
+ '6' => 30311,
+ '1' => 29799,
+ '7' => 29783,
+ '5' => 30310,
+ '12' => 30295,
+ '3' => 30054
},
- '33445' => {
- '10' => 31494,
- '7' => 31492,
- '9' => 31495,
- '1' => 31236,
- '2' => 31237,
- '8' => 31493,
- '3' => 31239,
- '4' => 31238
- },
- '33431' => {
- '4' => 30789,
- '3' => 30788,
- '8' => 30548,
- '6' => 31045,
- '12' => 31061,
- '9' => 30804,
- '1' => 30533,
- '7' => 30549,
- '5' => 31044,
- '2' => 30532,
- '11' => 31060,
- '10' => 30805
- },
- '33319' => {
- '3' => 30019,
- '4' => 30018,
- '8' => 29747,
- '2' => 29763,
- '5' => 30275,
- '12' => 30258,
- '9' => 30003,
- '7' => 29746,
- '1' => 29762,
- '6' => 30274,
- '10' => 30002,
- '11' => 30259
+ '4177' => {
+ '6' => 8517,
+ '4' => 8515,
+ '8' => 8519,
+ '1' => 8512,
+ '2' => 8513,
+ '7' => 8518,
+ '5' => 8516,
+ '3' => 8514
+ },
+ '32789' => {
+ '3' => 4144,
+ '5' => 4176,
+ '1' => 4112,
+ '2' => 4128,
+ '0' => 4096,
+ '4' => 4160
},
- '35332' => {
- '7' => 24645,
- '1' => 24657,
- '6' => 24644,
- '2' => 24658,
- '5' => 24643,
- '8' => 24646,
- '0' => 24656
+ '33346' => {
+ '8' => 29025,
+ '10' => 29280,
+ '2' => 29009,
+ '4' => 29264,
+ '11' => 29537,
+ '9' => 29281,
+ '6' => 29520,
+ '1' => 29008,
+ '7' => 29024,
+ '5' => 29521,
+ '12' => 29536,
+ '3' => 29265
},
- '33370' => {
- '9' => 28852,
- '7' => 28851,
- '1' => 28835,
- '2' => 28837,
- '10' => 28853,
- '4' => 28834,
- '3' => 28836,
- '8' => 28850
+ '4386' => {
+ '5' => 8995,
+ '7' => 8993,
+ '2' => 8998,
+ '8' => 8992,
+ '1' => 8999,
+ '4' => 8996,
+ '6' => 8994,
+ '3' => 8997
+ },
+ '35329' => {
+ '3' => 24610,
+ '7' => 24597,
+ '4' => 24595,
+ '8' => 24598,
+ '0' => 24608,
+ '2' => 24609,
+ '6' => 24596
},
- '33303' => {
- '11' => 31043,
- '10' => 30786,
- '6' => 31058,
- '9' => 30787,
- '12' => 31042,
- '7' => 30530,
- '1' => 30546,
- '5' => 31059,
- '2' => 30547,
- '8' => 30531,
- '4' => 30802,
- '3' => 30803
+ '33344' => {
+ '1' => 29088,
+ '6' => 29600,
+ '5' => 29601,
+ '7' => 29104,
+ '12' => 29616,
+ '3' => 29345,
+ '4' => 29344,
+ '10' => 29360,
+ '8' => 29105,
+ '2' => 29089,
+ '11' => 29617,
+ '9' => 29361
},
- '4353' => {
- '4' => 8707,
- '3' => 8706,
- '8' => 8711,
- '6' => 8709,
- '7' => 8710,
- '1' => 8704,
- '5' => 8708,
- '2' => 8705
+ '4385' => {
+ '7' => 9001,
+ '5' => 9002,
+ '6' => 9003,
+ '2' => 9006,
+ '1' => 9007,
+ '8' => 9000,
+ '4' => 9004,
+ '3' => 9005
},
- '4416' => {
- '0' => 4417,
- '3' => 4420,
- '1' => 4418,
- '2' => 4419
+ '4352' => {
+ '3' => 4356,
+ '0' => 4353,
+ '2' => 4355,
+ '1' => 4354
},
- '33411' => {
- '5' => 30278,
- '2' => 29766,
- '6' => 30279,
- '12' => 30263,
- '1' => 29767,
- '7' => 29751,
- '9' => 30006,
- '10' => 30007,
- '11' => 30262,
- '4' => 30023,
- '3' => 30022,
- '8' => 29750
- },
- '33347' => {
- '10' => 29248,
- '11' => 29505,
- '2' => 28977,
- '5' => 29489,
- '7' => 28992,
- '1' => 28976,
- '9' => 29249,
- '12' => 29504,
- '6' => 29488,
- '8' => 28993,
- '3' => 29233,
- '4' => 29232
- },
- '33793' => {
- '4' => 18512,
- '3' => 18513,
- '8' => 18496,
- '6' => 18498,
- '7' => 18497,
- '9' => 18483,
- '1' => 18515,
- '12' => 18480,
- '5' => 18499,
- '2' => 18514,
- '11' => 18481,
- '10' => 18482
+ '4113' => {
+ '5' => 8452,
+ '7' => 8534,
+ '3' => 8450,
+ '4' => 8451,
+ '8' => 8535,
+ '1' => 8448,
+ '2' => 8449,
+ '6' => 8453
+ },
+ '34816' => {
+ '2' => 288,
+ '0' => 2
},
- '33301' => {
- '3' => 30739,
- '4' => 30738,
- '8' => 30467,
- '2' => 30483,
- '5' => 30995,
- '12' => 30978,
- '1' => 30482,
- '9' => 30723,
- '7' => 30466,
- '6' => 30994,
- '10' => 30722,
- '11' => 30979
+ '33808' => {
+ '2' => 33809
},
- '33734' => {
- '3' => 33410,
- '1' => 33378,
- '6' => 33379,
- '2' => 33362,
- '5' => 33426,
- '0' => 33364
+ '33313' => {
+ '3' => 30337,
+ '12' => 30096,
+ '7' => 30064,
+ '5' => 30353,
+ '6' => 30352,
+ '1' => 30320,
+ '11' => 30097,
+ '9' => 30081,
+ '4' => 30336,
+ '10' => 30080,
+ '2' => 30321,
+ '8' => 30065
},
- '33380' => {
- '3' => 29222,
- '4' => 29223,
- '8' => 28950,
- '1' => 28967,
- '7' => 28951,
- '12' => 29463,
- '9' => 29206,
- '6' => 29479,
- '2' => 28966,
- '5' => 29478,
- '11' => 29462,
- '10' => 29207
+ '4130' => {
+ '6' => 8205,
+ '4' => 8203,
+ '2' => 8201,
+ '1' => 8200,
+ '7' => 8198,
+ '5' => 8204,
+ '3' => 8202
+ },
+ '33412' => {
+ '6' => 30247,
+ '2' => 29734,
+ '10' => 29975,
+ '1' => 29735,
+ '8' => 29718,
+ '4' => 29991,
+ '9' => 29974,
+ '11' => 30230,
+ '7' => 29719,
+ '5' => 30246,
+ '12' => 30231,
+ '3' => 29990
},
- '33738' => {
- '3' => 33320,
- '1' => 33319,
- '4' => 33351,
- '6' => 33352,
- '2' => 33304,
- '5' => 33350,
- '0' => 33370
+ '33735' => {
+ '0' => 33301,
+ '2' => 33303,
+ '1' => 33286,
+ '4' => 33317,
+ '3' => 33318,
+ '5' => 33302
},
- '4372' => {
- '2' => 8726,
- '5' => 8723,
- '7' => 8721,
- '1' => 8727,
- '6' => 8722,
- '8' => 8720,
- '3' => 8725,
- '4' => 8724
+ '4164' => {
+ '6' => 8511,
+ '4' => 8507,
+ '1' => 8504,
+ '2' => 8505,
+ '8' => 8509,
+ '7' => 8510,
+ '5' => 8508,
+ '3' => 8506
},
- '4404' => {
- '2' => 8758,
- '5' => 8755,
- '7' => 8752,
- '1' => 8759,
- '6' => 8754,
- '8' => 8753,
- '3' => 8757,
- '4' => 8756
- },
- '33284' => {
- '5' => 31537,
- '2' => 31505,
- '6' => 31536,
- '9' => 31265,
- '7' => 31248,
- '1' => 31504,
- '12' => 31280,
- '10' => 31264,
- '11' => 31281,
- '4' => 31520,
- '3' => 31521,
- '8' => 31249
- },
- '33320' => {
- '6' => 30306,
- '9' => 30035,
- '7' => 29778,
- '12' => 30290,
- '1' => 29794,
- '5' => 30307,
- '2' => 29795,
- '11' => 30291,
- '10' => 30034,
- '4' => 30050,
- '3' => 30051,
- '8' => 29779
+ '33379' => {
+ '6' => 29511,
+ '1' => 28999,
+ '7' => 28983,
+ '5' => 29510,
+ '12' => 29495,
+ '3' => 29254,
+ '2' => 28998,
+ '8' => 28982,
+ '10' => 29239,
+ '4' => 29255,
+ '9' => 29238,
+ '11' => 29494
},
- '33353' => {
- '4' => 29059,
- '3' => 29058,
- '8' => 29298,
- '6' => 29075,
- '1' => 29043,
- '12' => 29331,
- '7' => 29299,
- '9' => 29314,
- '5' => 29074,
- '2' => 29042,
- '11' => 29330,
- '10' => 29315
+ '33739' => {
+ '1' => 33337,
+ '2' => 33353,
+ '0' => 33369,
+ '4' => 33321,
+ '5' => 33354,
+ '3' => 33366
},
- '33360' => {
- '3' => 28833,
- '4' => 28832,
- '8' => 28855,
- '9' => 28849,
- '1' => 28838,
- '7' => 28854,
- '2' => 28839,
- '10' => 28848
+ '33302' => {
+ '11' => 31011,
+ '9' => 30755,
+ '4' => 30770,
+ '10' => 30754,
+ '2' => 30515,
+ '8' => 30499,
+ '3' => 30771,
+ '12' => 31010,
+ '7' => 30498,
+ '5' => 31027,
+ '6' => 31026,
+ '1' => 30514
},
- '33314' => {
- '3' => 30033,
- '4' => 30032,
- '8' => 29793,
- '2' => 29777,
- '5' => 30289,
- '7' => 29792,
- '12' => 30304,
- '9' => 30049,
- '1' => 29776,
- '6' => 30288,
- '10' => 30048,
- '11' => 30305
+ '35332' => {
+ '7' => 24645,
+ '5' => 24643,
+ '6' => 24644,
+ '1' => 24657,
+ '2' => 24658,
+ '8' => 24646,
+ '0' => 24656
},
- '33730' => {
- '2' => 33360,
- '5' => 33344,
- '1' => 33361,
- '3' => 33313,
- '6' => 33297,
- '0' => 33348
+ '33361' => {
+ '11' => 28823,
+ '9' => 28807,
+ '4' => 28800,
+ '10' => 28806,
+ '2' => 28785,
+ '8' => 28791,
+ '5' => 28817,
+ '7' => 28790,
+ '1' => 28784,
+ '6' => 28816,
+ '3' => 28801,
+ '12' => 28822
},
- '33385' => {
- '5' => 29332,
- '2' => 29300,
- '6' => 29333,
- '7' => 29045,
- '1' => 29301,
- '12' => 29077,
- '9' => 29060,
- '10' => 29061,
- '11' => 29076,
- '4' => 29317,
- '3' => 29316,
- '8' => 29044
+ '33351' => {
+ '6' => 29506,
+ '1' => 28994,
+ '7' => 28978,
+ '5' => 29507,
+ '12' => 29490,
+ '3' => 29251,
+ '4' => 29250,
+ '8' => 28979,
+ '10' => 29234,
+ '2' => 28995,
+ '9' => 29235,
+ '11' => 29491
},
- '4370' => {
- '1' => 8983,
- '7' => 8977,
- '6' => 8978,
- '2' => 8982,
- '5' => 8979,
- '8' => 8976,
- '3' => 8980,
- '4' => 8981
- },
- '35330' => {
- '8' => 24614,
- '5' => 24611,
- '6' => 24612,
- '7' => 24613
+ '33380' => {
+ '3' => 29222,
+ '12' => 29463,
+ '7' => 28951,
+ '5' => 29478,
+ '6' => 29479,
+ '1' => 28967,
+ '9' => 29206,
+ '11' => 29462,
+ '2' => 28966,
+ '8' => 28950,
+ '10' => 29207,
+ '4' => 29223
},
- '33313' => {
- '7' => 30064,
- '9' => 30081,
- '1' => 30320,
- '12' => 30096,
- '6' => 30352,
- '2' => 30321,
- '5' => 30353,
- '11' => 30097,
- '10' => 30080,
- '3' => 30337,
- '4' => 30336,
- '8' => 30065
+ '33337' => {
+ '3' => 29570,
+ '12' => 29843,
+ '5' => 29586,
+ '7' => 29811,
+ '1' => 29555,
+ '6' => 29587,
+ '11' => 29842,
+ '9' => 29826,
+ '8' => 29810,
+ '2' => 29554,
+ '10' => 29827,
+ '4' => 29571
},
- '33286' => {
- '4' => 31267,
- '3' => 31266,
- '8' => 31506,
- '6' => 31283,
- '7' => 31507,
- '12' => 31539,
- '1' => 31251,
- '9' => 31522,
- '5' => 31282,
- '2' => 31250,
- '11' => 31538,
- '10' => 31523
+ '4147' => {
+ '3' => 8225,
+ '6' => 8229,
+ '4' => 8227,
+ '1' => 8235,
+ '2' => 8224,
+ '8' => 8231,
+ '7' => 8230,
+ '5' => 8228
+ },
+ '33427' => {
+ '2' => 30518,
+ '8' => 30502,
+ '10' => 30759,
+ '4' => 30775,
+ '11' => 31014,
+ '9' => 30758,
+ '12' => 31015,
+ '3' => 30774,
+ '1' => 30519,
+ '6' => 31031,
+ '5' => 31030,
+ '7' => 30503
},
- '4385' => {
- '2' => 9006,
- '5' => 9002,
- '1' => 9007,
- '7' => 9001,
- '6' => 9003,
- '3' => 9005,
- '4' => 9004,
- '8' => 9000
+ '4432' => {
+ '0' => 4433,
+ '1' => 4434,
+ '2' => 4435,
+ '3' => 4436
},
+ '33382' => {
+ '8' => 28964,
+ '10' => 29221,
+ '2' => 28948,
+ '4' => 29205,
+ '9' => 29220,
+ '11' => 29476,
+ '1' => 28949,
+ '6' => 29461,
+ '5' => 29460,
+ '7' => 28965,
+ '12' => 29477,
+ '3' => 29204
+ },
'33315' => {
- '6' => 30256,
- '9' => 30017,
'1' => 29744,
+ '6' => 30256,
+ '5' => 30257,
'7' => 29760,
'12' => 30272,
- '5' => 30257,
- '2' => 29745,
- '11' => 30273,
- '10' => 30016,
- '4' => 30000,
'3' => 30001,
- '8' => 29761
+ '4' => 30000,
+ '10' => 30016,
+ '2' => 29745,
+ '8' => 29761,
+ '9' => 30017,
+ '11' => 30273
},
- '33344' => {
- '10' => 29360,
- '11' => 29617,
- '2' => 29089,
- '5' => 29601,
- '1' => 29088,
- '7' => 29104,
- '9' => 29361,
- '12' => 29616,
- '6' => 29600,
- '8' => 29105,
- '3' => 29345,
- '4' => 29344
+ '4368' => {
+ '3' => 4372,
+ '2' => 4371,
+ '1' => 4370,
+ '0' => 4369
+ },
+ '33300' => {
+ '7' => 30480,
+ '5' => 30977,
+ '6' => 30976,
+ '1' => 30464,
+ '3' => 30721,
+ '12' => 30992,
+ '11' => 30993,
+ '9' => 30737,
+ '8' => 30481,
+ '10' => 30736,
+ '2' => 30465,
+ '4' => 30720
},
- '33426' => {
- '8' => 30534,
- '3' => 30806,
- '4' => 30807,
- '10' => 30791,
- '11' => 31046,
- '2' => 30550,
- '5' => 31062,
- '7' => 30535,
- '12' => 31047,
- '9' => 30790,
- '1' => 30551,
- '6' => 31063
+ '33728' => {
+ '6' => 33285,
+ '4' => 33299,
+ '1' => 33316,
+ '0' => 33349,
+ '2' => 33300,
+ '3' => 33284
},
- '33366' => {
- '10' => 28707,
- '11' => 28722,
- '5' => 28724,
- '2' => 28692,
- '6' => 28725,
- '7' => 28691,
- '9' => 28706,
- '12' => 28723,
- '1' => 28693,
- '8' => 28690,
- '4' => 28709,
- '3' => 28708
+ '35330' => {
+ '5' => 24611,
+ '7' => 24613,
+ '8' => 24614,
+ '6' => 24612
},
- '32789' => {
- '0' => 4096,
- '4' => 4160,
- '3' => 4144,
- '1' => 4112,
- '5' => 4176,
- '2' => 4128
+ '33319' => {
+ '9' => 30003,
+ '11' => 30259,
+ '10' => 30002,
+ '2' => 29763,
+ '8' => 29747,
+ '4' => 30018,
+ '5' => 30275,
+ '7' => 29746,
+ '1' => 29762,
+ '6' => 30274,
+ '3' => 30019,
+ '12' => 30258
},
- '35329' => {
- '6' => 24596,
- '4' => 24595,
- '7' => 24597,
- '3' => 24610,
- '2' => 24609,
- '8' => 24598,
- '0' => 24608
+ '4161' => {
+ '6' => 8245,
+ '4' => 8243,
+ '2' => 8241,
+ '1' => 8240,
+ '7' => 8246,
+ '5' => 8244,
+ '3' => 8242
+ },
+ '32768' => {
+ '3' => 32787,
+ '7' => 32791,
+ '5' => 32789,
+ '6' => 32790,
+ '1' => 34816,
+ '8' => 32792,
+ '10' => 3,
+ '2' => 32786,
+ '0' => 256
},
- '33361' => {
- '8' => 28791,
- '3' => 28801,
- '4' => 28800,
- '10' => 28806,
- '11' => 28823,
- '2' => 28785,
- '5' => 28817,
- '12' => 28822,
- '9' => 28807,
- '7' => 28790,
- '1' => 28784,
- '6' => 28816
+ '34944' => {
+ '0' => 20480,
+ '1' => 20481,
+ '2' => 20482,
+ '3' => 20483
},
- '33409' => {
- '4' => 30086,
- '3' => 30087,
- '8' => 30327,
- '5' => 30103,
- '2' => 30071,
- '6' => 30102,
- '1' => 30070,
- '9' => 30343,
- '12' => 30358,
- '7' => 30326,
- '10' => 30342,
- '11' => 30359
+ '33792' => {
+ '2' => 33793
},
'33731' => {
- '1' => 33413,
'3' => 33380,
+ '5' => 33446,
'6' => 33381,
'4' => 33445,
- '5' => 33446,
+ '1' => 33413,
'0' => 33430
},
- '33300' => {
- '3' => 30721,
- '4' => 30720,
- '8' => 30481,
- '2' => 30465,
- '5' => 30977,
- '7' => 30480,
- '9' => 30737,
- '12' => 30992,
- '1' => 30464,
- '6' => 30976,
- '10' => 30736,
- '11' => 30993
- },
- '33351' => {
- '6' => 29506,
- '12' => 29490,
- '9' => 29235,
- '1' => 28994,
- '7' => 28978,
- '5' => 29507,
- '2' => 28995,
- '11' => 29491,
- '10' => 29234,
- '4' => 29250,
- '3' => 29251,
- '8' => 28979
- },
- '32791' => {
- '3' => 33730,
- '1' => 33728,
- '6' => 272,
- '4' => 33736,
- '2' => 33729,
- '5' => 33737,
- '0' => 33738
+ '33369' => {
+ '11' => 28818,
+ '9' => 28802,
+ '2' => 28788,
+ '8' => 28786,
+ '10' => 28803,
+ '4' => 28805,
+ '3' => 28804,
+ '12' => 28819,
+ '7' => 28787,
+ '5' => 28820,
+ '6' => 28821,
+ '1' => 28789
},
- '4162' => {
- '8' => 8472,
- '5' => 8252,
- '2' => 8249,
- '6' => 8253,
- '4' => 8251,
- '1' => 8248,
- '3' => 8250
+ '4144' => {
+ '1' => 4146,
+ '2' => 4147,
+ '0' => 4145,
+ '3' => 4148
},
- '4130' => {
- '6' => 8205,
- '4' => 8203,
- '1' => 8200,
- '7' => 8198,
- '3' => 8202,
- '5' => 8204,
- '2' => 8201
+ '4354' => {
+ '3' => 8714,
+ '7' => 8718,
+ '5' => 8717,
+ '6' => 8716,
+ '1' => 8712,
+ '8' => 8719,
+ '2' => 8713,
+ '4' => 8715
},
- '4435' => {
- '1' => 9040,
- '7' => 9046,
- '6' => 9045,
- '2' => 9041,
- '5' => 9044,
- '8' => 9047,
- '3' => 9042,
- '4' => 9043
+ '4128' => {
+ '0' => 4129,
+ '1' => 4130,
+ '2' => 4131,
+ '3' => 4132
},
- '33377' => {
- '3' => 29063,
- '4' => 29062,
- '8' => 29303,
- '2' => 29047,
- '5' => 29079,
- '7' => 29302,
- '9' => 29319,
- '12' => 29334,
- '1' => 29046,
- '6' => 29078,
- '10' => 29318,
- '11' => 29335
+ '33345' => {
+ '7' => 29040,
+ '5' => 29329,
+ '6' => 29328,
+ '1' => 29296,
+ '3' => 29313,
+ '12' => 29072,
+ '11' => 29073,
+ '9' => 29057,
+ '8' => 29041,
+ '10' => 29056,
+ '2' => 29297,
+ '4' => 29312
},
- '33354' => {
- '11' => 29603,
- '10' => 29346,
- '6' => 29618,
- '9' => 29347,
- '7' => 29090,
- '1' => 29106,
- '12' => 29602,
- '5' => 29619,
- '2' => 29107,
- '8' => 29091,
- '4' => 29362,
- '3' => 29363
+ '4355' => {
+ '5' => 8964,
+ '7' => 8966,
+ '2' => 8961,
+ '8' => 8967,
+ '1' => 8960,
+ '4' => 8963,
+ '6' => 8965,
+ '3' => 8962
+ },
+ '4145' => {
+ '7' => 8213,
+ '5' => 8211,
+ '2' => 8208,
+ '8' => 8214,
+ '1' => 8212,
+ '4' => 8210,
+ '3' => 8209
+ },
+ '32786' => {
+ '3' => 33808,
+ '2' => 33792,
+ '0' => 34560,
+ '1' => 34304
+ },
+ '33349' => {
+ '5' => 29443,
+ '7' => 28928,
+ '1' => 28930,
+ '6' => 29442,
+ '3' => 29187,
+ '12' => 29440,
+ '9' => 29185,
+ '11' => 29441,
+ '8' => 28929,
+ '10' => 29184,
+ '2' => 28931,
+ '4' => 29186
},
'4356' => {
- '7' => 8974,
+ '3' => 8970,
'1' => 8968,
- '6' => 8973,
+ '8' => 8975,
'2' => 8969,
+ '4' => 8971,
+ '6' => 8973,
'5' => 8972,
- '8' => 8975,
- '3' => 8970,
- '4' => 8971
+ '7' => 8974
},
'4146' => {
- '2' => 8216,
- '5' => 8219,
'3' => 8217,
'7' => 8221,
+ '5' => 8219,
+ '6' => 8220,
'1' => 8215,
- '4' => 8218,
- '6' => 8220
- },
- '4148' => {
- '8' => 8233,
- '1' => 8279,
- '3' => 8234,
- '7' => 8237,
- '6' => 8226,
- '2' => 8232,
- '5' => 8236
+ '2' => 8216,
+ '4' => 8218
},
- '4100' => {
- '6' => 8493,
- '1' => 8488,
- '7' => 8494,
- '5' => 8492,
- '2' => 8489,
- '4' => 8491,
- '3' => 8490,
- '8' => 8495
+ '4372' => {
+ '3' => 8725,
+ '7' => 8721,
+ '5' => 8723,
+ '6' => 8722,
+ '1' => 8727,
+ '8' => 8720,
+ '2' => 8726,
+ '4' => 8724
},
- '33393' => {
- '4' => 29574,
- '3' => 29575,
- '8' => 29815,
- '5' => 29591,
- '2' => 29559,
- '6' => 29590,
- '9' => 29831,
- '12' => 29846,
- '7' => 29814,
- '1' => 29558,
- '10' => 29830,
- '11' => 29847
- },
- '33415' => {
- '8' => 29764,
- '4' => 30005,
- '3' => 30004,
- '10' => 30021,
- '11' => 30276,
- '5' => 30260,
- '2' => 29748,
- '6' => 30261,
- '1' => 29749,
- '12' => 30277,
- '9' => 30020,
- '7' => 29765
- },
- '33316' => {
- '3' => 29969,
- '4' => 29968,
- '8' => 29729,
- '2' => 29713,
- '5' => 30225,
- '12' => 30240,
- '9' => 29985,
- '1' => 29712,
- '7' => 29728,
- '6' => 30224,
- '10' => 29984,
- '11' => 30241
- },
- '35328' => {
- '0' => 24592,
- '2' => 24594,
- '1' => 24593
- },
- '32790' => {
- '1' => 4368,
- '3' => 4400,
- '4' => 4416,
- '2' => 4384,
- '5' => 4432,
- '0' => 4352
+ '33416' => {
+ '9' => 30052,
+ '11' => 30308,
+ '2' => 29780,
+ '10' => 30053,
+ '8' => 29796,
+ '4' => 30037,
+ '5' => 30292,
+ '7' => 29797,
+ '1' => 29781,
+ '6' => 30293,
+ '3' => 30036,
+ '12' => 30309
},
- '33446' => {
- '11' => 31284,
- '10' => 31269,
- '6' => 31541,
- '1' => 31509,
- '12' => 31285,
- '9' => 31268,
- '7' => 31253,
- '5' => 31540,
- '2' => 31508,
- '8' => 31252,
- '4' => 31525,
- '3' => 31524
+ '33414' => {
+ '12' => 30245,
+ '3' => 29972,
+ '6' => 30229,
+ '1' => 29717,
+ '7' => 29733,
+ '5' => 30228,
+ '4' => 29973,
+ '10' => 29989,
+ '2' => 29716,
+ '8' => 29732,
+ '11' => 30244,
+ '9' => 29988
},
- '34561' => {
- '2' => 17424,
- '1' => 17408,
- '3' => 17440
+ '34305' => {
+ '3' => 19488,
+ '5' => 19520,
+ '7' => 19505,
+ '1' => 19456,
+ '2' => 19472,
+ '4' => 19504,
+ '6' => 19536
},
- '4145' => {
- '4' => 8210,
- '7' => 8213,
- '1' => 8212,
- '3' => 8209,
- '5' => 8211,
- '2' => 8208,
- '8' => 8214
- },
- '4163' => {
- '3' => 8498,
- '4' => 8499,
- '8' => 8503,
- '2' => 8497,
- '5' => 8500,
- '7' => 8502,
- '1' => 8496,
- '6' => 8501
+ '4160' => {
+ '1' => 4162,
+ '0' => 4161,
+ '2' => 4163,
+ '3' => 4164
},
- '4436' => {
- '8' => 9055,
- '3' => 9050,
- '4' => 9051,
- '2' => 9049,
- '5' => 9052,
- '7' => 9054,
- '1' => 9048,
- '6' => 9053
+ '4402' => {
+ '3' => 9013,
+ '5' => 9011,
+ '7' => 9009,
+ '8' => 9008,
+ '1' => 9015,
+ '2' => 9014,
+ '4' => 9012,
+ '6' => 9010
},
- '33736' => {
- '5' => 33401,
- '2' => 33386,
- '4' => 33416,
- '6' => 33417,
- '1' => 33384,
- '3' => 33368,
- '0' => 33385
- },
- '33383' => {
- '2' => 28980,
- '5' => 29492,
- '12' => 29509,
- '1' => 28981,
- '7' => 28997,
- '9' => 29252,
- '6' => 29493,
- '10' => 29253,
- '11' => 29508,
- '3' => 29236,
- '4' => 29237,
- '8' => 28996
+ '33381' => {
+ '3' => 29190,
+ '12' => 29445,
+ '5' => 29446,
+ '7' => 28933,
+ '1' => 28935,
+ '6' => 29447,
+ '9' => 29188,
+ '11' => 29444,
+ '8' => 28932,
+ '10' => 29189,
+ '2' => 28934,
+ '4' => 29191
},
- '33427' => {
- '5' => 31030,
- '2' => 30518,
- '6' => 31031,
- '1' => 30519,
- '9' => 30758,
- '12' => 31015,
- '7' => 30503,
- '10' => 30759,
- '11' => 31014,
- '4' => 30775,
- '3' => 30774,
- '8' => 30502
+ '33350' => {
+ '9' => 29203,
+ '11' => 29459,
+ '10' => 29202,
+ '2' => 28963,
+ '8' => 28947,
+ '4' => 29218,
+ '3' => 29219,
+ '12' => 29458,
+ '5' => 29475,
+ '7' => 28946,
+ '1' => 28962,
+ '6' => 29474
},
'4369' => {
+ '3' => 8989,
+ '6' => 8986,
+ '4' => 8988,
+ '8' => 8984,
'2' => 8990,
- '5' => 8987,
'1' => 8991,
'7' => 8985,
- '6' => 8986,
- '8' => 8984,
- '3' => 8989,
- '4' => 8988
- },
- '32768' => {
- '5' => 32789,
- '2' => 32786,
- '6' => 32790,
- '7' => 32791,
- '1' => 34816,
- '0' => 256,
- '10' => 3,
- '3' => 32787,
- '8' => 32792
- },
- '4098' => {
- '2' => 8262,
- '5' => 8267,
- '3' => 8269,
- '7' => 8247,
- '1' => 8264,
- '6' => 8266,
- '4' => 8268
+ '5' => 8987
},
- '33298' => {
- '2' => 30529,
- '5' => 31041,
- '7' => 30544,
- '12' => 31056,
- '1' => 30528,
- '9' => 30801,
- '6' => 31040,
- '10' => 30800,
- '11' => 31057,
- '3' => 30785,
- '4' => 30784,
- '8' => 30545
+ '33360' => {
+ '9' => 28849,
+ '7' => 28854,
+ '1' => 28838,
+ '8' => 28855,
+ '2' => 28839,
+ '10' => 28848,
+ '4' => 28832,
+ '3' => 28833
},
- '4403' => {
- '6' => 8762,
- '7' => 8761,
- '1' => 8767,
- '5' => 8763,
- '2' => 8766,
- '4' => 8764,
- '3' => 8765,
- '8' => 8760
+ '4420' => {
+ '3' => 8778,
+ '5' => 8780,
+ '7' => 8782,
+ '4' => 8779,
+ '2' => 8777,
+ '1' => 8776,
+ '8' => 8783,
+ '6' => 8781
},
- '33302' => {
- '11' => 31011,
- '10' => 30754,
- '6' => 31026,
- '9' => 30755,
- '7' => 30498,
- '12' => 31010,
- '1' => 30514,
- '5' => 31027,
- '2' => 30515,
- '8' => 30499,
- '4' => 30770,
- '3' => 30771
- },
- '4368' => {
- '0' => 4369,
- '2' => 4371,
- '1' => 4370,
- '3' => 4372
- },
- '4096' => {
- '0' => 4097,
- '1' => 4098,
- '3' => 4100,
- '2' => 4099
+ '4163' => {
+ '7' => 8502,
+ '5' => 8500,
+ '6' => 8501,
+ '1' => 8496,
+ '2' => 8497,
+ '8' => 8503,
+ '4' => 8499,
+ '3' => 8498
},
- '33412' => {
- '4' => 29991,
- '3' => 29990,
- '8' => 29718,
- '5' => 30246,
- '2' => 29734,
- '6' => 30247,
- '9' => 29974,
- '12' => 30231,
- '1' => 29735,
- '7' => 29719,
- '10' => 29975,
- '11' => 30230
+ '33301' => {
+ '11' => 30979,
+ '9' => 30723,
+ '4' => 30738,
+ '2' => 30483,
+ '10' => 30722,
+ '8' => 30467,
+ '3' => 30739,
+ '12' => 30978,
+ '5' => 30995,
+ '7' => 30466,
+ '1' => 30482,
+ '6' => 30994
},
- '33378' => {
- '8' => 29014,
- '3' => 29286,
- '4' => 29287,
- '10' => 29271,
- '11' => 29526,
- '2' => 29030,
- '5' => 29542,
- '12' => 29527,
- '9' => 29270,
- '1' => 29031,
- '7' => 29015,
- '6' => 29543
+ '33347' => {
+ '6' => 29488,
+ '1' => 28976,
+ '7' => 28992,
+ '5' => 29489,
+ '12' => 29504,
+ '3' => 29233,
+ '8' => 28993,
+ '2' => 28977,
+ '10' => 29248,
+ '4' => 29232,
+ '11' => 29505,
+ '9' => 29249
},
- '34944' => {
- '0' => 20480,
- '2' => 20482,
- '1' => 20481,
- '3' => 20483
+ '35331' => {
+ '3' => 24642,
+ '2' => 24641,
+ '1' => 24640
},
- '4097' => {
- '4' => 8261,
- '3' => 8257,
- '8' => 8265,
- '6' => 8263,
- '7' => 8260,
- '1' => 8258,
- '5' => 8256,
- '2' => 8259
- },
- '33728' => {
- '3' => 33284,
- '1' => 33316,
- '4' => 33299,
- '6' => 33285,
- '2' => 33300,
- '0' => 33349
+ '33362' => {
+ '4' => 28752,
+ '10' => 28758,
+ '2' => 28737,
+ '8' => 28743,
+ '9' => 28759,
+ '11' => 28775,
+ '12' => 28774,
+ '3' => 28753,
+ '6' => 28768,
+ '1' => 28736,
+ '7' => 28742,
+ '5' => 28769
},
- '33350' => {
- '5' => 29475,
- '2' => 28963,
- '6' => 29474,
- '7' => 28946,
- '9' => 29203,
- '1' => 28962,
- '12' => 29458,
- '10' => 29202,
- '11' => 29459,
- '4' => 29218,
- '3' => 29219,
- '8' => 28947
+ '33352' => {
+ '12' => 29522,
+ '3' => 29283,
+ '6' => 29538,
+ '10' => 29266,
+ '1' => 29026,
+ '8' => 29011,
+ '2' => 29027,
+ '4' => 29282,
+ '9' => 29267,
+ '11' => 29523,
+ '7' => 29010,
+ '5' => 29539
},
- '4099' => {
- '4' => 8483,
- '3' => 8482,
- '8' => 8487,
- '5' => 8484,
- '2' => 8481,
- '6' => 8485,
- '1' => 8480,
- '7' => 8486
- },
- '4433' => {
- '6' => 8789,
- '7' => 8790,
- '1' => 8784,
- '5' => 8788,
- '2' => 8785,
- '4' => 8787,
- '3' => 8786,
- '8' => 8791
- },
- '33381' => {
- '8' => 28932,
- '4' => 29191,
- '3' => 29190,
- '10' => 29189,
- '11' => 29444,
- '5' => 29446,
- '2' => 28934,
- '6' => 29447,
- '12' => 29445,
- '7' => 28933,
- '1' => 28935,
- '9' => 29188
+ '33444' => {
+ '8' => 31511,
+ '2' => 31255,
+ '10' => 31526,
+ '4' => 31270,
+ '11' => 31543,
+ '9' => 31527,
+ '6' => 31286,
+ '1' => 31254,
+ '7' => 31510,
+ '5' => 31287,
+ '12' => 31542,
+ '3' => 31271
},
- '4432' => {
- '0' => 4433,
- '2' => 4435,
- '1' => 4434,
- '3' => 4436
- },
- '33297' => {
- '8' => 30577,
- '4' => 30816,
- '3' => 30817,
- '10' => 30832,
- '2' => 30561,
- '1' => 30560,
- '9' => 30833,
- '7' => 30576
+ '33737' => {
+ '4' => 33415,
+ '0' => 33414,
+ '1' => 33432,
+ '2' => 33383,
+ '6' => 33382,
+ '3' => 33431
},
- '4417' => {
- '8' => 9031,
- '4' => 9027,
- '3' => 9026,
- '6' => 9029,
- '1' => 9024,
- '7' => 9030,
- '5' => 9028,
- '2' => 9025
- },
- '4114' => {
- '5' => 8540,
- '2' => 8537,
- '6' => 8541,
- '1' => 8536,
- '7' => 8542,
- '4' => 8539,
- '3' => 8538,
- '8' => 8543
+ '4129' => {
+ '6' => 8197,
+ '1' => 8192,
+ '2' => 8193,
+ '4' => 8195,
+ '7' => 8199,
+ '5' => 8196,
+ '3' => 8194
},
- '33321' => {
- '12' => 30355,
- '9' => 30338,
- '1' => 30067,
- '7' => 30323,
- '6' => 30099,
- '2' => 30066,
- '5' => 30098,
- '11' => 30354,
- '10' => 30339,
- '3' => 30082,
- '4' => 30083,
- '8' => 30322
+ '33730' => {
+ '5' => 33344,
+ '6' => 33297,
+ '1' => 33361,
+ '0' => 33348,
+ '2' => 33360,
+ '3' => 33313
},
- '33430' => {
- '3' => 30756,
- '4' => 30757,
- '8' => 30516,
- '2' => 30500,
- '5' => 31012,
- '9' => 30772,
- '12' => 31029,
- '7' => 30517,
- '1' => 30501,
- '6' => 31013,
- '10' => 30773,
- '11' => 31028
+ '33446' => {
+ '12' => 31285,
+ '3' => 31524,
+ '6' => 31541,
+ '4' => 31525,
+ '1' => 31509,
+ '8' => 31252,
+ '10' => 31269,
+ '2' => 31508,
+ '7' => 31253,
+ '9' => 31268,
+ '11' => 31284,
+ '5' => 31540
},
- '33349' => {
- '4' => 29186,
- '3' => 29187,
- '8' => 28929,
- '6' => 29442,
- '1' => 28930,
- '7' => 28928,
- '12' => 29440,
- '9' => 29185,
- '5' => 29443,
- '2' => 28931,
- '11' => 29441,
- '10' => 29184
+ '35328' => {
+ '1' => 24593,
+ '0' => 24592,
+ '2' => 24594
},
- '4131' => {
- '5' => 8276,
- '2' => 8273,
- '4' => 8275,
- '6' => 8277,
- '3' => 8274,
- '1' => 8272,
- '7' => 8278
- },
- '4116' => {
- '6' => 8461,
- '1' => 8456,
- '7' => 8462,
- '5' => 8460,
- '2' => 8457,
- '8' => 8463,
- '4' => 8459,
- '3' => 8458
- },
- '4178' => {
- '6' => 8525,
- '7' => 8526,
- '1' => 8521,
- '5' => 8524,
- '2' => 8520,
- '8' => 8527,
- '4' => 8523,
- '3' => 8522
- },
- '4161' => {
- '5' => 8244,
- '2' => 8241,
- '6' => 8245,
- '4' => 8243,
- '1' => 8240,
- '3' => 8242,
- '7' => 8246
- },
- '4354' => {
- '8' => 8719,
- '4' => 8715,
- '3' => 8714,
- '6' => 8716,
- '1' => 8712,
- '7' => 8718,
- '5' => 8717,
- '2' => 8713
- },
- '4400' => {
- '0' => 4401,
- '3' => 4404,
- '1' => 4402,
- '2' => 4403
+ '4132' => {
+ '6' => 8285,
+ '4' => 8283,
+ '1' => 8280,
+ '2' => 8281,
+ '7' => 8279,
+ '5' => 8284,
+ '3' => 8282
},
- '33429' => {
- '6' => 30981,
- '1' => 30469,
- '9' => 30740,
+ '33370' => {
+ '7' => 28851,
+ '9' => 28852,
+ '4' => 28834,
+ '1' => 28835,
+ '8' => 28850,
+ '10' => 28853,
+ '2' => 28837,
+ '3' => 28836
+ },
+ '33377' => {
+ '10' => 29318,
+ '2' => 29047,
+ '8' => 29303,
+ '4' => 29062,
+ '11' => 29335,
+ '9' => 29319,
+ '12' => 29334,
+ '3' => 29063,
+ '1' => 29046,
+ '6' => 29078,
+ '5' => 29079,
+ '7' => 29302
+ },
+ '33413' => {
+ '4' => 29959,
+ '10' => 29957,
+ '8' => 29700,
+ '2' => 29702,
+ '9' => 29956,
+ '11' => 30212,
+ '6' => 30215,
+ '1' => 29703,
+ '7' => 29701,
+ '5' => 30214,
+ '12' => 30213,
+ '3' => 29958
+ },
+ '33385' => {
+ '8' => 29044,
+ '10' => 29061,
+ '2' => 29300,
+ '4' => 29317,
+ '11' => 29076,
+ '9' => 29060,
+ '12' => 29077,
+ '3' => 29316,
+ '1' => 29301,
+ '6' => 29333,
+ '5' => 29332,
+ '7' => 29045
+ },
+ '33809' => {
+ '9' => 18435,
+ '11' => 18433,
+ '4' => 18464,
+ '2' => 18466,
+ '8' => 18448,
+ '10' => 18434,
+ '7' => 18449,
+ '5' => 18451,
+ '6' => 18450,
+ '1' => 18467,
+ '3' => 18465,
+ '12' => 18432
+ },
+ '4112' => {
+ '3' => 4116,
+ '0' => 4113,
+ '1' => 4114,
+ '2' => 4115
+ },
+ '33429' => {
+ '3' => 30724,
'12' => 30997,
'7' => 30485,
'5' => 30980,
- '2' => 30468,
+ '6' => 30981,
+ '1' => 30469,
+ '9' => 30740,
'11' => 30996,
- '10' => 30741,
'4' => 30725,
- '3' => 30724,
- '8' => 30484
+ '8' => 30484,
+ '2' => 30468,
+ '10' => 30741
},
- '33348' => {
- '11' => 29473,
- '10' => 29216,
- '6' => 29456,
- '12' => 29472,
- '9' => 29217,
- '7' => 28960,
- '1' => 28944,
- '5' => 29457,
- '2' => 28945,
- '8' => 28961,
- '4' => 29200,
- '3' => 29201
+ '33298' => {
+ '11' => 31057,
+ '9' => 30801,
+ '2' => 30529,
+ '10' => 30800,
+ '8' => 30545,
+ '4' => 30784,
+ '3' => 30785,
+ '12' => 31056,
+ '5' => 31041,
+ '7' => 30544,
+ '1' => 30528,
+ '6' => 31040
},
- '34305' => {
- '1' => 19456,
- '3' => 19488,
- '7' => 19505,
- '4' => 19504,
- '6' => 19536,
- '2' => 19472,
- '5' => 19520
+ '33425' => {
+ '3' => 30838,
+ '7' => 30567,
+ '9' => 30822,
+ '4' => 30839,
+ '8' => 30566,
+ '1' => 30583,
+ '10' => 30823,
+ '2' => 30582
},
- '4384' => {
- '0' => 4385,
- '2' => 4387,
- '3' => 4388,
- '1' => 4386
- },
- '33345' => {
- '5' => 29329,
- '2' => 29297,
- '6' => 29328,
- '12' => 29072,
- '1' => 29296,
- '9' => 29057,
- '7' => 29040,
- '10' => 29056,
- '11' => 29073,
- '4' => 29312,
- '3' => 29313,
- '8' => 29041
+ '33732' => {
+ '5' => 33427,
+ '6' => 33411,
+ '4' => 33429,
+ '0' => 33428,
+ '2' => 33444,
+ '3' => 33412
},
- '34304' => {
- '2' => 34305
+ '33284' => {
+ '9' => 31265,
+ '11' => 31281,
+ '4' => 31520,
+ '10' => 31264,
+ '2' => 31505,
+ '8' => 31249,
+ '5' => 31537,
+ '7' => 31248,
+ '1' => 31504,
+ '6' => 31536,
+ '3' => 31521,
+ '12' => 31280
},
- '33417' => {
- '10' => 30085,
- '11' => 30100,
- '2' => 30324,
- '5' => 30356,
- '1' => 30325,
- '12' => 30101,
- '7' => 30069,
- '9' => 30084,
- '6' => 30357,
- '8' => 30068,
- '3' => 30340,
- '4' => 30341
+ '33317' => {
+ '8' => 29697,
+ '10' => 29952,
+ '2' => 29699,
+ '4' => 29954,
+ '9' => 29953,
+ '11' => 30209,
+ '1' => 29698,
+ '6' => 30210,
+ '5' => 30211,
+ '7' => 29696,
+ '12' => 30208,
+ '3' => 29955
},
- '33428' => {
- '8' => 30470,
- '3' => 30742,
- '4' => 30743,
- '10' => 30727,
- '11' => 30982,
- '2' => 30486,
- '5' => 30998,
- '1' => 30487,
- '9' => 30726,
- '12' => 30983,
- '7' => 30471,
- '6' => 30999
+ '33286' => {
+ '2' => 31250,
+ '10' => 31523,
+ '8' => 31506,
+ '4' => 31267,
+ '9' => 31522,
+ '11' => 31538,
+ '1' => 31251,
+ '6' => 31283,
+ '5' => 31282,
+ '7' => 31507,
+ '12' => 31539,
+ '3' => 31266
},
- '4164' => {
- '5' => 8508,
- '2' => 8505,
- '6' => 8511,
- '1' => 8504,
- '7' => 8510,
- '8' => 8509,
- '4' => 8507,
- '3' => 8506
+ '4148' => {
+ '2' => 8232,
+ '8' => 8233,
+ '6' => 8226,
+ '5' => 8236,
+ '7' => 8237,
+ '3' => 8234
},
- '33318' => {
- '5' => 30243,
- '2' => 29731,
- '6' => 30242,
- '12' => 30226,
- '7' => 29714,
- '1' => 29730,
- '9' => 29971,
- '10' => 29970,
- '11' => 30227,
- '4' => 29986,
- '3' => 29987,
- '8' => 29715
+ '4353' => {
+ '5' => 8708,
+ '7' => 8710,
+ '4' => 8707,
+ '1' => 8704,
+ '2' => 8705,
+ '8' => 8711,
+ '6' => 8709,
+ '3' => 8706
+ },
+ '33297' => {
+ '8' => 30577,
+ '2' => 30561,
+ '1' => 30560,
+ '10' => 30832,
+ '4' => 30816,
+ '9' => 30833,
+ '7' => 30576,
+ '3' => 30817
},
- '4179' => {
- '2' => 8528,
- '5' => 8532,
- '1' => 8529,
- '7' => 8470,
- '6' => 8533,
- '3' => 8530,
- '4' => 8531,
- '8' => 8471
+ '32791' => {
+ '3' => 33730,
+ '5' => 33737,
+ '6' => 272,
+ '0' => 33738,
+ '2' => 33729,
+ '1' => 33728,
+ '4' => 33736
+ },
+ '4178' => {
+ '7' => 8526,
+ '5' => 8524,
+ '6' => 8525,
+ '2' => 8520,
+ '1' => 8521,
+ '8' => 8527,
+ '4' => 8523,
+ '3' => 8522
},
- '33733' => {
- '1' => 33409,
- '3' => 33393,
- '6' => 33425,
- '5' => 33377,
- '0' => 33376
+ '33320' => {
+ '4' => 30050,
+ '8' => 29779,
+ '10' => 30034,
+ '2' => 29795,
+ '11' => 30291,
+ '9' => 30035,
+ '12' => 30290,
+ '3' => 30051,
+ '6' => 30306,
+ '1' => 29794,
+ '7' => 29778,
+ '5' => 30307
},
- '33346' => {
- '7' => 29024,
- '9' => 29281,
- '12' => 29536,
- '1' => 29008,
- '6' => 29520,
- '2' => 29009,
- '5' => 29521,
- '11' => 29537,
- '10' => 29280,
- '3' => 29265,
- '4' => 29264,
- '8' => 29025
+ '33415' => {
+ '2' => 29748,
+ '8' => 29764,
+ '10' => 30021,
+ '4' => 30005,
+ '11' => 30276,
+ '9' => 30020,
+ '6' => 30261,
+ '1' => 29749,
+ '7' => 29765,
+ '5' => 30260,
+ '12' => 30277,
+ '3' => 30004
},
- '34560' => {
- '2' => 34561
+ '33432' => {
+ '4' => 30821,
+ '2' => 30564,
+ '1' => 30565,
+ '10' => 30837,
+ '8' => 30580,
+ '7' => 30581,
+ '9' => 30836,
+ '3' => 30820
},
- '4144' => {
- '2' => 4147,
- '1' => 4146,
- '3' => 4148,
- '0' => 4145
- },
- '4387' => {
- '5' => 8741,
- '2' => 8749,
- '6' => 8740,
- '1' => 8748,
- '7' => 8739,
- '8' => 8738,
- '4' => 8751,
- '3' => 8750
- },
'4418' => {
'3' => 9034,
- '4' => 9035,
- '8' => 9039,
+ '1' => 9032,
'2' => 9033,
+ '8' => 9039,
+ '4' => 9035,
+ '6' => 9037,
'5' => 9036,
- '7' => 9038,
- '1' => 9032,
- '6' => 9037
+ '7' => 9038
+ },
+ '4097' => {
+ '3' => 8257,
+ '4' => 8261,
+ '2' => 8259,
+ '1' => 8258,
+ '8' => 8265,
+ '6' => 8263,
+ '5' => 8256,
+ '7' => 8260
},
+ '33383' => {
+ '11' => 29508,
+ '9' => 29252,
+ '4' => 29237,
+ '8' => 28996,
+ '10' => 29253,
+ '2' => 28980,
+ '5' => 29492,
+ '7' => 28997,
+ '1' => 28981,
+ '6' => 29493,
+ '3' => 29236,
+ '12' => 29509
+ },
'33729' => {
- '0' => 33329,
'3' => 33298,
- '1' => 33347,
- '6' => 33345,
'4' => 33315,
'2' => 33346,
+ '1' => 33347,
+ '0' => 33329,
+ '6' => 33345,
'5' => 33314
},
- '4388' => {
- '4' => 8746,
- '3' => 8747,
- '8' => 8742,
- '5' => 8745,
- '2' => 8736,
- '6' => 8744,
- '1' => 8737,
- '7' => 8743
- },
- '33808' => {
- '2' => 33809
- },
- '4113' => {
- '8' => 8535,
- '4' => 8451,
- '3' => 8450,
- '6' => 8453,
- '1' => 8448,
- '7' => 8534,
- '5' => 8452,
- '2' => 8449
- },
- '33317' => {
- '10' => 29952,
- '11' => 30209,
- '2' => 29699,
- '5' => 30211,
- '9' => 29953,
- '7' => 29696,
- '1' => 29698,
- '12' => 30208,
- '6' => 30210,
- '8' => 29697,
- '3' => 29955,
- '4' => 29954
+ '33318' => {
+ '10' => 29970,
+ '8' => 29715,
+ '2' => 29731,
+ '4' => 29986,
+ '11' => 30227,
+ '9' => 29971,
+ '1' => 29730,
+ '6' => 30242,
+ '5' => 30243,
+ '7' => 29714,
+ '12' => 30226,
+ '3' => 29987
},
- '33382' => {
- '8' => 28964,
- '3' => 29204,
- '4' => 29205,
- '11' => 29476,
- '10' => 29221,
- '9' => 29220,
- '12' => 29477,
- '7' => 28965,
- '1' => 28949,
- '6' => 29461,
- '2' => 28948,
- '5' => 29460
+ '34304' => {
+ '2' => 34305
},
- '33368' => {
- '7' => 28739,
- '12' => 28771,
- '1' => 28741,
- '9' => 28754,
- '6' => 28773,
- '2' => 28740,
- '5' => 28772,
- '11' => 28770,
- '10' => 28755,
- '3' => 28756,
- '4' => 28757,
- '8' => 28738
+ '33378' => {
+ '3' => 29286,
+ '12' => 29527,
+ '5' => 29542,
+ '7' => 29015,
+ '9' => 29270,
+ '11' => 29526,
+ '4' => 29287,
+ '10' => 29271,
+ '8' => 29014,
+ '1' => 29031,
+ '2' => 29030,
+ '6' => 29543
},
+ '4404' => {
+ '7' => 8752,
+ '5' => 8755,
+ '6' => 8754,
+ '2' => 8758,
+ '1' => 8759,
+ '8' => 8753,
+ '4' => 8756,
+ '3' => 8757
+ },
'32787' => {
- '0' => 35328,
+ '3' => 35331,
'5' => 35333,
- '2' => 35330,
- '4' => 35332,
+ '0' => 35328,
'1' => 35329,
- '3' => 35331
+ '2' => 35330,
+ '4' => 35332
},
- '4129' => {
- '1' => 8192,
- '7' => 8199,
- '3' => 8194,
- '6' => 8197,
- '4' => 8195,
- '2' => 8193,
- '5' => 8196
+ '33738' => {
+ '6' => 33352,
+ '4' => 33351,
+ '1' => 33319,
+ '0' => 33370,
+ '2' => 33304,
+ '5' => 33350,
+ '3' => 33320
+ },
+ '35333' => {
+ '4' => 24659,
+ '8' => 24662,
+ '6' => 24660,
+ '7' => 24661
+ },
+ '4131' => {
+ '6' => 8277,
+ '4' => 8275,
+ '2' => 8273,
+ '1' => 8272,
+ '7' => 8278,
+ '5' => 8276,
+ '3' => 8274
},
- '33739' => {
- '1' => 33337,
- '3' => 33366,
- '4' => 33321,
- '2' => 33353,
- '5' => 33354,
- '0' => 33369
+ '33303' => {
+ '7' => 30530,
+ '5' => 31059,
+ '6' => 31058,
+ '1' => 30546,
+ '3' => 30803,
+ '12' => 31042,
+ '9' => 30787,
+ '11' => 31043,
+ '8' => 30531,
+ '2' => 30547,
+ '10' => 30786,
+ '4' => 30802
},
- '33376' => {
- '4' => 29367,
- '3' => 29366,
- '8' => 29094,
- '5' => 29622,
- '2' => 29110,
- '6' => 29623,
- '9' => 29350,
- '12' => 29607,
- '1' => 29111,
- '7' => 29095,
- '10' => 29351,
- '11' => 29606
+ '33430' => {
+ '4' => 30757,
+ '10' => 30773,
+ '8' => 30516,
+ '2' => 30500,
+ '9' => 30772,
+ '11' => 31028,
+ '6' => 31013,
+ '1' => 30501,
+ '7' => 30517,
+ '5' => 31012,
+ '12' => 31029,
+ '3' => 30756
+ },
+ '4433' => {
+ '3' => 8786,
+ '7' => 8790,
+ '5' => 8788,
+ '6' => 8789,
+ '4' => 8787,
+ '8' => 8791,
+ '2' => 8785,
+ '1' => 8784
+ },
+ '4100' => {
+ '2' => 8489,
+ '8' => 8495,
+ '1' => 8488,
+ '4' => 8491,
+ '6' => 8493,
+ '5' => 8492,
+ '7' => 8494,
+ '3' => 8490
+ },
+ '4096' => {
+ '0' => 4097,
+ '1' => 4098,
+ '2' => 4099,
+ '3' => 4100
+ },
+ '33384' => {
+ '9' => 29284,
+ '11' => 29540,
+ '4' => 29269,
+ '10' => 29285,
+ '2' => 29012,
+ '8' => 29028,
+ '7' => 29029,
+ '5' => 29524,
+ '6' => 29525,
+ '1' => 29013,
+ '3' => 29268,
+ '12' => 29541
+ },
+ '33386' => {
+ '3' => 29348,
+ '12' => 29621,
+ '7' => 29109,
+ '5' => 29604,
+ '6' => 29605,
+ '1' => 29093,
+ '11' => 29620,
+ '9' => 29364,
+ '10' => 29365,
+ '2' => 29092,
+ '8' => 29108,
+ '4' => 29349
+ },
+ '33445' => {
+ '3' => 31239,
+ '9' => 31495,
+ '7' => 31492,
+ '10' => 31494,
+ '1' => 31236,
+ '2' => 31237,
+ '8' => 31493,
+ '4' => 31238
+ },
+ '4114' => {
+ '3' => 8538,
+ '6' => 8541,
+ '2' => 8537,
+ '8' => 8543,
+ '1' => 8536,
+ '4' => 8539,
+ '7' => 8542,
+ '5' => 8540
+ },
+ '34560' => {
+ '2' => 34561
+ },
+ '33348' => {
+ '7' => 28960,
+ '11' => 29473,
+ '9' => 29217,
+ '5' => 29457,
+ '6' => 29456,
+ '4' => 29200,
+ '2' => 28945,
+ '1' => 28944,
+ '8' => 28961,
+ '10' => 29216,
+ '3' => 29201,
+ '12' => 29472
+ },
+ '33411' => {
+ '3' => 30022,
+ '12' => 30263,
+ '5' => 30278,
+ '7' => 29751,
+ '1' => 29767,
+ '6' => 30279,
+ '9' => 30006,
+ '11' => 30262,
+ '4' => 30023,
+ '10' => 30007,
+ '8' => 29750,
+ '2' => 29766
},
- '4128' => {
- '0' => 4129,
- '1' => 4130,
- '3' => 4132,
- '2' => 4131
+ '4099' => {
+ '3' => 8482,
+ '7' => 8486,
+ '5' => 8484,
+ '6' => 8485,
+ '4' => 8483,
+ '8' => 8487,
+ '2' => 8481,
+ '1' => 8480
},
- '33362' => {
- '8' => 28743,
- '3' => 28753,
- '4' => 28752,
- '10' => 28758,
- '11' => 28775,
- '2' => 28737,
- '5' => 28769,
- '1' => 28736,
- '7' => 28742,
- '12' => 28774,
- '9' => 28759,
- '6' => 28768
+ '33285' => {
+ '8' => 31488,
+ '1' => 31233,
+ '10' => 31490,
+ '2' => 31232,
+ '4' => 31234,
+ '9' => 31491,
+ '7' => 31489,
+ '3' => 31235
},
- '33369' => {
- '10' => 28803,
- '11' => 28818,
- '2' => 28788,
- '5' => 28820,
- '7' => 28787,
- '1' => 28789,
- '9' => 28802,
- '12' => 28819,
- '6' => 28821,
- '8' => 28786,
- '3' => 28804,
- '4' => 28805
+ '4388' => {
+ '3' => 8747,
+ '7' => 8743,
+ '5' => 8745,
+ '6' => 8744,
+ '4' => 8746,
+ '8' => 8742,
+ '2' => 8736,
+ '1' => 8737
+ },
+ '33304' => {
+ '9' => 30819,
+ '7' => 30562,
+ '8' => 30563,
+ '2' => 30579,
+ '10' => 30818,
+ '1' => 30578,
+ '4' => 30834,
+ '3' => 30835
},
- '33352' => {
- '7' => 29010,
- '12' => 29522,
- '1' => 29026,
- '9' => 29267,
- '6' => 29538,
- '2' => 29027,
- '5' => 29539,
- '11' => 29523,
- '10' => 29266,
- '3' => 29283,
- '4' => 29282,
- '8' => 29011
+ '33793' => {
+ '6' => 18498,
+ '4' => 18512,
+ '1' => 18515,
+ '8' => 18496,
+ '2' => 18514,
+ '10' => 18482,
+ '7' => 18497,
+ '11' => 18481,
+ '9' => 18483,
+ '5' => 18499,
+ '12' => 18480,
+ '3' => 18513
},
- '4386' => {
- '5' => 8995,
- '2' => 8998,
- '6' => 8994,
- '7' => 8993,
- '1' => 8999,
- '8' => 8992,
- '4' => 8996,
- '3' => 8997
+ '4401' => {
+ '3' => 9021,
+ '1' => 9023,
+ '8' => 9016,
+ '2' => 9022,
+ '4' => 9020,
+ '6' => 9018,
+ '5' => 9019,
+ '7' => 9017
+ },
+ '4116' => {
+ '1' => 8456,
+ '8' => 8463,
+ '2' => 8457,
+ '4' => 8459,
+ '6' => 8461,
+ '5' => 8460,
+ '7' => 8462,
+ '3' => 8458
},
+ '33368' => {
+ '10' => 28755,
+ '2' => 28740,
+ '8' => 28738,
+ '4' => 28757,
+ '11' => 28770,
+ '9' => 28754,
+ '1' => 28741,
+ '6' => 28773,
+ '5' => 28772,
+ '7' => 28739,
+ '12' => 28771,
+ '3' => 28756
+ },
'4115' => {
- '2' => 8465,
+ '3' => 8466,
'5' => 8468,
- '1' => 8464,
'7' => 8454,
- '6' => 8469,
+ '4' => 8467,
+ '1' => 8464,
+ '2' => 8465,
'8' => 8455,
- '3' => 8466,
- '4' => 8467
+ '6' => 8469
},
- '33416' => {
- '8' => 29796,
- '4' => 30037,
- '3' => 30036,
- '10' => 30053,
- '11' => 30308,
- '5' => 30292,
- '2' => 29780,
- '6' => 30293,
- '12' => 30309,
- '9' => 30052,
- '1' => 29781,
- '7' => 29797
- },
- '34816' => {
- '0' => 2,
- '2' => 288
- },
- '33809' => {
- '4' => 18464,
- '3' => 18465,
- '8' => 18448,
- '5' => 18451,
- '2' => 18466,
- '6' => 18450,
- '12' => 18432,
- '7' => 18449,
- '1' => 18467,
- '9' => 18435,
- '10' => 18434,
- '11' => 18433
+ '33426' => {
+ '1' => 30551,
+ '6' => 31063,
+ '5' => 31062,
+ '7' => 30535,
+ '12' => 31047,
+ '3' => 30806,
+ '4' => 30807,
+ '2' => 30550,
+ '10' => 30791,
+ '8' => 30534,
+ '11' => 31046,
+ '9' => 30790
},
'4371' => {
- '8' => 8728,
'3' => 8733,
'4' => 8732,
'2' => 8734,
- '5' => 8731,
'1' => 8735,
- '7' => 8729,
- '6' => 8730
- },
- '35331' => {
- '2' => 24641,
- '3' => 24642,
- '1' => 24640
- },
- '33364' => {
- '10' => 28710,
- '11' => 28727,
- '5' => 28721,
- '2' => 28689,
- '6' => 28720,
- '9' => 28711,
- '12' => 28726,
- '7' => 28694,
- '1' => 28688,
- '8' => 28695,
- '4' => 28704,
- '3' => 28705
- },
- '35333' => {
- '8' => 24662,
- '6' => 24660,
- '7' => 24661,
- '5' => 24659
- },
- '33413' => {
- '2' => 29702,
- '5' => 30214,
- '7' => 29701,
- '9' => 29956,
- '12' => 30213,
- '1' => 29703,
- '6' => 30215,
- '10' => 29957,
- '11' => 30212,
- '3' => 29958,
- '4' => 29959,
- '8' => 29700
- },
- '33737' => {
- '0' => 33414,
- '1' => 33432,
- '3' => 33431,
- '6' => 33382,
- '4' => 33415,
- '2' => 33383
- },
- '4160' => {
- '3' => 4164,
- '1' => 4162,
- '2' => 4163,
- '0' => 4161
- },
- '4112' => {
- '1' => 4114,
- '3' => 4116,
- '2' => 4115,
- '0' => 4113
- },
- '33444' => {
- '12' => 31542,
- '7' => 31510,
- '9' => 31527,
- '1' => 31254,
- '6' => 31286,
- '2' => 31255,
- '5' => 31287,
- '11' => 31543,
- '10' => 31526,
- '3' => 31271,
- '4' => 31270,
- '8' => 31511
- },
- '33410' => {
- '4' => 30055,
- '3' => 30054,
- '8' => 29782,
- '5' => 30310,
- '2' => 29798,
- '6' => 30311,
- '12' => 30295,
- '9' => 30038,
- '1' => 29799,
- '7' => 29783,
- '10' => 30039,
- '11' => 30294
- },
- '32792' => {
- '0' => 33733,
- '6' => 34944,
- '4' => 33732,
- '1' => 33734,
- '3' => 33731,
- '5' => 33739,
- '2' => 33735
- },
- '33386' => {
- '4' => 29349,
- '3' => 29348,
- '8' => 29108,
- '6' => 29605,
- '1' => 29093,
- '9' => 29364,
- '12' => 29621,
- '7' => 29109,
- '5' => 29604,
- '2' => 29092,
- '11' => 29620,
- '10' => 29365
- }
+ '8' => 8728,
+ '6' => 8730,
+ '5' => 8731,
+ '7' => 8729
+ }
);
--- /dev/null
+#!/usr/bin/perl -w
+###################
+# JAM2019 - cronjob script to gather accumulated run statistics from oracle
+# v0.1 on 28-feb-2019 (j.adamczewski@gsi.de)
+
+use English;
+use strict;
+use Getopt::Long;
+use Data::Dumper;
+#use Scalar::Util qw(reftype);
+use IO::Socket;
+use IO::Select;
+use FileHandle;
+use Time::Local;
+use DateTime;
+use threads;
+use threads::shared;
+
+use DBI;
+use DBD::ODBC;
+
+#my $cmd_server_port = 4799;
+#my $cmd_server_prtcl = 'tcp';
+#my $opt_sport = 50998; # open this port for status server
+my $opt_help = 0;
+my $opt_verb = 0;
+#my $opt_oracle = 0;
+
+# JAM optionally change account here:
+my $orauser = 'DAQ_PUB';
+my $orapass = 'hades';
+#my $oradatabase = 'db-hades-test';
+my $oradatabase = 'db-hades';
+
+
+
+# JAM real passwords are delivered by command line options now.
+
+
+GetOptions ('h|help' => \$opt_help,
+ 'v|verb' => \$opt_verb,
+# 'o|oracle' => \$opt_oracle,
+ 'opass=s' => \$orapass,
+ );
+
+if( $opt_help ) {
+ &help();
+ exit(0);
+}
+
+
+
+
+
+# JAM here definition of table names
+my $oraruns = 'daq.daq_runs';
+
+my $ExitCode : shared = -1;
+my $status : shared = "OK";
+
+#- POSIX signal handlers: see signal(7) or kill(1) for available signals
+foreach my $signal ( qw(HUP INT QUIT ILL ABRT FPE SEGV TERM USR1 USR2) ){
+ $SIG{$signal} = sub { &finishAndExit( $signal ); };
+}
+
+
+my $app_logfile = "/home/hadaq/log/runstatsfromora.log";
+
+#- Daemonize
+# if($opt_daemon){
+# open(STDIN, '>/dev/null');
+# open(STDOUT, ">$app_logfile") || die "Cannot redirect STDOUT";
+# open(STDERR, ">&STDOUT") || die "Cannot dup STDERR";
+# select STDERR; $| = 1; # make unbuffered
+# select STDOUT; $| = 1; # make unbuffered
+# }
+
+
+# JAM2016 - we do not need statusserver for cronjob
+#-------- Start status server thread
+# threads->new( \&statusServer );
+# TODO if we should work with statusserver/daemon mode later, still need infinite main loop with check of time
+
+
+#-------- need to explicitely set oracle environment if this was started by icinga restarthandler (not-login ssh!)
+$ENV{ORACLE_HOME}='/usr/lib/oracle/12.1/client64';
+$ENV{LD_LIBRARY_PATH}='/usr/lib/oracle/12.1/client64/lib';
+
+#-------- Connect the database
+#$status = "Try to connect to the Oracle Data Base ...";
+print "Try to connect to the Oracle Data Base ...\n" if($opt_verb);
+
+#- Disable autocommit and enable error handling
+#print "database=$oradatabase, user=$orauser,pass=$orapass \n";
+my $oradbh = DBI->connect( "dbi:Oracle:$oradatabase", $orauser, $orapass, {AutoCommit=>0, RaiseError=>1, 'PrintError'=>1})
+ or die "Couldn't connect to oracle database: " . DBI->errstr;
+#my $dbh = DBI->connect( "dbi:Oracle:$database", $user,$pass, {AutoCommit=>0});
+print "Oracle Connected!\n" if($opt_verb);
+#print Dumper $oradbh;
+
+
+
+
+
+
+my $summary_file = "/home/hadaq/oper/oraruns/runs_mar19.txt";
+my $latest_file = "/home/hadaq/oper/oraruns/current_mar19.txt";
+
+
+#exit(0);
+# test only connection up to here
+my $beamtime = 'MAR19';
+my $runtype = 'BEAM';
+
+
+# JAM2019: the plan is to update file of run statistics once per day
+#my $dt = DateTime->now - DateTime::Duration->new( days => 1 );
+# -> one day before today
+#my $impDay = $dt->ymd;
+#import day ( = yesterday) defined by perl program
+
+
+#my $runBegin = "$impDay 00:00:00.000000";
+#begin of import day
+#my $runEnd = "$impDay 23:59:59.999999";
+
+# alternatively we could do it hourly:
+#my $dtBegin = DateTime->now - DateTime::Duration->new( hours => 1 );
+#my $dtEnd = DateTime->now ;
+# -> one hour before today
+#my $runBegin = "$dtBegin->ymd('-') $dtBegin->hms(':')";
+#my $runEnd = "$dtEnd->ymd('-') $dtEnd->hms(':')";
+
+# this one is for testing
+my $runBegin = '2019-02-20 00:00:00';
+# default is begin of beam time with real beam
+# will be replaced by last timestamp from summary file.
+
+#my $runEnd = '2019-02-28 00:00:00';
+
+# end of summary period: one hour ago
+my $dtEnd = DateTime->now - DateTime::Duration->new( minutes => 15);
+$dtEnd->set_time_zone("Europe/Berlin");
+my $runEnd = sprintf("%s %s",$dtEnd->ymd, $dtEnd->hms);
+my $lastRunid =0;
+
+my $sumevents=0;
+my $sumbytes=0;
+my $sumfiles=0;
+
+&getLastStatistics();
+print "Got begin:$runBegin end:$runEnd, last kevents:$sumevents, last Gbytes:$sumbytes\n";
+#if($opt_verb);
+
+open( OUTFILE, '>>', $summary_file ) or die "Could not open $summary_file for writing ! \n";
+open( OUTLATEST, '>', $latest_file ) or die "Could not open $latest_file for writing ! \n";
+
+&putSummaryHeader() or die "Failed to write run statistics header\n";
+
+&readRunStatistics() or die "Failed to access beamtime run table\n";
+
+print "Found $sumevents events, $sumbytes bytes, $sumfiles files of type $runtype in this period.\n" if ($opt_verb);
+
+print OUTLATEST "$sumevents \t$sumbytes \n" or die "Could not write to latest sum file";
+
+#-------- Finish and disconnect
+&finishAndDisconnect();
+
+close(OUTFILE) || die "Couldn't close file $summary_file properly";
+close(OUTLATEST) || die "Couldn't close file $latest_file properly";
+
+print "Gathering run statistics finished successfully.\n";
+#if ($opt_verb);
+exit(0);
+
+
+
+
+
+sub help()
+{
+ print "\n";
+ print << 'EOF';
+runstatsfromora.pl
+
+ This script collects statistics of beam runs from oracle
+Usage:
+
+ Command line: postgres2ora.pl
+ [-h|--help] : Print this help.
+ [-opass orapass] : Specify password for Oracle database
+ [-v|--verb] : More verbose.
+
+Examples:
+
+ Gets run statistics from oracle between previous update and now, and be verbose:
+ runstatsfromora.pl -v -opass <secret>
+
+EOF
+}
+
+sub finishAndDisconnect()
+{
+ if(defined $oradbh){
+ $oradbh->disconnect || die "Failed to disconnect from Oracle\n";
+ }
+}
+
+sub finishAndExit()
+{
+ # don't allow nested signal handling
+ return if ($ExitCode ne "-1");
+
+ # this will stop the treads, too
+ $ExitCode = shift;
+
+ print "runstatsfromora.pl exited (signal/exit code: $ExitCode).\n";
+
+ &finishAndDisconnect();
+
+ # wait until all threads ended - don't join the main thread or ourselves
+# foreach my $thread (threads->list()){
+# $thread->join()
+# if ($thread->tid() && !threads::equal( $thread, threads->self() ));
+# }
+
+ close(STDOUT);
+ close(STDERR);
+
+ exit(1);
+}
+
+
+
+
+sub readRunStatistics()
+{
+
+my $orasth_runstats = $oradbh->prepare(" SELECT run_id,
+ TO_CHAR(run_start,'YYYY-MM-DD HH24:MI:SS'),
+ TO_CHAR(run_stop,'YYYY-MM-DD HH24:MI:SS'),
+ sum_events, sum_bytes, num_files
+ FROM daq.daq_runs_sum
+ WHERE run_start > to_date('$runBegin','YYYY-MM-DD HH24:MI:SS')
+ AND run_start <= to_date('$runEnd','YYYY-MM-DD HH24:MI:SS')
+ AND run_type_id = '$runtype'
+ AND exp_id = '$beamtime'
+ ORDER BY run_start") or die "Couldn't prepare statement: " . $oradbh->errstr;
+
+
+$orasth_runstats->execute() or die "Couldn't execute statement: " . $orasth_runstats;
+
+my $success = 1;
+my @data;
+my $count=0;
+while (@data = $orasth_runstats->fetchrow_array()) {
+ $count++;
+ my $kevents = $data[3]/1000;
+ my $gbytes = $data[4]/(1024*1024*1024);
+ my $files = $data[5];
+ print "run \t$data[0] start at $data[1] has $kevents kevents, $gbytes Gbytes in $files files \n" if ($opt_verb);
+ $sumevents += $kevents;
+ $sumbytes += $gbytes;
+ $sumfiles += $files;
+ print OUTFILE "$data[0] \t$data[1] \t$kevents \t$gbytes \t$sumevents \t$sumbytes \n" or die "Could not append output file";
+ }
+
+ # if nothing was fetched recently, put last amount for current time. runid however does not correspond to current time! TODO
+ if($count == 0)
+ {
+ my $null=0;
+ print OUTFILE "$lastRunid \t$runEnd \t$null \t$null \t$sumevents \t$sumbytes \n" or die "Could not append output file";
+ }
+
+$orasth_runstats->finish();
+return $success;
+}
+
+sub getLastStatistics()
+{
+my $rev=open( IFILE, '<', $summary_file);
+ if(!$rev)
+ {
+ # we do not have file, just set empty number with template:
+ print "Could not open $summary_file . Starting sums from zero.\n";
+ }
+ else
+ {
+ my $runid;
+ my $timestamp;
+ my $skevents;
+ my $sgbytes;
+ my @runs= <IFILE>;
+ # TODO: do not scan everything, but take last line - PROBLEM: if empty comment is last line due to beam off on previous day, we will get into trouble
+ foreach my $line (@runs) {
+ #ignore comments:
+ #- Remove all comments and whitespace:
+ next if ($line =~ /^\s*($|#)/);
+ # rather scan everything, my $line=pop(@runs);
+ my @larray=split(/\s+/,$line);
+
+ $runid= $larray[0];
+ $timestamp="$larray[1] $larray[2]";
+ $skevents=$larray[5];
+ $sgbytes=$larray[6];
+ print "getLastStatistics has at time $timestamp kevents $skevents and $sgbytes Gbytes \n" if ($opt_verb);
+ }
+
+
+ close(IFILE) || die "Couldn't close file $summary_file properly";
+ $sumevents=$skevents;
+ $sumbytes=$sgbytes;
+ $runBegin=$timestamp;
+ $lastRunid=$runid;
+ }
+
+
+
+return 1;
+
+}
+sub putSummaryHeader()
+{
+# TODO
+
+
+print "Updating run summary file $summary_file ...\n" if ($opt_verb);
+
+
+
+# first provide output file with standard header:
+ my ($sec, $min, $hr, $day, $mon, $year) = localtime;
+my $timestamp= sprintf("%02d.%02d.%04d at %02d:%02d:%02d",$day, $mon + 1, 1900 + $year, $hr, $min, $sec);
+
+
+print OUTFILE "###############################################################################\n";
+print OUTFILE "# Run summary file for beamtime $beamtime\n";
+print OUTFILE "# This file was generated from runstatsfromora.pl\n";
+print OUTFILE "# Updated: $timestamp\n";
+print OUTFILE "# \n";
+print OUTFILE "# run_id date time \t\tkEvents \t Gbytes \t\tkEventsSum \t GbytesSum\n";
+print OUTFILE "###############################################################################\n";
+
+
+print "Run summary file updated at $timestamp\n";
+
+print OUTLATEST "# Updated: $timestamp\n";
+print OUTLATEST "# kEventsSum \t GbytesSum\n";
+
+
+return 1;
+}
+
+
+
+
+
+# sub statusServer()
+# {
+# my $server_socket;
+# my $client_socket;
+# my $selector;
+#
+# unless (defined( $server_socket =
+# IO::Socket::INET->new( LocalPort => $opt_sport,
+# Proto => 'tcp',
+# Listen => SOMAXCONN ) ))
+# {
+# print "ERROR: Cannot start status server!\n";
+# }
+#
+# $selector = new IO::Select( $server_socket );
+#
+# while(1) {
+#
+# # wait 5 seconds for connections
+# while (my @file_handles = $selector->can_read( 5 )) {
+#
+# foreach my $file_handle (@file_handles) {
+#
+# if($file_handle == $server_socket) {
+#
+# # create a new socket for this transaction
+# unless (defined( $client_socket = $server_socket->accept() ))
+# {
+# print "ERROR: Cannot open socket to send status!\n";
+# &exitProgram( 2 );
+# }
+#
+# print $client_socket $status;
+#
+# close( $client_socket );
+# }
+# }
+# }
+#
+# if( $ExitCode ne "-1" ){
+# print "Exit status server thread.\n";
+# close( $server_socket );
+# return;
+# }
+# }
+# }
--- /dev/null
+#!/bin/bash
+
+offset=2340000
+cat <<EOF > /tmp/beam_trend.txt
+# timestamp real propaganda
+$(date -d @1551679200 "+%Y-%m-%d %H:%M:%S") 0 0
+$(date -d @$((1551679200+offset)) "+%Y-%m-%d %H:%M:%S") $(($offset*25/3600)) $(($offset*20/3600))
+EOF
+
+gnuplot -p <<ENDS
+
+set term png size 800,500 truecolor font "serif,17"
+set out "/tmp/runstats.png"
+
+
+set key left top
+#set title "HADES Accumulated Statistics 2019"
+set xlabel "March 2019"
+set ylabel "Million Events"
+#set y2label "Recorded Data [Gbyte]"
+#set y2tics
+#set ytics nomirror
+set style line 1 lt rgb "#000000" lw 3 #dd7700
+set style line 2 lt rgb "#008800" lw 2
+set style line 3 lt rgb "#5ce000" lw 2 #ffc155
+set style fill transparent solid 0.4 border lc "#5ce000" #ffc155
+set yrange [0:16300]
+
+f(x) = 21./3600 * (x-1551679200);
+g(x) = 24./3600 * (x-1551679200);
+
+set xdata time
+set timefmt "%Y-%m-%d %H:%M:%S"
+set format x "%d"
+#set timefmt "%H:%M:%S"
+#set format x "%H:%M"
+set xrange ["2019-03-03":"2019-04-01"]
+set xtics 3600*24*4
+
+plot '/tmp/beam_trend.txt' using 1.2:3:4 title 'Anticipated Events'ls 3 w filledcu, \
+ '/home/hadaq/oper/oraruns/runs_mar19.txt' using 2.3:(\$6/1000) title 'Recorded Events' ls 1 with lines
+
+# '/home/hadaq/oper/oraruns/runs_mar19.txt' using 2.3:7 ls 2 with lines axes x1y2
+
+
+ENDS
+
+
+scp /tmp/runstats.png hades33:/home/hadaq/trbsoft/daq/hmon/files/runstatscompare.png
+scp /tmp/runstats.png lxi001:/u/webhades/web-docs/media/logbook/mar19/
-addresses_dirich.db_20180829
\ No newline at end of file
+addresses_dirich.db_20190213
\ No newline at end of file
078 0x5c000001fc5dd128
# 034 0xd7000001241ee528
050 0xe500000123f24b28
-
--- /dev/null
+./setThresholdsS1To0000.sh &
+./setThresholdsS2To0000.sh &
+./setThresholdsS3To0000.sh &
+./setThresholdsS4To0000.sh &
+./setThresholdsS5To0000.sh &
+./setThresholdsS6To0000.sh &
--- /dev/null
+command_client.pl -e etraxp059 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp067 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp052 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp124 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp059 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp067 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp068 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp056 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp059 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp067 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp052 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp124 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
command_client.pl -e etraxp055 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp085 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp065 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
-command_client.pl -e etraxp063 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
+command_client.pl -e etraxp063 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
--- /dev/null
+command_client.pl -e etraxp055 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp085 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp065 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp063 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp094 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp085 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp065 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp063 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp055 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp085 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp065 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp063 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
command_client.pl -e etraxp089 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp031 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp040 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
-command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
+command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
--- /dev/null
+command_client.pl -e etraxp089 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp031 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp040 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp089 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp031 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp040 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp089 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp031 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp040 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
--- /dev/null
+command_client.pl -e etraxp089 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
+#command_client.pl -e etraxp031 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
+#command_client.pl -e etraxp040 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
+#command_client.pl -e etraxp074 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
command_client.pl -e etraxp092 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp083 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp075 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
-command_client.pl -e etraxp061 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
+command_client.pl -e etraxp061 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
--- /dev/null
+command_client.pl -e etraxp092 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp083 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp075 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp061 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp091 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp080 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp078 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp122 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp092 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp083 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp075 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp061 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
command_client.pl -e etraxp054 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp053 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp110 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
-command_client.pl -e etraxp051 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
+command_client.pl -e etraxp051 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
--- /dev/null
+command_client.pl -e etraxp054 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp053 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp110 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp051 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp054 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp053 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp052 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp051 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp054 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp053 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp110 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp051 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
command_client.pl -e etraxp091 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp080 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
command_client.pl -e etraxp078 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
-command_client.pl -e etraxp050 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV'
+command_client.pl -e etraxp050 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_40mV' &
--- /dev/null
+command_client.pl -e etraxp091 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp080 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp078 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
+command_client.pl -e etraxp050 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_0000' &
-command_client.pl -e etraxp092 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp083 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp075 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
-command_client.pl -e etraxp061 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF'
+command_client.pl -e etraxp091 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp080 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp078 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
+command_client.pl -e etraxp050 -c '/home/hadaq/bin/spi_trbv2_5 /home/hadaq/rpc/configFile_FFFF' &
-command_client.pl -e etraxp091 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_091'
+command_client.pl -e etraxp092 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_091'
-command_client.pl -e etraxp092 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_092'
+command_client.pl -e etraxp091 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_092'
command_client.pl -e etraxp059 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_059'
-command_client.pl -e etraxp094 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_094'
+command_client.pl -e etraxp055 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_055'
command_client.pl -e etraxp089 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_089'
-command_client.pl -e etraxp091 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_091'
-command_client.pl -e etraxp054 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_054'
command_client.pl -e etraxp092 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_092'
+command_client.pl -e etraxp054 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_054'
+command_client.pl -e etraxp091 -c 'spi_trbv2_5 /home/hadaq/rpc/triggerBoards/triggerBoard_091'
--- /dev/null
+export PATH=$PATH:~/trbsoft/daqtools/tools
+
+export TRBNETDPID=$(pgrep -f "trbnetd -i 96")
+export DAQOPSERVER=lxhadeb06p:96
+
+
+echo "- trbnetd pid: $TRBNETDPID"
+
+if [[ -z "$TRBNETDPID" ]]
+then
+ TRB3_SERVER=trbp096 LD_LIBRARY_PATH=~/trbsoft/trbnettools/libtrbnet trbnetd -i 96
+fi
+
+trbcmd reset
+
+trbcmd s 0x86000004fa256728 5 0xc000
+trbcmd s 0x2e000004fa189128 0 0x1000
+trbcmd s 0xc4000004fa1b3a28 1 0x1001
+trbcmd s 0x45000004fa16ae28 2 0x1002
+trbcmd s 0xc3000004fa140d28 3 0x1003
+
+trbcmd w 0xfffe 0xc5 0x50ff
+echo "GbE settings"
+loadregisterdb.pl db/register_configgbe.db
+loadregisterdb.pl db/register_configgbe_ip.db
+
+echo "TDC settings"
+loadregisterdb.pl db/register_configtdc.db
+
+tmux new-session -d -s spillmon "cd ~/trbsoft/daqtools/web; export DAQOPSERVER=lxhadeb06p:96; ./cts_gui --endpoint=0xc000 --noopenxterm --port 1296; sleep 10"
+
+trbcmd w 0xc000 0xa156 0x0000270f # 10kHz trigger
+trbcmd w 0xc000 0xa156 0x000007cf # 50kHz trigger
+#trbcmd w 0xc000 0xa156 0x0001869f # 1kHz trigger
+trbcmd setbit 0xc000 0xa101 0x2
+
+#trbcmd w 0x1002 0xc802 0x00000000 # disable TDC3
+#trbcmd w 0x1002 0xc803 0x00000000 # disable TDC3
+
+trbcmd w 0x1003 0xc802 0x00000000 # disable TDC4
+trbcmd w 0x1003 0xc803 0x00000000 # disable TDC4
+
+
+#trbcmd w 0x1000 0xc801 0x870007f0 # 10us window before, enabled
+#trbcmd w 0x1001 0xc801 0x870007f0 # 10us window before, enabled
+
+trbcmd w 0x1000 0xc802 0x55555555 # enable each second channels in 1st TDC
+trbcmd w 0x1001 0xc802 0x55555555
+trbcmd w 0x1002 0xc802 0x55555555
+
# 1. NINO (StartX)
# Board Chain ChainLen DAC Channel Command Value
- 5000 1 2 0 0 3 0x5500 # ---Glob. Thres #1
+ 5000 1 2 0 0 3 0x4500 # ---Glob. Thres #1
5000 1 2 0 1 3 0x7000 #
5000 1 2 0 2 3 0x7000 # --- Str. 9-10ns, 7-20ns, 6 - 30ns, 5-70ns
5000 1 2 0 3 3 0x7000 #
5000 1 2 1 7 3 0x7000 # ch. 8
# 2.NINO (StartX)
#############################################################################
- 5000 2 2 0 0 3 0x5500 # ---Glob. Thres #2
+ 5000 2 2 0 0 3 0x4500 # ---Glob. Thres #2
5000 2 2 0 1 3 0x5000 #
5000 2 2 0 2 3 0x7000 # --- Str. 9-20ns, 7-30ns, 5-80ns
5000 2 2 0 3 3 0x5000 #
5000 2 2 1 1 3 0x7000 ### ch. 3
5000 2 2 1 2 3 0x7000 ### ch. 2
5000 2 2 1 3 3 0x7000 ### ch. 1
- 5000 2 2 1 4 3 0x7000 ### ch. 5
+ 5000 2 2 1 4 3 0x1000 ### ch. 5
5000 2 2 1 5 3 0x7000 ### ch. 6
5000 2 2 1 6 3 0x7000 ### ch. 7
5000 2 2 1 7 3 0x7000 ### ch. 8
#######
# 3.NINO (Start Y)
# Board Chain ChainLen DAC Channel Command Value
- 5001 1 2 0 0 3 0x5500 # ---Glob. Thres #3
+ 5001 1 2 0 0 3 0x4500 # ---Glob. Thres #3
5001 1 2 0 1 3 0x7000 #
5001 1 2 0 2 3 0x7000 # --- Str. 9-20ns, 7-30ns, 5-80ns
5001 1 2 0 3 3 0x7000 #
5001 1 2 1 7 3 0x7000 ### ch. 8
# 4.NINO (Start Y)
#############################################################################
- 5001 2 2 0 0 3 0x5500 # ---Glob. Thres #4
- 5001 2 2 0 1 3 0x5000 #
+ 5001 2 2 0 0 3 0x4500 # ---Glob. Thres #4
+ 5001 2 2 0 1 3 0x7000 #
5001 2 2 0 2 3 0x7000 # --- Str. 9-20ns, 7-30ns, 5-80ns
- 5001 2 2 0 3 3 0x5000 #
+ 5001 2 2 0 3 3 0x7000 #
5001 2 2 0 4 3 0xd000 # --- Hyst. min d
- 5001 2 2 0 5 3 0x9000
- 5001 2 2 0 6 3 0x9000
- 5001 2 2 0 7 3 0x9000
+ 5001 2 2 0 5 3 0x7000
+ 5001 2 2 0 6 3 0x7000
+ 5001 2 2 0 7 3 0x7000
5001 2 2 1 0 3 0x7000 ### ch. 4
5001 2 2 1 1 3 0x7000 ### ch. 3
5001 2 2 1 2 3 0x7000 ### ch. 2
#######
# 5. NINO (Veto)
# Board Chain ChainLen DAC Channel Command Value
- 5002 1 2 0 0 3 0x3000 # ---Glob. Thres #5
+ 5002 1 2 0 0 3 0x1200 # ---Glob. Thres #5
5002 1 2 0 1 3 0x5000 #
- 5002 1 2 0 2 3 0x7000 # --- Str. 9-10ns, 7-20ns, 6 - 30ns, 5-70ns
+ 5002 1 2 0 2 3 0x9000 # --- Str. 9-10ns, 7-20ns, 6 - 30ns, 5-70ns
5002 1 2 0 3 3 0x6000 #
5002 1 2 0 4 3 0xd000 # --- Hyst. min d
5002 1 2 0 5 3 0x8000
trbcmd setbit 0x5003 0xc800 0x40003000
# -2us +1000ns trigger window
-trbcmd w 0xfe48 0xc801 0x80c80190
+#trbcmd w 0xfe48 0xc801 0x80c80190
# -2us +200ns trigger window
#trbcmd w 0xfe48 0xc801 0x80280190
+#-1000 +50ns window
+ trbcmd w 0xfe48 0xc801 0x800a00c8
#Data limit
trbcmd w 0xfe48 0xc804 32 #32 words per channel