From bf3ed4491a3d10d8e9750851e2f5ce56f6af27ed Mon Sep 17 00:00:00 2001 From: Hadaq Hades Date: Thu, 30 Aug 2018 16:45:44 +0200 Subject: [PATCH] JAM: snapshot commit after changing some oracle scripts and repairing board config in db --- ecal/startup.script | 187 ++- evtbuild/eb_bnet_ltsm.conf | 6 +- evtbuild/start_eb_gbe.pl | 81 +- evtbuild/start_eb_gbe.sh | 1 - hmon/HPlot.pm | 14 +- hmon/QA.pm | 7 +- hmon/hmon_endpoints.pl | 13 +- hmon/hmon_richMagnet.pl | 36 +- hmon/hmon_rich_temp_backplane.pl | 36 +- hmon/hmon_richrate.pl | 42 +- hmon/hmon_startmon.pl | 0 hmon/hmon_trgerr.pl | 4 +- hmon/monitor.cgi | 6 +- hmon/permanent/hmon_magnet.pl | 4 +- .../hmon_open_ssh_master_channels.pl | 3 +- hmon/permanent/hmon_pionlv.pl | 0 hmon/permanent/hmon_pionsupply.pl | 0 hmon/permanent/hmon_qaplots.pl | 21 +- hmon/permanent/hmon_richhv.pl | 73 +- hmon/permanent/hmon_sequencer.pl | 78 +- hmon/permanent/hmon_spill.pl | 0 hmon/rich_drawing.htm | 23 +- hmon/speakdaemon.pl | 2 +- hmon/start.sh | 18 +- hub/register_configgbe_ip.db | 54 +- main/data_sources.db | 26 +- main/main_hades.script | 4 +- main/startup_briccolage.sh | 25 +- mdc/addresses_oep.db | 19 +- mdc/register_thresholds_current.db | 2 +- oracle/boards.txt | 1069 +++++++++++++++-- oracle/daq2stdout.pl | 91 +- oracle/postgres2ora.pl | 8 +- oracle/repairRich2ora.pl | 221 ++++ oracle/subevtids.txt | 46 +- rich/addresses_dirich.db | 2 +- rich/addresses_dirich_concentrator.db | 2 +- rich/startup.script | 2 + start/ThreshNinoStart.db | 62 +- start/addresses_trb3sc.db | 1 + start/serials_trb3sc.db | 2 + start/startup.script | 5 +- 42 files changed, 1816 insertions(+), 480 deletions(-) mode change 100644 => 100755 hmon/hmon_startmon.pl mode change 100755 => 100644 hmon/permanent/hmon_pionlv.pl mode change 100755 => 100644 hmon/permanent/hmon_pionsupply.pl mode change 100644 => 100755 hmon/permanent/hmon_spill.pl create mode 100755 oracle/repairRich2ora.pl diff --git a/ecal/startup.script b/ecal/startup.script index ee674eb..1c3c5da 100644 --- a/ecal/startup.script +++ b/ecal/startup.script @@ -3,82 +3,136 @@ set_addresses serials_trb3sc.db addresses_ecal.db !endif +# set trigger for cosmics -> not working! +#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 - # trbcmd w 0xfe71 0xc800 0x00000000 - # trbcmd w 0xfe71 0xc800 0x50003000 +#prepare PaDiWa-AMPS2 + +#set global thresholds +#DEACTIVATED FOR ECAL COSMIC TEST -> tuning by hand +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=2 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=3 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=4 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=5 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=6 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=7 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=8 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=9 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=10 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=11 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=12 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=13 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=14 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=15 --execute=pwm --data=0xd990 + + +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=0 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=1 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=2 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=3 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=4 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=5 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=6 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=7 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=8 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=9 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=10 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=11 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=12 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=13 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=14 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=15 --execute=pwm --data=0xd990 + + +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=0 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=1 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=2 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=3 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=4 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=5 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=6 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=7 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=8 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=9 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=10 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=11 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=12 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=13 --execute=pwm --data=0xd990 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=14 --execute=pwm --data=0x99c +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=15 --execute=pwm --data=0xd990 + - # trbcmd w 0xfe71 0xc804 0x00000000 - # trbcmd w 0xfe71 0xc804 0x00000078 - #prepare PaDiWa-AMPS2 - - #set thresholds - - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=2 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=3 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=4 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=5 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=6 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=7 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=8 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=9 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=10 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=11 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=12 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=13 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=14 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=15 --execute=pwm --data=0xd028 - - - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=0 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=1 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=2 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=3 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=4 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=5 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=6 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=7 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=8 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=9 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=10 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=11 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=12 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=13 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=14 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=15 --execute=pwm --data=0xd028 - - - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=0 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=1 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=2 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=3 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=4 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=5 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=6 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=7 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=8 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=9 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=10 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=11 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=12 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=13 --execute=pwm --data=0xd028 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=14 --execute=pwm --data=0xfe5 - exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=15 --execute=pwm --data=0xd028 - - - #set invert to 0xaaaa + +#thresholds for quiet TDCs +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=2 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=3 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=4 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=5 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=6 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=7 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=8 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=9 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=10 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=11 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=12 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=13 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=14 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=15 --execute=pwm --data=0x7777 + + +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=0 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=1 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=2 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=3 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=4 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=5 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=6 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=7 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=8 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=9 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=10 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=11 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=12 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=13 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=14 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --channel=15 --execute=pwm --data=0x7777 + + +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=0 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=1 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=2 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=3 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=4 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=5 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=6 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=7 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=8 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=9 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=10 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=11 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=12 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=13 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=14 --execute=pwm --data=0x7777 +#exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=15 --execute=pwm --data=0x7777 + + + +#set invert to 0xaaaa exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --execute=invert --data=0xaaaa exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=1 --execute=invert --data=0xaaaa exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --execute=invert --data=0xaaaa - #set dischargedelayselect to 20 +#set global dischargedelayselect to 20 exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=0 --execute=dischargedelayselect --data=20 exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=0 --channel=1 --execute=dischargedelayselect --data=20 @@ -131,10 +185,11 @@ exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=14 --execute=dischargedelayselect --data=20 exec_cmd{local} spi_slave.pl --endpoint=0xfe71 --chain=2 --channel=15 --execute=dischargedelayselect --data=20 + #Load TDC settings + load_register register_tdc_ecal.db - load_register register_monitoring_trigger.db #wait diff --git a/evtbuild/eb_bnet_ltsm.conf b/evtbuild/eb_bnet_ltsm.conf index d405be7..424d12c 100644 --- a/evtbuild/eb_bnet_ltsm.conf +++ b/evtbuild/eb_bnet_ltsm.conf @@ -71,10 +71,10 @@ QUEUESIZE: 32 BNETINP: 1 1 1 1 # JAM18 - following is default setup for the control button selection: -BNETBLD: 3 3 3 0 +#BNETBLD: 3 3 3 0 -## below not enough ltsm connections -#BNETBLD: 4 4 4 0 +## below not enough ltsm connections ? +BNETBLD: 4 4 4 0 # JAM - do not modify this anymore, please use control button "Restart BNET 1 Builder" instead #BNETBLD: 1 0 0 0 diff --git a/evtbuild/start_eb_gbe.pl b/evtbuild/start_eb_gbe.pl index 897f67d..fd7b347 100755 --- a/evtbuild/start_eb_gbe.pl +++ b/evtbuild/start_eb_gbe.pl @@ -62,26 +62,26 @@ read_config $opt_ebconf => %$temp_args_href; #print Dumper $temp_args_href; #exit; -# my %IP_GSI_lookup = ( -# '192.168.100.15' => '140.181.66.160', -# '192.168.100.12' => '140.181.76.94', -# '192.168.100.13' => '140.181.91.154', -# '192.168.100.14' => '140.181.88.20', -# '192.168.100.8' => '140.181.80.62', -# '192.168.100.9' => '140.181.80.64', -# '192.168.100.10' => '140.181.80.68' -# ); +my %IP_GSI_lookup = ( + '192.168.100.15' => '140.181.66.160', + '192.168.100.12' => '140.181.76.94', + '192.168.100.13' => '140.181.91.154', + '192.168.100.14' => '140.181.88.20', + '192.168.100.8' => '140.181.80.62', + '192.168.100.9' => '140.181.80.64', + '192.168.100.10' => '140.181.80.68' + ); - my %IP_GSI_lookup = ( - '192.168.100.15' => 'lxhadeb05', - '192.168.100.12' => 'lxhadeb02', - '192.168.100.13' => 'lxhadeb03', - '192.168.100.14' => 'lxhadeb04', - '192.168.100.8' => 'lxhadeb08', - '192.168.100.9' => 'lxhadeb09', - '192.168.100.10' => 'lxhadeb10' - ); +# my %IP_GSI_lookup = ( +# '192.168.100.15' => 'lxhadeb05', +# '192.168.100.12' => 'lxhadeb02', +# '192.168.100.13' => 'lxhadeb03', +# '192.168.100.14' => 'lxhadeb04', +# '192.168.100.8' => 'lxhadeb08', +# '192.168.100.9' => 'lxhadeb09', +# '192.168.100.10' => 'lxhadeb10' +# ); my $IP_GSI_href = \%IP_GSI_lookup; @@ -379,10 +379,10 @@ sub getEBArgs() my @ltsm_list = split(/\s+/, $listOfLTSM); my $ltsm_path = $temp_args_href->{'Parallel'}->{'LTSM_PATH'}; - my $ltsm_server = $temp_args_href->{'Parallel'}->{'LTSM_Server'}; + my $ltsm_server = $temp_args_href->{'Parallel'}->{'LTSM_Server'}; my $ltsm_node = $temp_args_href->{'Parallel'}->{'LTSM_Node'}; - my $ltsm_passwd = $temp_args_href->{'Parallel'}->{'LTSM_Passwd'}; - my $ltsm_filesys = $temp_args_href->{'Parallel'}->{'LTSM_Filesystem'}; + my $ltsm_passwd = $temp_args_href->{'Parallel'}->{'LTSM_Passwd'}; + my $ltsm_filesys = $temp_args_href->{'Parallel'}->{'LTSM_Filesystem'}; @@ -454,7 +454,7 @@ sub getEBArgs() # JAM2018: bnet requieres calibration modes in a list like the ports: $href->{$ebproc}->{'CALIB_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'calib_list'}; - # JAM2018: bnet requieres hub addresses/subevents in a list like the ports: + # JAM2018: bnet requires hub addresses/subevents in a list like the ports: $href->{$ebproc}->{'HUB_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'addr_list'}; @@ -511,20 +511,20 @@ sub getEBArgs() $href->{$ebproc}->{'LTSM'} = $ltsm_list[$ebproc]; # 0|1 $href->{$ebproc}->{'LTSM_PATH'} = $ltsm_path; - $href->{$ebproc}->{'LTSM_Server'} = $ltsm_server; + $href->{$ebproc}->{'LTSM_Server'} = $ltsm_server; $href->{$ebproc}->{'LTSM_Node'} = $ltsm_node; - $href->{$ebproc}->{'LTSM_Passwd'} = $ltsm_passwd; - $href->{$ebproc}->{'LTSM_Filesystem'} = $ltsm_filesys; + $href->{$ebproc}->{'LTSM_Passwd'} = $ltsm_passwd; + $href->{$ebproc}->{'LTSM_Filesystem'} = $ltsm_filesys; $href->{$ebproc}->{'EPICS_CTRL'} = $epics_list[$ebproc]; # 0|1 - $href->{$ebproc}->{'DABC'} = $dabc_list[$ebproc]; # 0|1 + $href->{$ebproc}->{'DABC'} = $dabc_list[$ebproc]; # 0|1 - $href->{$ebproc}->{'EB_DEBUG'} = $ebdbg_list[$ebproc]; # 0|1 + $href->{$ebproc}->{'EB_DEBUG'} = $ebdbg_list[$ebproc]; # 0|1 - $href->{$ebproc}->{'EB_LOG'} = $eblog_list[$ebproc]; # 0|1 - $href->{$ebproc}->{'NM_LOG'} = $nmlog_list[$ebproc]; # 0|1 + $href->{$ebproc}->{'EB_LOG'} = $eblog_list[$ebproc]; # 0|1 + $href->{$ebproc}->{'NM_LOG'} = $nmlog_list[$ebproc]; # 0|1 if($ebproc<4) @@ -606,8 +606,8 @@ my $ebproc =0; # here test special installations: my $cdworkdir = "cd /home/hadaq/oper;"; - my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; -# my $cmd_dabc = "/usr/bin/gdb -x /home/hadaq/soft/dabc/head/base/run/gdbcmd.txt --args /home/hadaq/soft/dabc/bin/dabc_exe.head "; +# my $cmd_dabc = "/home/hadaq/soft/dabc/bin/dabc_exe.head "; + my $cmd_dabc = "/usr/bin/gdb -x /home/hadaq/soft/dabc/head/base/run/gdbcmd.txt --args /home/hadaq/soft/dabc/bin/dabc_exe.head "; my $conf_bnet_inp = " BnetInputHades.head.xml"; @@ -825,7 +825,9 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ " export BNEBNUM=" . $ebid . ";" . " export BNEBID=" . $portid . "; " . " export BNEBPORT=" . $bnebport . "; " . - " export PREFIX=" . $EB_Args_href->{$ebproc}->{'PREFIX'}. "; " . + # ignore prefix at startup. always start without files and show it: + #" export PREFIX=" . $EB_Args_href->{$ebproc}->{'PREFIX'}. "; " . + " export PREFIX=--;" . " export BNETSENDERS=" . $bnetsenders . ";" . " export BNETRECEIVERS=" . $bnetrcvs . ";" . " export HADAQPORTS=" . $bnet_port_list[$ebserver]. "; " ; @@ -855,6 +857,8 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ $exports = $exports . " export LTSMNODE=". $EB_Args_href->{$ebproc}->{'LTSM_Node'} . ";"; $exports = $exports . " export LTSMPASSWD=". $EB_Args_href->{$ebproc}->{'LTSM_Passwd'} . ";"; $exports = $exports . " export LTSMFSNAME=". $EB_Args_href->{$ebproc}->{'LTSM_Filesystem'} . ";"; + $exports = $exports . " export DSM_LOG=/home/hadaq/oper/ltsm". $ebid .".log;"; + # switch on by number of outputs } @@ -896,11 +900,13 @@ for ( my $ebserver=0; $ebserver<4; $ebserver=$ebserver+1){ # finally, we need to set eb lut on cts for setup of EB15 => bnet distribution #trbcmd w 0x0003 0xa0f0 0x8000`; - `trbcmd w 0x0003 0xa0f0 0x1`; + #`trbcmd w 0x0003 0xa0f0 0x1`; + `trbcmd setbit 0x0003 0xa0f0 0x1`; # use EB1 as pseude for BNET now # all calibration triggers also assigned to pseudo EB15 => bnet distribution for the moment #trbcmd w 0x0003 0xa0f3 0xfff`; - `trbcmd w 0x0003 0xa0f3 0xff0`; + # `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 @@ -2001,9 +2007,12 @@ sub writeArgs2file() } print $fh ";\n"; + ## do not start te files by default. user should actively restart the file JAM 29-06-2018 # here put command to start the correct file prefix in bnet builders: - my $prefix=$EB_Args_href->{0}->{'PREFIX'}; - print $fh "/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=$prefix&oninit=10\"\n"; + #my $prefix=$EB_Args_href->{0}->{'PREFIX'}; + #print $fh "/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt \"http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=$prefix&oninit=10\"\n"; + + $fh->close(); system("chmod 755 ./$fileName"); diff --git a/evtbuild/start_eb_gbe.sh b/evtbuild/start_eb_gbe.sh index 67a3d36..3073db0 100755 --- a/evtbuild/start_eb_gbe.sh +++ b/evtbuild/start_eb_gbe.sh @@ -1,2 +1 @@ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te -b 3; -/usr/bin/wget -a /tmp/EB_filestart.log -O /tmp/EB_fileres.txt "http://lxhadeb03:8090/Master/BNET/StartRun/execute?prefix=te&oninit=10" diff --git a/hmon/HPlot.pm b/hmon/HPlot.pm index 6a62172..b01c41b 100755 --- a/hmon/HPlot.pm +++ b/hmon/HPlot.pm @@ -233,7 +233,7 @@ sub PlotDraw { plot_write($p->{$name}->{fh},(($i-($p->{$name}->{entries}-$realentries))/$p->{$name}->{xscale})." ".$p->{$name}->{value}->[$j]->[$i]); } else { - plot_write($p->{$name}->{fh},(($i-$realentries)/($p->{$name}->{xscale}||1))." ".($p->{$name}->{value}->[$j]->[$i]||0)); + plot_write($p->{$name}->{fh},(($i-$realentries)/$p->{$name}->{xscale})." ".($p->{$name}->{value}->[$j]->[$i]||0)); } } plot_write($p->{$name}->{fh},"e"); @@ -241,13 +241,13 @@ sub PlotDraw { } if($p->{$name}->{type} == TYPE_BARGRAPH) { - my $realentries = $p->{$name}{limitentries} || $p->{$name}->{entries}; + my $realentries = $p->{$name}{limitentries} || $p->{$name}{entries}; #plot_write($p->{$name}->{fh}, $p->{$name}->{plot_string}); - for(my $j=0; $j<$p->{$name}->{curves}; $j++) { - for(my $i=$p->{$name}->{entries}-$realentries; $i< $p->{$name}->{entries}; $i++) { - plot_write($p->{$name}->{fh},' '.$p->{$name}->{value}->[$j]->[$i]); + for(my $j=0; $j<$p->{$name}{curves}; $j++) { + for(my $i=$p->{$name}{entries}-$realentries; $i< $p->{$name}{entries}; $i++) { + plot_write($p->{$name}{fh},' '.$p->{$name}{value}[$j][$i]||0); } - plot_write($p->{$name}->{fh},"e"); + plot_write($p->{$name}{fh},"e"); } } @@ -255,6 +255,7 @@ sub PlotDraw { for(my $j=0; $j<$p->{$name}->{curves}; $j++) { for(my $i=0; $i< $p->{$name}->{entries}; $i++) { plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]//'NaN')." ",1);#"NaN" + #plot_write($p->{$name}->{fh},((int((($p->{$name}->{value}->[$j]->[$i]||0)*100+0.5)/100))//'NaN')." ",1);#"NaN" } plot_write($p->{$name}->{fh}," ",0); } @@ -264,6 +265,7 @@ sub PlotDraw { for(my $j=0; $j<$p->{$name}->{curves}; $j++) { for(my $i=0; $i< $p->{$name}->{entries}; $i++) { plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1); + #plot_write($p->{$name}->{fh},(int((($p->{$name}->{value}->[$j]->[$i]||0)*100+0.5)/100))." ",1); } plot_write($p->{$name}->{fh}," ",0); } diff --git a/hmon/QA.pm b/hmon/QA.pm index bef0f60..0831d93 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -48,8 +48,8 @@ $entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other']; $entries->{'feeerr'} = ['mdcinvalid', 'trb', 'feeerr','trginp','trgqual']; $entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu']; $entries->{'other'} = ['magnet','goofy','','','sequencer']; -$entries->{'rich'} = ['temp','volt','curr','bkpl','']; -$entries->{'ecal'} = ['','','','','']; +$entries->{'rich'} = ['temp','volt','curr','bkpl','richhv']; +$entries->{'ecal'} = ['temp','','','','']; our $QAServer = "hades33"; @@ -76,6 +76,7 @@ our @MdcOepLimits = (372, 372-1, 372-3); our @MdcVoltageLimits = (50, 60, 100); our @MdcLockLimits = (0, 3, 5); our @MdcTempLimits = (75, 80, 85); +our @EcalTempLimits = (55, 60, 65); our @RichInnerTempLimits = (32.5,33,34); our @TrgErrLimits = (100, 1000, 10000); our @CPULimits = (95, 100, 100); @@ -107,7 +108,7 @@ use constant {CTSAddress => 0x0003}; # Missing Boards ############################################################################### -our @mdc_boards_removed =(0x221a); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23 +our @mdc_boards_removed =(); #(0x2257, 0x2029); # 2233 added 2014-08-28 , 2203 at 2014/09/03, 2029 2014/09/23 our @mdc_chambers_removed =(); our @rich_boards_removed =(); our @tof_boards_removed =(); diff --git a/hmon/hmon_endpoints.pl b/hmon/hmon_endpoints.pl index c9fcd8a..9ad70c8 100755 --- a/hmon/hmon_endpoints.pl +++ b/hmon/hmon_endpoints.pl @@ -151,13 +151,12 @@ while(1) { #0x7000,0x7001,0x7002,0x7003,0x7004,0x7005,0x7006,0x7007, §in the beamline? - #bkpl not equipped yet - #0x8251,0x8260,0x8240, - #0x71a6,0x71a7,0x71b6,0x71b7,0x71a0,0x71a1,0x71b0,0x71b1, - #0x72a6,0x72a7,0x72b6,0x72b7,0x72a0,0x72a1,0x72b0,0x72b1, - #0x73a6,0x73a7,0x73b6,0x73b7,0x73a0,0x73a1,0x73b0,0x73b1, - #0x7076,0x7077,0x7086,0x7087,0x7096,0x7097, - #0x7070,0x7071,0x7080,0x7081,0x7090,0x7091, + 0x8251,0x8260,0x8240, + 0x71a6,0x71a7,0x71b6,0x71b7,0x71a0,0x71a1,0x71b0,0x71b1, + 0x72a6,0x72a7,0x72b6,0x72b7,0x72a0,0x72a1,0x72b0,0x72b1, + 0x73a6,0x73a7,0x73b6,0x73b7,0x73a0,0x73a1,0x73b0,0x73b1, + 0x7076,0x7077,0x7086,0x7087,0x7096,0x7097, + 0x7070,0x7071,0x7080,0x7081,0x7090,0x7091, ); my @tof_boards =(0x4c00,0x4c10,0x4c20,0x4c30,0x4c31,0x4c40,0x4c50,0x8600,0x8601,0x4800,0x4801,0x4802,0x4803,0x4810,0x4811,0x4812,0x4813,0x4820,0x4821,0x4822, diff --git a/hmon/hmon_richMagnet.pl b/hmon/hmon_richMagnet.pl index 79e637f..2074492 100755 --- a/hmon/hmon_richMagnet.pl +++ b/hmon/hmon_richMagnet.pl @@ -37,11 +37,11 @@ ylabel => "Sensor Number on Board", ymin => -0.5, ymax => 3.5, cbmax => "100<*<1E5", -cbmin => 0, +cbmin => 0.0, cblabel => "B [uT]", noinit => 1, additional => "", -showvalues => 0, }; +showvalues => 1, }; HPlot::PlotInit($plot1); my $str = Hmon::MakeTitle(7, 9, "RICH Magnet",0); @@ -52,42 +52,42 @@ Hmon::WriteFile("RichMagnet",$str); trb_init_ports() or die trb_strerror(); -my @calib = (((65.000,34.500,245.024),(-78.500,-20.000,-33.046),(-17.000,-33.000,-112.034),(2.5000,-24.000,43.524)),((106.000,-24.500,210.366),(-34.000,-60.500,-142.662),(114.000,-59.000,5.642),(73.000,-84.000,166.036)),((-31.000,-120.500,-156.364),(8.500,-85.000,-14.508),(54.500,-60.000,-96.790),(60.500,-108.500,-27.404)),(0,1,2,3),(0,1,2,3),(0,1,2,3)); +my $calib = [[[65.000,34.500,245.024],[-78.500,-20.000,-33.046],[-17.000,-33.000,-112.034],[2.5000,-24.000,43.524]],[[106.000,-24.500,210.366],[-34.000,-60.500,-142.662],[114.000,-59.000,5.642],[-29.500,-26.500,-131.378]],[[73.00,-84.000,166.036],[-31.000,-120.500,-156.364],[8.500,-85.000,-14.508],[54.500,-60.000,-96.790]],[[60.500,-108.500,-27.404],[-90.000,-49.000,169.260],[174.000,-55.500,-149.110],[-13.500,-33.500,-83.018]],[[-19.000,45.500,37.076],[95.500,10.00,211.978],[89.500,2.000,197.470],[13.000,6.500,-214.396]],[[-114.500,-19.500,157.170],[-11.500,-1.000,-58.032],[-1.500,-15.000,28.210],[41.000,15.500,155.558]]]; + while(1){ my $count = 0; my $data; + my $magActive = trb_register_read_mem(0x0110, 0xe001,0,0x6) or sleep 5 and next; my $rich = trb_register_read_mem(0x0110, 0xe010,0,0x60) or sleep 5 and next; - print Dumper $rich; - + #print Dumper $magActive->{0x0110}[2]; + my $val = 0; foreach my $b (@{$rich->{0x0110}}) { - my $t; - my $val; + my $t=0; + #printf("%u \n", ($magActive->{0x0110}[$count % 4] >> 8)); if (($count % 4) == 0) { - $t = ($b & 0x3ffffff) / 100; - if ((($b >> 27)&0x1) == 1) {$t = $t * -1;} + #$t = ($b & 0x7ffffff) / 100; + #if ((($b >> 27)&0x1) == 1) {$t = $t * -1;} $val = 0; } else { - $t = ($b & 0x3ffffff) / 1000; + $t = int (($b & 0x7ffffff) / 1000); if ((($b >> 27)&0x1) == 1) {$t = $t * -1;} + $t = $t - $calib->[$count / 16][($count % 16) / 4][($count % 4)-1]; $val += $t*$t; } - printf("%.3f\n",$t); if (($count % 4) == 3 ) { my $sens = ($count % 16) / 4; my $board = ($count / 16); - my $s = sprintf("%1x%1x",$board,$sens); - $data->{$s}=sqrt($val); - - HPlot::PlotFill('RichMagnet',sqrt($val),$board,$sens);# + if (($magActive->{0x0110}[$board] >> 8) == 0 ) { + HPlot::PlotFill('RichMagnet',sqrt($val),$board,$sens);# + } } - - + $count ++; } - + #print Dumper \@calib; HPlot::PlotDraw('RichMagnet'); sleep 10; diff --git a/hmon/hmon_rich_temp_backplane.pl b/hmon/hmon_rich_temp_backplane.pl index 18fbe2e..6837d88 100755 --- a/hmon/hmon_rich_temp_backplane.pl +++ b/hmon/hmon_rich_temp_backplane.pl @@ -28,15 +28,23 @@ my $raw = {}; my $val; my $mailerrstatecnt = 0; my ($max,$min,$avg,$sum,$count); +my $interlockTemperature = 37.0; #Interlock value !!! + trb_init_ports() or die trb_strerror(); +#my $LV3_3_Alarm = sprintf("HAD:RICH:PS:17:ALARM"); +#Perl2Epics::Connect("PS_RICH_3_3V_ALARM",$LV3_3_Alarm); + while (1) { my $data; + my $trbneterr = 0; my $rich_temp1 = trb_register_read_mem(0x0110, 0xe100,0,10) or sleep 5 and next; my $rich_temp2 = trb_register_read_mem(0x0110, 0xe110,0,8) or sleep 5 and next; + my $Interlock_value = trb_register_read(0x0110, 0xe120) or $trbneterr = 1; my @rich_temp; + my $InterlockActive = "working"; # push(@rich_temp,@{$rich_temp1->{0x0110}},@{$rich_temp2->{0x0110}}); # print Dumper @rich_temp; $min = 1000; @@ -79,30 +87,34 @@ while (1) { $data->{updatetime} = $updatetime; - #-------Interlock workaround-------# - #var $Interlock = 0; - if ($max > 38.0 ) { - #printf "Off\n"; - #my $s = sprintf("HADES:RICH:HV:CR1:0:1000:PowerOn"); + #-------Software Interlock-------# + my $InterlockValHW = (($Interlock_value->{0x0110} || 0) & 0xfff)/16; + + + if ($max > $interlockTemperature ) { my $s = sprintf("HAD:RICH:PS:17:SETONOFF"); Perl2Epics::Connect("PS_RICH_3_3V",$s); Perl2Epics::Put("PS_RICH_3_3V",1); - #$Interlock = 1; + $InterlockActive = "Shutting down RICH ..."; } - #-------Interlock workaround-------# + #-------Software Interlock-------# + #my $Epics_LV_data = Perl2Epics::GetAll(); + my $strHWInterlock = "Hardware Interlock Temperature: " . $InterlockValHW ." °C | "; + # if ($Epics_LV_data->{"PS_RICH_3_3V_ALARM"}->{val} == 1) { + # $strHWInterlock .= "Shutting down RICH ..."; + # } else { + $strHWInterlock .= "HW Installed"; + # } + if ($trbneterr == 1) {$strHWInterlock = "Failure Trb3Sc 0x0110";} my $qastate = QA::GetQAState('below', $max, @QA::RichInnerTempLimits); my $qastate_interlock = QA::GetQAState('below', $max, @QA::RichInnerTempLimits); my $str = sprintf("%i - %i", $min, $max); QA::WriteQALog($fqa,"rich","bkpl", 40, $qastate, "Temperature", $str, - "Min/Max temperature in RICH " . $str); - # my $strInterlockQA; - # if ($Interlock == 0) - # QA::WriteQALog($fqa,"rich","inlk", 40, $qastate_interlock, "Interlock", "LV is on..", - # "LV is ..."); + "Min/Max temperature in RICH " . $str . " °C
Software Interlock Temperature: " . $interlockTemperature . " °C | " .$InterlockActive ."
". $strHWInterlock); my $fh; open($fh, ">", Hmon::HMONDIR."/files/richTemperatureBackplane.json"); diff --git a/hmon/hmon_richrate.pl b/hmon/hmon_richrate.pl index e89c725..ac8934a 100755 --- a/hmon/hmon_richrate.pl +++ b/hmon/hmon_richrate.pl @@ -11,6 +11,9 @@ use HPlot; use Time::HiRes qw(usleep time); use List::Util qw[min max]; +use Encode qw(encode from_to); +use JSON::XS; + my $plot1 = { name => "RichRateQ1", @@ -125,29 +128,66 @@ my $time = time(); my $diff; my $iter = 0; + + trb_init_ports() or die trb_strerror(); while(1) { + #my $data; + #my $max = 0 ; + #my $min = 5E9; + my $o = trb_register_read_mem(0xfe51,0xc000,0,33) or die trb_strerror() or sleep 5 and next; if (defined $old) { my $tdiff = time() - $oldtime; foreach my $b (keys %$o) { + #my $ratesum = 0; my $sec = ($b>>1) & 0x3; my $xpos = (($b>>8)&0xF)*24 + (($b>>4)&0xF)*2 + ($b&1); for my $v (0..31) { my $vdiff = ($o->{$b}->[$v+1]&0xfffffff) - ($old->{$b}->[$v+1]&0xfffffff); + if ($vdiff < 0) { $vdiff += 2**28;} $diff->{$b}->[$v+1] = $vdiff/($tdiff|1); + #$ratesum += $diff->{$b}->[$v+1]; HPlot::PlotFill('RichRateQ'.$sec,$diff->{$b}->[$v+1],$xpos,$v); } + #my $s = sprintf("0x%04x",$b); + #$data->{$s}= int(100*($ratesum / 32) +0.5) /100; + + #$min = $data->{$s} if $data->{$s} < $min; + #$max = $data->{$s} if $data->{$s}> $max; } for my $i (0..3) { HPlot::PlotDraw('RichRateQ'.$i); } - } + + + + # $data->{max} = $max; + # $data->{min} = $min; + # $data->{symbol} = " Hits/s"; + # $data->{title} = "Mean DiRICH TDC Rate"; + + # my $timeStamp = localtime(); + + # my @months = qw( Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ); + # my @days = qw(Sun Mon Tue Wed Thu Fri Sat Sun); + # my ($sec,$minute,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(); + # my $updatetime = sprintf("%03s, %02d %s %04d - %02d:%02d:%02d",$days[$wday], $mday, $months[$mon], 1900 + $year, $hour, $minute, $sec); + + # $data->{updatetime} = $updatetime; + + #print Dumper $data; + # my $fh; + # open($fh, ">", Hmon::HMONDIR."/files/richMeanRateDiRICH.json"); + # print $fh encode_json($data); + # close $fh; + } + $old = $o; $oldtime = time(); sleep 2; diff --git a/hmon/hmon_startmon.pl b/hmon/hmon_startmon.pl old mode 100644 new mode 100755 diff --git a/hmon/hmon_trgerr.pl b/hmon/hmon_trgerr.pl index bad57a9..ba04e08 100755 --- a/hmon/hmon_trgerr.pl +++ b/hmon/hmon_trgerr.pl @@ -56,7 +56,7 @@ while (1) { #Clean-up by compare to former values foreach my $b (keys %$boards) { - if(! defined $allboards->{$b} || ($boards->{$b} - $allboards->{$b}) == 0) { + if(! defined $allboards->{$b} || ($boards->{$b} == $allboards->{$b})) { $boards->{$b} = 0; } } @@ -88,7 +88,7 @@ while (1) { my $totalsum = 0; if (%laststore2) { foreach my $c (keys %store2) { - my $diff = $store2{$c} - ($laststore2{$c} || $store2{$c}); + my $diff = $store2{$c} - ($laststore2{$c} || 0); while ($diff < 0) { $diff += 2**16; } diff --git a/hmon/monitor.cgi b/hmon/monitor.cgi index 37f211d..3776066 100755 --- a/hmon/monitor.cgi +++ b/hmon/monitor.cgi @@ -101,15 +101,15 @@ function reload() { xmlhttp.onreadystatechange = function() { if(xmlhttp.readyState == 4) { if(!document.getElementById("footer")) { - document.getElementById("content").style.opacity="0"; + //document.getElementById("content").style.opacity="0"; document.getElementById("content").innerHTML=xmlhttp.responseText; - setTimeout('document.getElementById("content").style.opacity="1"',100); + //setTimeout('document.getElementById("content").style.opacity="1"',100); } else { document.getElementById("content").innerHTML=xmlhttp.responseText; } - setTimeout('document.getElementById("contentback").innerHTML=document.getElementById("content").innerHTML',200); + //setTimeout('document.getElementById("contentback").innerHTML=document.getElementById("content").innerHTML',200); if(document.getElementById('logbox')) { if(saveScrollTop) { diff --git a/hmon/permanent/hmon_magnet.pl b/hmon/permanent/hmon_magnet.pl index 25162d0..b757ff4 100755 --- a/hmon/permanent/hmon_magnet.pl +++ b/hmon/permanent/hmon_magnet.pl @@ -30,9 +30,9 @@ my %range_list = ( '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' => 2495 , 'max' =>2497 }, 'PSUV_rbk' => {'min' => 0 , 'max' =>1 }, - 'BBI' => {'min' => 419 , 'max' =>450 }, + 'BBI' => {'min' => 419 , 'max' =>450 }, 'LL1708' => {'min' => 55.2 , 'max' =>63.0 }, 'TP1240' => {'min' => 75.5 , 'max' =>85.0 , 'cal_max' => 2}, 'PI2610' => {'min' => 1.7 , 'max' =>3.1 }, diff --git a/hmon/permanent/hmon_open_ssh_master_channels.pl b/hmon/permanent/hmon_open_ssh_master_channels.pl index 410052c..e9e98a7 100755 --- a/hmon/permanent/hmon_open_ssh_master_channels.pl +++ b/hmon/permanent/hmon_open_ssh_master_channels.pl @@ -4,7 +4,8 @@ use strict; use warnings; use v5.10.0; -my @cpus = qw |lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hadesp31 hades33|; +my @cpus = qw |lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadeb08 lxhadeb09 lxhadeb10 lxhaddcs03 lxhaddcs04 lxhaddcs05 lxhaddcs06 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hadesp31 hades33 +lxhadeb02p lxhadeb03p lxhadeb04p lxhadeb05p lxhadeb06p lxhadeb07p lxhadeb08p lxhadeb09p lxhadeb10p lxhaddcs03p lxhaddcs04p lxhaddcs05p lxhaddcs06p lxhadesdaqp hadesdaqp01 hadesdaqp02 hadesp30 hadesp33|; for my $cpu (@cpus) { my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f Hmon Vertex Reconstruction - +

HADES QA Plots

@@ -32,10 +32,7 @@ my $out = $title;