From 4ce815e4ce4a66e2e33719cd997256dff9459765 Mon Sep 17 00:00:00 2001 From: "hadaq@countinghouse" Date: Tue, 6 Feb 2018 16:50:54 +0100 Subject: [PATCH] push everything that seems remotely important. --- control/gui/call_programs2.pl | 3 + control/gui/daq/15_Start_Stop_Trigger | 4 +- control/gui/daq/50_Reboot_TRB3 | 2 +- control/gui/eb/40_Prefix_Te | 2 +- control/gui/expert/NxyterDataMode | 18 - control/gui/expert/Nxyter_Rescue | 8 + control/gui/expert/Pexor_Repair | 33 + evtbuild/eb.conf | 2 +- evtbuild/eb.conf.mai14_noRFIO | 221 +++ evtbuild/eb.conf.mai14_noRFIO_noDABC | 224 +++ evtbuild/eb.conf.mai14_withRFIO | 227 +++ evtbuild/eb.conf.mai14_withRFIO.oldsyntax | 210 +++ evtbuild/eb.conf.mai14_withRFIO_noDABC | 223 +++ evtbuild/eb.conf.mai14_with_DABC_withRFIO | 220 +++ evtbuild/eb.conf.nov14_withRFIO | 227 +++ evtbuild/eb.conf.nov16 | 227 +++ evtbuild/eb.conf.nov2016 | 227 +++ evtbuild/eb.conf.withdabc | 220 +++ evtbuild/eb_bnet.conf | 240 +++ evtbuild/eb_bnet_ltsm.conf | 278 +++ evtbuild/start_eb_dabc.pl | 1436 ++++++++++++++++ evtbuild/start_eb_dabc.sh | 1 + evtbuild/start_eb_gbe.pl | 1521 +---------------- evtbuild/start_eb_gbe.sh | 2 +- hmon/editlogfiles.pl | 6 +- hmon/hmon_hadplotnew.sh | 1457 +--------------- hmon/permanent/hmon_cpu.pl | 2 +- hmon/permanent/hmon_eb_run.pl | 11 +- hmon/permanent/hmon_mdchv_new.pl | 128 ++ .../hmon_open_ssh_master_channels.pl | 2 +- hmon/permanent/hmon_plot_template.pl | 75 + hub/register_configgbe_ip_eb5master.db | 154 +- hub/trb.db | 2 +- main/data_sources.db | 36 +- main/main_hades.script | 3 +- main/startup_briccolage.sh | 27 +- mdc/addresses_oep.db | 15 +- mdc/thresholds/register_thresholds_35.db | 421 +++++ mdc/thresholds/register_thresholds_92.db | 422 +++++ mdc/thresholds/register_thresholds_94.db | 422 +++++ mdc/thresholds/register_thresholds_96.db | 422 +++++ mdc/thresholds/register_thresholds_98.db | 422 +++++ mdc/thresholds/register_thresholds_9a.db | 422 +++++ mdc/thresholds/register_thresholds_a5.db | 422 +++++ mdc/thresholds/register_thresholds_jul14.db | 4 +- mdc/tools/LV_powercycle231x.sh | 3 + mdc/tools/LV_turn_off_all.sh | 5 + mdc/tools/turn_MDC_PS_on.sh | 11 + nettools/Perl2Epics.pm | 4 +- nettools/hadplot | 1456 +--------------- nettools/hadplotnew.pl | 1450 +--------------- nettools/nettrace.db | 1288 +++++++------- nettools/rebootoep_x11.sh | 2 +- nettools/restart_trbnetd | 2 +- oracle/postgres2ora.pl | 5 +- oracle/runinfo2ora.pl | 3 +- oracle/runinfo2orastart_parallel.sh | 34 +- pion/config/nxyter/setup.sh | 14 +- rich/peds/current | 2 +- rich/register_thresholds.db | 2 +- shower/reload.sh | 4 +- shower/showerpeds.dat | 2 +- start/ThreshNinoStart.db | 22 +- start/howto_hodo | 41 + start/startup.script | 21 +- utils/hldlast | 31 +- 66 files changed, 8361 insertions(+), 6692 deletions(-) delete mode 100755 control/gui/expert/NxyterDataMode create mode 100755 control/gui/expert/Nxyter_Rescue create mode 100755 control/gui/expert/Pexor_Repair create mode 100644 evtbuild/eb.conf.mai14_noRFIO create mode 100644 evtbuild/eb.conf.mai14_noRFIO_noDABC create mode 100644 evtbuild/eb.conf.mai14_withRFIO create mode 100644 evtbuild/eb.conf.mai14_withRFIO.oldsyntax create mode 100644 evtbuild/eb.conf.mai14_withRFIO_noDABC create mode 100644 evtbuild/eb.conf.mai14_with_DABC_withRFIO create mode 100644 evtbuild/eb.conf.nov14_withRFIO create mode 100644 evtbuild/eb.conf.nov16 create mode 100644 evtbuild/eb.conf.nov2016 create mode 100644 evtbuild/eb.conf.withdabc create mode 100644 evtbuild/eb_bnet.conf create mode 100644 evtbuild/eb_bnet_ltsm.conf create mode 100755 evtbuild/start_eb_dabc.pl create mode 100755 evtbuild/start_eb_dabc.sh mode change 100755 => 120000 evtbuild/start_eb_gbe.pl mode change 100755 => 120000 hmon/hmon_hadplotnew.sh create mode 100644 hmon/permanent/hmon_mdchv_new.pl create mode 100644 hmon/permanent/hmon_plot_template.pl create mode 100644 mdc/thresholds/register_thresholds_35.db create mode 100644 mdc/thresholds/register_thresholds_92.db create mode 100644 mdc/thresholds/register_thresholds_94.db create mode 100644 mdc/thresholds/register_thresholds_96.db create mode 100644 mdc/thresholds/register_thresholds_98.db create mode 100644 mdc/thresholds/register_thresholds_9a.db create mode 100644 mdc/thresholds/register_thresholds_a5.db create mode 100644 mdc/tools/LV_powercycle231x.sh create mode 100755 mdc/tools/LV_turn_off_all.sh create mode 100755 mdc/tools/turn_MDC_PS_on.sh mode change 100755 => 120000 nettools/hadplot mode change 100755 => 120000 nettools/hadplotnew.pl create mode 100644 start/howto_hodo diff --git a/control/gui/call_programs2.pl b/control/gui/call_programs2.pl index 360b8c8..3424d63 100755 --- a/control/gui/call_programs2.pl +++ b/control/gui/call_programs2.pl @@ -4,10 +4,13 @@ package main; use warnings; use strict; + +use lib "."; use QtCore4; use QtGui4; use Buttons2; + sub main { my $a = Qt::Application(\@ARGV); diff --git a/control/gui/daq/15_Start_Stop_Trigger b/control/gui/daq/15_Start_Stop_Trigger index b96f215..6a61885 100755 --- a/control/gui/daq/15_Start_Stop_Trigger +++ b/control/gui/daq/15_Start_Stop_Trigger @@ -1,7 +1,7 @@ #!/usr/bin/perl use warnings; use HADES::TrbNet; -$ENV{'DAQOPSERVER'} = "hades31"; +$ENV{'DAQOPSERVER'} = "hadesp31"; trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror(); my $rh = trb_register_read(0x0003, 0xa0c0) or print trb_strerror() and die; @@ -11,4 +11,4 @@ if($rh->{3} & 0x400) { else { system("trbcmd setbit 0x0003 0xa0c0 0x400"); } - \ No newline at end of file + diff --git a/control/gui/daq/50_Reboot_TRB3 b/control/gui/daq/50_Reboot_TRB3 index 0bd65a5..c98ab9d 100755 --- a/control/gui/daq/50_Reboot_TRB3 +++ b/control/gui/daq/50_Reboot_TRB3 @@ -3,7 +3,7 @@ use warnings; use HADES::TrbNet; -$ENV{'DAQOPSERVER'} = "hades31"; +$ENV{'DAQOPSERVER'} = "hadesp31"; trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror(); #system("trbcmd i 0xffff"); diff --git a/control/gui/eb/40_Prefix_Te b/control/gui/eb/40_Prefix_Te index eb2d9e4..d52c290 100755 --- a/control/gui/eb/40_Prefix_Te +++ b/control/gui/eb/40_Prefix_Te @@ -7,7 +7,7 @@ ssh -X hadaq@lxhadesdaq " echo "Starting Eventbuilder 1 - 16 with prefix te" cd ~/trbsoft/hadesdaq/evtbuild/ ./start_eb_gbe.pl -e restart -n 1-16 -d on -p te - ' + ' " /home/hadaq/trbsoft/hadesdaq/utils/notifyall.sh "DAQ" " Eventbuilders have been started. Writing test files" "EB" & diff --git a/control/gui/expert/NxyterDataMode b/control/gui/expert/NxyterDataMode deleted file mode 100755 index 5e27c9b..0000000 --- a/control/gui/expert/NxyterDataMode +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/perl -use warnings; -use HADES::TrbNet; -$ENV{'DAQOPSERVER'} = "hades31"; -trb_init_ports() or die "could not reach trbnet-daemon.", trb_strerror(); - -my $rh = trb_register_read(0x3800, 0x8400) or print trb_strerror() and die; - -foreach my $a (0x3800,0x3801,0x3810,0x3811) { - if($rh->{0x3800} & 0x80000000) { - system("trbcmd clearbit $a 0x8400 0x80000000"); - } - else { - system("trbcmd setbit $a 0x8400 0x80000000"); - } - - - } diff --git a/control/gui/expert/Nxyter_Rescue b/control/gui/expert/Nxyter_Rescue new file mode 100755 index 0000000..96541f2 --- /dev/null +++ b/control/gui/expert/Nxyter_Rescue @@ -0,0 +1,8 @@ +#!/bin/bash +xterm -geometry 80x24 -bg orange -fg black -e bash -c " +echo -e '\033[1mNxyter Rescue Script called\n\n' +/home/hadaq/trbsoft/daq/pion/tools/Nxyter_Rescue.pl +sleep 30 +echo -e '\n\n\nDone' +sleep 5 +" diff --git a/control/gui/expert/Pexor_Repair b/control/gui/expert/Pexor_Repair new file mode 100755 index 0000000..d59f727 --- /dev/null +++ b/control/gui/expert/Pexor_Repair @@ -0,0 +1,33 @@ +#!/bin/bash +# JAM took from startup_briccolage.sh without starting everything +xterm -geometry 80x24 -bg orange -fg black -e bash --login -c ' + ssh hadaq@hadesp31 " + export DAQOPSERVER=hadesp31; + echo \" Pexor clean-up on hades31...\"; + pkill -USR1 trbnetd 2>/dev/null; + killall trbcmd 2>/dev/null; + trbcmdlocal W 0x703 0x20; + trbcmdlocal f 3; + trbcmdlocal W 0x702 2; + echo \" Doing Reset...\"; + tryreset.pl; + pkill -USR2 trbnetd; + pgrep trbnetd 1>/dev/null || trbnetd; + #trbcmdlocal reset; + echo \"Set default CTS setup\" + # following from cts/startup.script: + trbcmdlocal clearbit 0x0003 0xa0c0 0x20000000 #set profile B to start + trbcmdlocal w 0x0003 0xA0E0 0xcccccccc + trbcmdlocal w 0x0003 0xA0E1 0xcc + trbcmdlocal loadbit 0x003 0xA0C1 0x0000000F 0x00000004 + trbcmdlocal setbit 0x0003 0xA0C2 0x01000000 + trbcmdlocal -f /home/hadaq/trbsoft/hadesdaq/cts/cts_settings_mon.trbcmd + trbcmdlocal loadbit 0x0003 0xa0f0 0xffff0000 0xfff0000 + #All calib to EB1 + trbcmdlocal w 0x0003 0xa0f3 0xff1 +# turn off multi event queue, as these garble the data from the TRB2s + stoptrigger.sh; trbcmdlocal w 0xff7f 0x8307 0 ; starttrigger.sh + echo \"Repairing trbnetd and pexor done\" + sleep 130; + " + ' diff --git a/evtbuild/eb.conf b/evtbuild/eb.conf index d3d7e02..786c207 120000 --- a/evtbuild/eb.conf +++ b/evtbuild/eb.conf @@ -1 +1 @@ -eb.conf.mai14_withRFIO \ No newline at end of file +eb_bnet_ltsm.conf \ No newline at end of file diff --git a/evtbuild/eb.conf.mai14_noRFIO b/evtbuild/eb.conf.mai14_noRFIO new file mode 100644 index 0000000..0b6bbd3 --- /dev/null +++ b/evtbuild/eb.conf.mai14_noRFIO @@ -0,0 +1,221 @@ +# +# #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: 1500 + +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 + +# 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: 1 1 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 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_PATH: /hadesmay14raw/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/may14 +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +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 diff --git a/evtbuild/eb.conf.mai14_noRFIO_noDABC b/evtbuild/eb.conf.mai14_noRFIO_noDABC new file mode 100644 index 0000000..ceda161 --- /dev/null +++ b/evtbuild/eb.conf.mai14_noRFIO_noDABC @@ -0,0 +1,224 @@ +# +# #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: 1500 + +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 + +# 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: 1 1 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 0 0 0 0 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 + + +# 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_PATH: /hadesmay14raw/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/may14 +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +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 +G: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + +#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: 2 +RESNUMEVENTS: 20000 +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 diff --git a/evtbuild/eb.conf.mai14_withRFIO b/evtbuild/eb.conf.mai14_withRFIO new file mode 100644 index 0000000..ee2e5f3 --- /dev/null +++ b/evtbuild/eb.conf.mai14_withRFIO @@ -0,0 +1,227 @@ +# +# #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 + +# 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 + + +# 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: 0 0 0 0 0 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: /hadesaug14raw/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/aug14/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 diff --git a/evtbuild/eb.conf.mai14_withRFIO.oldsyntax b/evtbuild/eb.conf.mai14_withRFIO.oldsyntax new file mode 100644 index 0000000..39da8a3 --- /dev/null +++ b/evtbuild/eb.conf.mai14_withRFIO.oldsyntax @@ -0,0 +1,210 @@ +# +# #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: 1500 + +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 + +# 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 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_pcOptions: wb +#### if LUSTRE fails, switch the following RFIO_iCopyMode to 0: ##### +# 0 no copy to Lustre +# 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/may14 +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +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 diff --git a/evtbuild/eb.conf.mai14_withRFIO_noDABC b/evtbuild/eb.conf.mai14_withRFIO_noDABC new file mode 100644 index 0000000..bf53b40 --- /dev/null +++ b/evtbuild/eb.conf.mai14_withRFIO_noDABC @@ -0,0 +1,223 @@ +# +# #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: 1500 + +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 + +# 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: 1 1 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 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_PATH: /hadesmay14raw/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/may14 +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +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 +G: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + +#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 diff --git a/evtbuild/eb.conf.mai14_with_DABC_withRFIO b/evtbuild/eb.conf.mai14_with_DABC_withRFIO new file mode 100644 index 0000000..8dd29d2 --- /dev/null +++ b/evtbuild/eb.conf.mai14_with_DABC_withRFIO @@ -0,0 +1,220 @@ +# +# #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: 1500 + +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 + +# 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: 1 1 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 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_PATH: /hadesmay14raw/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/may14/default +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +RFIO_iMaxFile: 100 +RFIO_iPathConvention: 1 + +# 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 diff --git a/evtbuild/eb.conf.nov14_withRFIO b/evtbuild/eb.conf.nov14_withRFIO new file mode 100644 index 0000000..ff4091c --- /dev/null +++ b/evtbuild/eb.conf.nov14_withRFIO @@ -0,0 +1,227 @@ +# +# #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 + +# 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 diff --git a/evtbuild/eb.conf.nov16 b/evtbuild/eb.conf.nov16 new file mode 100644 index 0000000..ff4091c --- /dev/null +++ b/evtbuild/eb.conf.nov16 @@ -0,0 +1,227 @@ +# +# #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 + +# 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 diff --git a/evtbuild/eb.conf.nov2016 b/evtbuild/eb.conf.nov2016 new file mode 100644 index 0000000..ff4091c --- /dev/null +++ b/evtbuild/eb.conf.nov2016 @@ -0,0 +1,227 @@ +# +# #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 + +# 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 diff --git a/evtbuild/eb.conf.withdabc b/evtbuild/eb.conf.withdabc new file mode 100644 index 0000000..e6926d0 --- /dev/null +++ b/evtbuild/eb.conf.withdabc @@ -0,0 +1,220 @@ +# +# #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: 1500 + +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 + +# 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: 1 1 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 + + +# 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) +EB_LOG: 0 0 0 0 0 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=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: rfiodaq:gstore:/hadesmay14raw/prod01 +RFIO_PATH: /hadesmay14raw/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/may14 +RFIO_iCopyFraction: 1 +# Maxfile 100, pathconvention 1 to create new subfolder on lustre after 100 events +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 diff --git a/evtbuild/eb_bnet.conf b/evtbuild/eb_bnet.conf new file mode 100644 index 0000000..a0656cf --- /dev/null +++ b/evtbuild/eb_bnet.conf @@ -0,0 +1,240 @@ +# +# #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 diff --git a/evtbuild/eb_bnet_ltsm.conf b/evtbuild/eb_bnet_ltsm.conf new file mode 100644 index 0000000..bb2f8d0 --- /dev/null +++ b/evtbuild/eb_bnet_ltsm.conf @@ -0,0 +1,278 @@ +# +# #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 +#BNETINP: 2 2 2 2 +BNETBLD: 2 2 2 2 +#BNETBLD: 3 3 3 3 +#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 + +### JAM May2017 something new: +# LTSM - RFIO successor for tape storage interface +# LTSM switch (on=1/off=0) for 16 EB processes +# note: for bnet mode, only flag of EB15 is used! +# EB Nr 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 +#LTSM: 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 +LTSM: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 +#LTSM: 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + +# LTSM default options for all EB processes + +LTSM_PATH: /lustre/hebe/hades/test2017/sep29 +#LTSM_PATH: /home/hadaq/raw/jun17/default +#LTSM_PATH: /home/hadaq/raw/jun17/default +LTSM_Server: lxltsm01-tsm-server + +#LTSM_Node: LTSM_TEST01 +#LTSM_Passwd: LTSM_TEST01 + +LTSM_Node: lxbkhebe +LTSM_Passwd: lxbkhebe + + +LTSM_Filesystem: /lustre/hebe + + + + + + + +########## end LTSM + + + + +# 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 diff --git a/evtbuild/start_eb_dabc.pl b/evtbuild/start_eb_dabc.pl new file mode 100755 index 0000000..13dd817 --- /dev/null +++ b/evtbuild/start_eb_dabc.pl @@ -0,0 +1,1436 @@ +#!/usr/bin/perl -w + +use English; +use strict; +use Getopt::Long; +use Data::Dumper; +use Config::Std; +use FileHandle; +use List::MoreUtils qw(any apply first_index); +use File::Basename; +use Cwd; + +#- Copy all the arguments because +# later on the @ARGV becomes empty +my @arg_list = @ARGV; + +#- the command line option flags +my $opt_help = 0; +my $opt_ebconf = "/home/hadaq/trbsoft/hadesdaq/evtbuild/eb.conf.withdabc"; +my $opt_ioc = ""; +my $opt_test = 0; +my $opt_verb = 0; +my $opt_eb = ""; +my @opt_ebrange = (); +my $opt_rfio = 'undef'; +my $opt_disk = 'undef'; +my $opt_online = 'undef'; +my $opt_prefix; + +GetOptions ('h|help' => \$opt_help, + 'c|conf=s' => \$opt_ebconf, + 'e|eb=s' => \$opt_eb, + 'i|ioc=s' => \$opt_ioc, + 't|test' => \$opt_test, + 'n|nr=s' => \@opt_ebrange, + 'd|disk=s' => \$opt_disk, + 'r|rfio=s' => \$opt_rfio, + 'p|prefix=s' => \$opt_prefix, + 'o|online=s' => \$opt_online, + 'v|verb' => \$opt_verb); + +if( $opt_help ) { + &help(); + exit(0); +} + +#- List of EBs provided via command line options +my $active_EBs_aref = &setArgs(); + +#- Hash with status of CPU cores of EBs (used for 'taskset') +my %EB_CPU_status; +my $EB_CPU_status_href = \%EB_CPU_status; +&init_CPU_status($EB_CPU_status_href); + +my $expect_ioc_script = "/tmp/ioc_exit.exp"; +my $log_path = "/tmp/log"; + +my %temp_args; +my $temp_args_href = \%temp_args; +read_config $opt_ebconf => %$temp_args_href; +#print Dumper $temp_args_href; +#exit; + +my $numOfEBProcs = 0; +my %EB_Args; +my $EB_Args_href = \%EB_Args; + +my @EB_IP_list; + +&getEBArgs( $EB_Args_href ); + +if($opt_ioc eq "start"){ + &killIOC(); + &startIOC(); +} +elsif($opt_ioc eq "stop"){ + &killIOC(); +} +elsif($opt_eb eq "start"){ + &writeArgs2file(); + &startEvtBuilders(); +} +elsif($opt_eb eq "stop"){ + &stopEvtBuilders(); +} +elsif($opt_eb eq "restart"){ + &stopEvtBuilders(); + sleep 1; + &writeArgs2file(); + &startEvtBuilders(); +} + +exit(0); + +################### END OF MAIN #################### + +sub help() +{ + print "\n"; + print << 'EOF'; +start_eb_gbe.pl + + This script starts parallel Event Building processes. + The script also starts IOC processes for the run control. + +Usage: + + Command line: start_eb_gbe.pl + [-h|--help] : Show this help. + [-c|--conf ] : Path to the config file (default: ../evtbuild/eb.conf). + [-e|--eb ] : Start or stop Event Builders (default: start). + [-i|--ioc ] : Start or stop IOCs (default: start). + [-n|--nr ] : Range of numbers of Event Bulders to be started. + [-d|--disk ] : Switch writing to disk on|off. + [-r|--rfio ] : Switch writing to tape on|off. + [-p|--prefix ] : Prefix of hld file. + [-o|--online ] : Switch RPC server on|off. + [-t|--test] : Test without execution. + [-v|--verb] : More verbouse. + +Examples: + + Start 6 EBs with the numbers 1,2,3,5,7 and prefix 'md': + start_eb_gbe.pl -e start -n 1-3 -n 5 -n 7 -p md + + Start EBs and enable writing to disks but disable writing to tape for all EBs: + start_eb_gbe.pl -e start --disk on --rfio off + +EOF +} + +sub init_CPU_status() +{ + my ($EB_CPU_status_href) = @_; + + # CPU affinity with 'taskset' + # + # CPU dec bin hex + # 0 1 1 + # 1 10 2 + # 2 100 4 + # 3 1000 8 + # 4 10000 10 + + #cores 0/1 reserved for system 02-05 + #cores 2/3 reserved for interrupts on 02-05 + +#lxhadeb01 is gone +# foreach my $core (0..7){ +# if($core == 1){ +# $EB_CPU_status_href->{'192.168.100.11'}->{$core} = "res"; #reserved +# } +# else{ +# $EB_CPU_status_href->{'192.168.100.11'}->{$core} = "free"; +# } +# } + +#JAM adjust this to actual affinities for eth0 settings TODO + + foreach my $core (0..11){ + if($core < 4 ){ + $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "res"; #reserved + $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "res"; #reserved + $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "res"; #reserved + } + else{ + $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "free"; + $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "free"; + $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "free"; + } + } + + foreach my $core (0..23){ + if($core < 4 ){ + $EB_CPU_status_href->{'192.168.100.15'}->{$core} = "res"; #reserved + } + else{ + $EB_CPU_status_href->{'192.168.100.15'}->{$core} = "free"; + } + } + +} + +sub getCoreNr() +{ + my ($ip) = @_; + + my $core_nr; + + foreach my $eb_ip (sort keys %$EB_CPU_status_href){ + next unless($ip eq $eb_ip); + + foreach my $core ( sort {$a <=> $b} keys %{$EB_CPU_status_href->{$eb_ip}} ){ + my $core_status = $EB_CPU_status_href->{$eb_ip}->{$core}; + + next unless(lc($core_status) eq "free"); + + $core_nr = $core; + $EB_CPU_status_href->{$eb_ip}->{$core} = "busy"; + last; + } + } + + #- If no free cores left - take reserved cores + unless( defined $core_nr ){ + foreach my $eb_ip (sort keys %$EB_CPU_status_href){ + next unless($ip eq $eb_ip); + + foreach my $core ( sort {$a <=> $b} keys %{$EB_CPU_status_href->{$eb_ip}} ){ + my $core_status = $EB_CPU_status_href->{$eb_ip}->{$core}; + + if(lc($core_status) eq "res"){ + $core_nr = $core; + $EB_CPU_status_href->{$eb_ip}->{$core} = "busy"; + last; + } + } + } + } + + unless( defined $core_nr ){ + print "No free cores left on CPU $ip. Exit.\n"; + exit(0); + } + + return $core_nr; +} + +sub setArgs() +{ + my @active_EBs; + + if(@opt_ebrange){ + foreach my $range (@opt_ebrange){ + if($range =~ /(\d+)-(\d+)/){ + my $max = $1; + my $min = $2; + + foreach my $eb ($max..$min){ + #- 1 must be subtracted to match + # EB numbering in the register_configgbe_ip.db + # which starts from zero + &checkEB_nr($eb); + push(@active_EBs, $eb-1); + } + } + elsif($range =~ /(\d+)/){ + &checkEB_nr($1); + push(@active_EBs, $1-1); + } + } + } + + return \@active_EBs; +} + +sub checkEB_nr() +{ + my ($eb_nr) = @_; + + if( $eb_nr < 1 || $eb_nr > 16 ){ + print "ERROR: EB number should be in the range 1-16. Exit."; + exit(0); + } +} + +sub getEBArgs() +{ + my ($href) = @_; + + my $prefix = $temp_args_href->{'Main'}->{'EB_EXT'}; + $prefix = $opt_prefix if( defined $opt_prefix ); + my $filesize = $temp_args_href->{'Main'}->{'EB_FSIZE'}; + + my $base_port = $temp_args_href->{'Parallel'}->{'BASE_PORT'}; + my $shift_port = $temp_args_href->{'Parallel'}->{'SHIFT_PORT'}; + my $source_num = $temp_args_href->{'Parallel'}->{'NUM_OF_SOURCES'}; + my $queuesize = $temp_args_href->{'Parallel'}->{'QUEUESIZE'}; + + my $multidisk = $temp_args_href->{'Parallel'}->{'MULTIDISK'}; + + #- Number of EB process + my $ebproc = 0; + + #- List of BEs + my $listOfEBs = $temp_args_href->{'Parallel'}->{'EB_LIST'}; + my @eb_list = split(/\s+/, $listOfEBs); + + #- DABC mode selection + my $listOfDABC = $temp_args_href->{'Parallel'}->{'DABC'}; + my @dabc_list = split(/\s+/, $listOfDABC); + + + #- Default RFIO settings + my $rfio = $temp_args_href->{'Parallel'}->{'RFIO'}; + my $rfio_path = $temp_args_href->{'Parallel'}->{'RFIO_PATH'}; + my $rfio_pcOptions = $temp_args_href->{'Parallel'}->{'RFIO_pcOptions'}; + my $rfio_iCopyMode = $temp_args_href->{'Parallel'}->{'RFIO_iCopyMode'}; + my $rfio_pcCopyPath = $temp_args_href->{'Parallel'}->{'RFIO_pcCopyPath'}; + my $rfio_iCopyFrac = $temp_args_href->{'Parallel'}->{'RFIO_iCopyFraction'}; + my $rfio_iMaxFile = $temp_args_href->{'Parallel'}->{'RFIO_iMaxFile'}; + my $rfio_iPathConv = $temp_args_href->{'Parallel'}->{'RFIO_iPathConvention'}; + + my @rfio_list = split(/\s+/, $rfio); + + #- EPICS Controled + my $epics_ctrl = $temp_args_href->{'Parallel'}->{'EPICS_CTRL'}; + + my @epics_list = split(/\s+/, $epics_ctrl); + + #- Logging the output of EBs + my $eb_log = $temp_args_href->{'Parallel'}->{'EB_LOG'}; + my $nm_log = $temp_args_href->{'Parallel'}->{'NM_LOG'}; + my @eblog_list = split(/\s+/, $eb_log); + my @nmlog_list = split(/\s+/, $nm_log); + + #- Write to disk + my $write2disk = $temp_args_href->{'Parallel'}->{'WRITE_TO_DISK'}; + my @write2disk_list = split(/\s+/, $write2disk); + + #--- Read GbE configuration + my %eb_ids_gbe_hash; + my $eb_ids_gbe_href = \%eb_ids_gbe_hash; + + &getGbEconfig($eb_ids_gbe_href); + + #--- Loop over all EB processes + #print Dumper $eb_ids_gbe_href; + #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(@$active_EBs_aref){ + next unless( any {$_ == $ebproc} @$active_EBs_aref ); #from command line args + } + else{ + next unless( $eb_list[$ebproc] ); #from eb.conf + } + + + my $eb_ip = $eb_ids_gbe_href->{$ebproc}->{'IP'}; + + #- Save IP needed by other function to stop EBs. + push(@EB_IP_list, $eb_ip) unless( any {$_ eq $eb_ip} @EB_IP_list ); + + #- Some checks on number of EB processes + die "Number of EB processes exceeds the number in RFIO setting! Exit." if($ebproc > $#rfio_list); + die "Number of EB processes exceeds the number in EPICS_CTRL setting! Exit." if($ebproc > $#epics_list); + + #- Here we can overwrite default rfio settings with individual settings per EB processes + my $procname = sprintf("EB_PROC_%d", 1+$ebproc); + # $rfio_iCopyMode = $temp_args_href->{$procname}->{'RFIO_iCopyMode'}; + + $href->{$ebproc}->{'IP'} = $eb_ip; + $href->{$ebproc}->{'EBNUM'} = $ebproc+1; + $href->{$ebproc}->{'BASEPORT'} = $base_port; + $href->{$ebproc}->{'PORT_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'port_list'}; + $href->{$ebproc}->{'SOURCENUM'} = scalar @{$eb_ids_gbe_href->{$ebproc}->{'port_list'}}; + $href->{$ebproc}->{'BUFSIZE_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'bufsize_list'}; + $href->{$ebproc}->{'PREFIX'} = $prefix; + $href->{$ebproc}->{'QUEUESIZE'} = $queuesize; + $href->{$ebproc}->{'MULTIDISK'} = $multidisk; + $href->{$ebproc}->{'FILESIZE'} = $filesize; + + if( defined $temp_args_href->{$procname}->{'MULTIDISK'} ){ + $href->{$ebproc}->{'MULTIDISK'} = $temp_args_href->{$procname}->{'MULTIDISK'}; + } + elsif($multidisk){ + $href->{$ebproc}->{'MULTIDISK'} = $href->{$ebproc}->{'EBNUM'}; + } + else{ + $href->{$ebproc}->{'MULTIDISK'} = $multidisk; + } + + if( defined $temp_args_href->{$procname}->{'RESDOWNSCALE'} ){ + $href->{$ebproc}->{'RESDOWNSCALE'} = $temp_args_href->{$procname}->{'RESDOWNSCALE'}; + $href->{$ebproc}->{'RESNUMEVENTS'} = $temp_args_href->{$procname}->{'RESNUMEVENTS'}; + $href->{$ebproc}->{'RESPATH'} = $temp_args_href->{$procname}->{'RESPATH'}; + $href->{$ebproc}->{'RESSIZELIMIT'} = $temp_args_href->{$procname}->{'RESSIZELIMIT'}; + } + + if( defined $temp_args_href->{$procname}->{'ONLINESERVER'} ){ + if($opt_online eq "on"){ + $href->{$ebproc}->{'ONLINESERVER'} = "on"; + } + elsif($opt_online eq "off"){ + $href->{$ebproc}->{'ONLINESERVER'} = "off"; + } + else{ + $href->{$ebproc}->{'ONLINESERVER'} = $temp_args_href->{$procname}->{'ONLINESERVER'}; + } + } + else{ + $href->{$ebproc}->{'ONLINESERVER'} = "off"; + } + + $href->{$ebproc}->{'RFIO'} = $rfio_list[$ebproc] if(lc($opt_rfio) eq 'undef'); # 0|1 + $href->{$ebproc}->{'RFIO'} = 1 if(lc($opt_rfio) eq 'on'); # 0|1 + $href->{$ebproc}->{'RFIO'} = 0 if(lc($opt_rfio) eq 'off'); # 0|1 + $href->{$ebproc}->{'RFIO_PATH'} = $rfio_path; + $href->{$ebproc}->{'RFIO_pcOptions'} = $rfio_pcOptions; + $href->{$ebproc}->{'RFIO_iCopyMode'} = $rfio_iCopyMode; + $href->{$ebproc}->{'RFIO_pcCopyPath'} = $rfio_pcCopyPath; + $href->{$ebproc}->{'RFIO_iCopyFrac'} = $rfio_iCopyFrac; + $href->{$ebproc}->{'RFIO_iMaxFile'} = $rfio_iMaxFile; + $href->{$ebproc}->{'RFIO_iPathConv'} = $rfio_iPathConv; + + $href->{$ebproc}->{'EPICS_CTRL'} = $epics_list[$ebproc]; # 0|1 + + $href->{$ebproc}->{'DABC'} = $dabc_list[$ebproc]; # 0|1 + + + $href->{$ebproc}->{'EB_LOG'} = $eblog_list[$ebproc]; # 0|1 + $href->{$ebproc}->{'NM_LOG'} = $nmlog_list[$ebproc]; # 0|1 + + if( $write2disk_list[$ebproc] && lc($opt_disk) eq 'undef' ){ + if(&isVarDefined($temp_args_href->{$procname}->{'OUTDIR'}, "OUTDIR for $procname")){ + $href->{$ebproc}->{'OUTDIR'} = $temp_args_href->{$procname}->{'OUTDIR'}; + } + } + elsif( lc($opt_disk) eq 'on' ){ + if(&isVarDefined($temp_args_href->{$procname}->{'OUTDIR'}, "OUTDIR for $procname")){ + $href->{$ebproc}->{'OUTDIR'} = $temp_args_href->{$procname}->{'OUTDIR'}; + } + } + elsif( lc($opt_disk) eq 'off' ){ + #- do not do anything. If $href->{$ebproc}->{'OUTDIR'} is undefined, + # the data will go to /dev/null + } + } + + $numOfEBProcs = $ebproc; +} + +sub isVarDefined() +{ + my ($var, $msg) = @_; + + my $retval = 1; + + unless( defined $var ){ + print "Undefined variable found: $msg\n"; + $retval = 0; + } + + return $retval; +} + +sub getVarSizeArg() +{ + my ($ebproc) = @_; + + my $i = 0; + my $arg = " "; + + foreach my $size (@{$EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}}){ + + if($EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}->[$i] == + $EB_Args_href->{$ebproc}->{'QUEUESIZE'}){ + $i++; + next; + } + + $arg = $arg . " -Q " . $i . ":" . $EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}->[$i]; + $i++; + } + + return $arg; +} + +sub startEvtBuilders() +{ + + my $username = "hadaq"; + + my (@process_list); + + foreach my $ebproc (sort {$a <=> $b} keys %$EB_Args_href){ + + my $ebnum2print = $ebproc+1; + print "EB process: $ebnum2print\n"; + + +# JAM first test if we should activate dabc eventbuilder or old one + + if( $EB_Args_href->{$ebproc}->{'DABC'} ){ + print "Starting DABC process..\n"; +# TODO: here evaluate parameters and code into dabc command execution + +#". /home/joern/dabcwork/head/dabclogin;cd /home/joern/dabcwork/head/plugins/hadaq/app; export EBNUM=1; export STREAMS=5; export UDP00=10101; export UDP01=10102; export UDP02=10103; export UDP03=10104; export UDP04=10105 export PREFIX=be; /home/joern/dabcwork/head/bin/dabc_exe EventBuilderHades.xml &" > /dev/null 2>&1 & + + my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; + my $dabclogin = ". /home/hadaq/soft/dabc/head/dabclogin;"; + my $cdworkdir = "cd //home/hadaq/oper;"; + + my $cmd_dabc = "/home/hadaq/soft/dabc/head/bin/dabc_exe "; + my $conf_dabc = " EventBuilderHades.xml"; + my $exports = " export EBNUM=" . $EB_Args_href->{$ebproc}->{'EBNUM'} . "; " . + " export STREAMS=" . $EB_Args_href->{$ebproc}->{'SOURCENUM'} . "; " . + " export PREFIX=" . $EB_Args_href->{$ebproc}->{'PREFIX'}. "; " ; + + my @port_list = (); + + #- add ports + my $ix =0; + foreach my $port (@{$EB_Args_href->{$ebproc}->{'PORT_LIST'}}){ + #$cmd_nm = $cmd_nm . " -i UDP:0.0.0.0:" . $port; + my $index=sprintf("%02d", $ix++); + $exports = $exports . " export UDP". $index. "=" . $port . "; "; + push(@port_list, $port); + } + &cpPortList2EB(\@port_list, $EB_Args_href->{$ebproc}->{'EBNUM'}, $cpu); + + + + + + +# MULTIDISK + +#- add output type + + if($EB_Args_href->{$ebproc}->{'OUTDIR'} ){ + $exports = $exports . " export FILEOUTPUTS=2;"; + if($EB_Args_href->{$ebproc}->{'MULTIDISK'}){ + $exports = $exports . "export DAQDISK=1; export OUTDIR=/data01; "; + } + else{ + $exports = $exports . "export DAQDISK=0; export OUTDIR=" . $EB_Args_href->{$ebproc}->{'OUTDIR'} .";"; + } + } + else{ + $exports = $exports . " export FILEOUTPUTS=1;"; + # no output except for the stream server... + } + + +# additional exports for RFIO + + $exports = $exports . " export RFIOPATH=". $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . ";"; + $exports = $exports . " export RFIOLUSTREPATH=". $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . ";"; + $exports = $exports . " export RFIOCOPYMODE=". $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . ";"; + $exports = $exports . " export RFIOCOPYFRAC=". $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . ";"; + $exports = $exports . " export RFIOMAXFILE=". $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . ";"; + $exports = $exports . " export RFIOPATHCONV=". $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'} . ";"; + + +if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ + $exports = $exports . " export FILEOUTPUTS=3;"; + +# switch on by number of outputs +} + + +# my $rfio; +# if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ +# $rfio = " --rfio " . $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . +# " --rfiolustre " . $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . +# " --rfio_pcoption " . $EB_Args_href->{$ebproc}->{'RFIO_pcOptions'} . +# " --rfio_icopymode " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . +# " --rfio_icopyfrac " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . +# " --rfio_imaxfile " . $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . +# " --rfio_ipathconv " . $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'}; +# } + + +# EPICSCONTROL ? always enabled for production +# SMALLFILES for online monitoring node + + + my $core_nr = &getCoreNr($cpu); + +# JAM use fixed core number for kp1pc092 tests: +# my $core_nr = 1; + my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_dabc &\""; + + + + my $log = $log_path . "/log_" . $ebproc . "_" . "startEB.txt"; + #my $log = "/dev/null 2>&1"; + + print "Forking:" . $exe_dabc ."\n"; + forkMe($exe_dabc, $log, \@process_list) unless($opt_test); + +} + +else +{ +# the standard EB processes mode: + print "Starting evtbuild/netmem processes..\n"; + + #--- Prepare execution of daq_evtbuild + my $cmd_eb = "/home/hadaq/bin/daq_evtbuild" . + " -m " . $EB_Args_href->{$ebproc}->{'SOURCENUM'} . + " -q " . $EB_Args_href->{$ebproc}->{'QUEUESIZE'} . + " -S " . $EB_Args_href->{$ebproc}->{'EBNUM'} . + " --ebnum " . $EB_Args_href->{$ebproc}->{'EBNUM'} . + " -x " . $EB_Args_href->{$ebproc}->{'PREFIX'}; + + #- add queue variable size args + my $varsize_arg = &getVarSizeArg($ebproc); + $cmd_eb = $cmd_eb . $varsize_arg; + + #- add output type + if( defined $EB_Args_href->{$ebproc}->{'OUTDIR'} ){ + if($EB_Args_href->{$ebproc}->{'MULTIDISK'}){ + $cmd_eb = $cmd_eb . " -d file -o " . "/data01/data"; + } + else{ + $cmd_eb = $cmd_eb . " -d file -o " . $EB_Args_href->{$ebproc}->{'OUTDIR'}; + } + } + else{ + $cmd_eb = $cmd_eb . " -d null"; + } + + #- add file size + $cmd_eb = $cmd_eb . " --filesize " . $EB_Args_href->{$ebproc}->{'FILESIZE'}; + + #- add second output with small hdl files + if( defined $EB_Args_href->{$ebproc}->{'RESDOWNSCALE'} ){ + $cmd_eb = $cmd_eb . " --resdownscale " . $EB_Args_href->{$ebproc}->{'RESDOWNSCALE'} . + " --resnumevents " . $EB_Args_href->{$ebproc}->{'RESNUMEVENTS'} . + " --respath " . $EB_Args_href->{$ebproc}->{'RESPATH'} . + " --ressizelimit " . $EB_Args_href->{$ebproc}->{'RESSIZELIMIT'}; + } + + my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; + + #- add rfio args + my $rfio; + if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ + $rfio = " --rfio rfiodaq:gstore:" . $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . + " --rfiolustre " . $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . + " --rfio_pcoption " . $EB_Args_href->{$ebproc}->{'RFIO_pcOptions'} . + " --rfio_icopymode " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . + " --rfio_icopyfrac " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . + " --rfio_imaxfile " . $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . + " --rfio_ipathconv " . $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'}; + } + + $cmd_eb = $cmd_eb . $rfio if( defined $rfio ); + + #- add multiple disk arg (ctrl via daq_disks) + if($EB_Args_href->{$ebproc}->{'MULTIDISK'} && + defined $EB_Args_href->{$ebproc}->{'OUTDIR'}){ + $cmd_eb = $cmd_eb . " --multidisk " . $EB_Args_href->{$ebproc}->{'MULTIDISK'}; + } + + #- add online RPC server + if( $EB_Args_href->{$ebproc}->{'ONLINESERVER'} eq "on" ){ + $cmd_eb = $cmd_eb . " --online"; + } + + #- add epics controlled + $cmd_eb = $cmd_eb . " --epicsctrl " if( $EB_Args_href->{$ebproc}->{'EPICS_CTRL'} ); + + #- logging the output + my $eblog_file = "/tmp/log_eb_" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".txt"; + my $eb_log = "1>$eblog_file 2>$eblog_file"; + $eb_log = "1>/dev/null 2>/dev/null" unless( $EB_Args_href->{$ebproc}->{'EB_LOG'} ); + + my $time = 1. * $ebproc; + my $sleep_cmd = "sleep " . $time; + + my $core_nr = &getCoreNr($cpu); + + my $exe_eb = "ssh -n $cpu -l $username \"cd /home/hadaq/oper; export DAQ_SETUP=/home/hadaq/oper/eb; taskset -c $core_nr $cmd_eb $eb_log &\""; + + #print "exec: $exe_eb\n"; + + #--- Prepare execution of daq_netmem + my $cmd_nm = "/home/hadaq/bin/daq_netmem" . + " -m " . $EB_Args_href->{$ebproc}->{'SOURCENUM'} . + " -q " . $EB_Args_href->{$ebproc}->{'QUEUESIZE'} . + " -S " . $EB_Args_href->{$ebproc}->{'EBNUM'}; + + #- add queue variable size args + $cmd_nm = $cmd_nm . $varsize_arg; + + my @port_list = (); + + #- add ports + foreach my $port (@{$EB_Args_href->{$ebproc}->{'PORT_LIST'}}){ + #$cmd_nm = $cmd_nm . " -i UDP:0.0.0.0:" . $port; + $cmd_nm = $cmd_nm . " -i " . $port; + + push(@port_list, $port); + } + + &cpPortList2EB(\@port_list, $EB_Args_href->{$ebproc}->{'EBNUM'}, $cpu); + + #- logging the output + my $nmlog_file = "/tmp/log_nm_" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".txt"; + my $nm_log = "1>$nmlog_file 2>$nmlog_file"; + $nm_log = "1>/dev/null 2>/dev/null" unless( $EB_Args_href->{$ebproc}->{'NM_LOG'} ); + + $core_nr = &getCoreNr($cpu); + + my $exe_nm = "ssh -n $cpu -l $username \"cd /home/hadaq/oper; export DAQ_SETUP=/home/hadaq/oper/eb; taskset -c $core_nr $cmd_nm $nm_log &\""; + + #print "exec: $exe_nm\n"; + + #--- Open permissions for shared memory + my $eb_shmem = "daq_evtbuild" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".shm"; + my $nm_shmem = "daq_netmem" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".shm"; + my $exe_open_eb = "ssh -n $cpu -l $username \"chmod 775 /dev/shm/$eb_shmem\""; + my $exe_open_nm = "ssh -n $cpu -l $username \"chmod 775 /dev/shm/$nm_shmem\""; + + &forkEB($exe_eb, $exe_nm, $exe_open_eb, $exe_open_nm, \@process_list); + } + +} +# if dabc + + #- Wait for children + foreach my $cur_child_pid (@process_list) { + waitpid($cur_child_pid,0); + } + +} +# foreach + +sub stopEvtBuilders() +{ + my $username = "hadaq"; + + my @process_list = (); + + #--- Loop over server IPs + foreach my $ip (@EB_IP_list){ + + my $exe = "ssh -n $ip -l $username \"/home/hadaq/bin/cleanup_evtbuild.pl; /home/hadaq/bin/ipcrm.pl\""; + + if($opt_verb){ + print "Killing running EBs...\n"; + print "Exec: $exe\n"; + } + + my $log = $log_path . "/log_" . $ip . "_" . "stopEB.txt"; + + forkMe($exe, $log, \@process_list) unless($opt_test); + } + + #- Wait for children + foreach my $cur_child_pid (@process_list) { + print "wait for $cur_child_pid\n"; + waitpid($cur_child_pid,0); + } +} + +sub cpPortList2EB() +{ + my ($port_list_aref, $ebnr, $cpu) = @_; + + my $tmpfile = "/tmp/eb" . $ebnr . "_" . $cpu . ".txt"; + + #- First write ports to tmp file + my $fh = new FileHandle(">$tmpfile"); + + if(!$fh) { + my $txt = "\nError! Could not open file \"$tmpfile\" for output. Exit.\n"; + print STDERR $txt; + print $txt; + exit(128); + } + + foreach my $port (@$port_list_aref){ + print $fh "$port\n"; + } + + $fh->close(); + + #- Copy this tmp file to EB + my $exe_cp = "scp $tmpfile hadaq\@$cpu:/tmp/ 1>/dev/null 2>/dev/null"; + system($exe_cp); +} + +sub startIOC() +{ + my $ioc_dir = "/home/scs/ebctrl/ioc/iocBoot/iocebctrl"; + + &writeIOC_stcmd( $ioc_dir ); + + print "Starting IOCs...\n" if($opt_verb); + + foreach my $ebproc (keys %$EB_Args_href){ + + my $stcmd = sprintf("st_eb%02d.cmd", 1 + $ebproc); + my $screen_name = sprintf("ioc_eb%02d", 1 + $ebproc); + + my $cmd = "bash; . /home/scs/.bashrc; export HOSTNAME=\\\$(hostname); cd $ioc_dir; screen -dmS $screen_name ../../bin/linux-x86_64/ebctrl $stcmd"; + my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; + + my $exe = "ssh -n $cpu -l scs \"$cmd\""; + + print "Exec: $exe\n" if($opt_verb); + system($exe) unless($opt_test); + } +} + +sub smallestEBProcNum() +{ + my $smallest = 1000; + + foreach my $ebproc (keys %$EB_Args_href){ + $smallest = $ebproc if($smallest > $ebproc); + } + + return $smallest; +} + +sub writeIOC_stcmd() +{ + my ($ioc_dir) = @_; + + print "Copying st.cmd files to servers...\n" if($opt_verb); + + my $smallest_ebproc = &smallestEBProcNum(); + + foreach my $ebproc (keys %$EB_Args_href){ + + my $ebNr = 1 + $ebproc; + my $ebnum = sprintf("eb%02d", $ebNr); + + #- in MBytes + my $maxFileSize = $EB_Args_href->{$ebproc}->{'FILESIZE'}; + + my $ebtype = "slave"; + my $comment_genrunid = "#"; + my $comment_totalevt = "#"; + + if($ebproc == $smallest_ebproc){ + $ebtype = "master"; + $comment_genrunid = ""; + $comment_totalevt = ""; + } + +# if($ebNr == 1){ +# $comment_totalevt = ""; +# } + + my $ioc_stcmd = < \${TOP}/iocBoot/\${IOC}/$ebnum.dbl + +EOF + + my $outfile = "/tmp/st_" . $ebnum . ".cmd"; + my $fh = new FileHandle(">$outfile"); + + if(!$fh) { + my $txt = "\nError! Could not open file \"$outfile\" for output. Exit.\n"; + print STDERR $txt; + print $txt; + exit(128); + } + + print $fh $ioc_stcmd; + $fh->close(); + + my $ip = $EB_Args_href->{$ebproc}->{'IP'}; + my $cmd = "scp $outfile scs\@$ip:$ioc_dir/."; + + print "Exec: $cmd\n" if($opt_verb); + system($cmd) unless($opt_test); + } +} + +sub killIOC() +{ + my %ioc; + my $ioc_href = \%ioc; + + print "Looking for running IOCs...\n" if($opt_verb); + + #--- Loop over server IPs + foreach my $ip (@EB_IP_list){ + + &findRunningIOC($ip, $ioc_href); + } + + #print Dumper \%$ioc_href; + + &writeExpectIOC() if(%$ioc_href); + + if($opt_verb){ + print "Killing running IOCs...\n"; + print "No IOCs found - nothing to kill, continue...\n" unless(%$ioc_href); + } + + my (@process_list); + + foreach my $ip ( %$ioc_href ){ + foreach my $ioc ( @{$ioc_href->{$ip}} ){ + + my $cmd = $expect_ioc_script . " " . $ip . " " . $ioc; + my $log = $log_path . "/log_" . $ip . "_" . $ioc . ".txt"; + print "cmd: $cmd\n" if($opt_verb); + &forkMe($cmd, $log, \@process_list); + } + } + + #- Wait for children + foreach my $cur_child_pid (@process_list) { + waitpid($cur_child_pid,0); + } +} + +sub forkMe() +{ + my ($cmd, $log, $proc_list) = @_; + + my $child = fork(); + + if( $child ){ # parent + push( @$proc_list, $child ); + } + elsif( $child == 0 ) { # child + system("$cmd > $log"); + exit(0); + } + else{ + print "Could not fork: $!\n"; + exit(1); + } +} + +sub forkEB() +{ + my ($exe_eb, $exe_nm, $exe_open_eb, $exe_open_nm, $proc_list) = @_; + + my $child = fork(); + + if( $child ){ # parent + push( @$proc_list, $child ); + } + elsif( $child == 0 ) { # child + #--- Execute Event Builder + print "Exec: $exe_eb\n" if($opt_verb); + system($exe_eb) unless($opt_test); + + 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); + + #--- Execute Net-2-Memory + print "Exec: $exe_nm\n" if($opt_verb); + system($exe_nm) unless($opt_test); + + sleep(1); + + #--- Open permissions for NM shared memory + # ! Permissions should be opened by EB process + #print "Exec: $exe_open_nm\n" if($opt_verb); + #system($exe_open_nm) unless($opt_test); + + exit(0); + } + else{ + print "Could not fork: $!\n"; + exit(1); + } +} + +sub findRunningIOC() +{ + my ($cpu, $ioc_href) = @_; + + `ssh -n $cpu -l scs \"screen -wipe\"`; + my $exe = "ssh -n $cpu -l scs \"screen -ls\""; + + my @output = `$exe`; + + foreach my $line (@output){ + if($line =~ /\d+\.(ioc_eb\d{2})\s+/){ + my $name = $1; + push( @{$ioc_href->{$cpu}}, $name ); + print "Found IOC: $name on $cpu\n" if($opt_verb); + } + } +} + +sub writeExpectIOC() +{ + # This expect script can be executed to exit IOC. + + #! Look if /tmp dir exists + my $tmp_dir = dirname("/tmp"); + if ( !(-d $tmp_dir) ){ + print "\nCannot access /tmp directory!\nExit.\n"; + exit(1); + } + + my $expect_script_my = <0} { + set ip [lindex \$argv 0] + set iocname [lindex \$argv 1] +} else { + send_user "Usage: \$argv0 ip iocname\\n" +} + +spawn ssh scs@\$ip + +#expect { +# "error" { exit; } +# "login:" { exit; } +# "Password:" { exit; } +#} + +set timeout 20 +#240 + +expect "~\$ " +send "screen -r \$iocname\\r" +expect "epics> " +send "exit\\r" +expect "~\$ " + +EOF + + my $fh = new FileHandle(">$expect_ioc_script"); + + if(!$fh) { + my $txt = "\nError! Could not open file \"$expect_ioc_script\" for output. Exit.\n"; + print STDERR $txt; + print $txt; + exit(128); + } + + print $fh $expect_script_my; + $fh->close(); + + #- open permissions + system("chmod 755 $expect_ioc_script"); +} + +sub getGbEconfig() +{ + # + # Read DB configurations of GbE and CTS, + # look for active data sources as well as + # for EB IPs and ports. + # + + my ($eb_ids_href) = @_; + + my $data_sources = $temp_args_href->{'Parallel'}->{'DATA_SOURCES'}; + my $gbe_conf = $temp_args_href->{'Parallel'}->{'GBE_CONF'}; + #my $cts_conf = $temp_args_href->{'Parallel'}->{'CTS_CONF'}; + + my %activeSources_hash; + my $activeSources_href = \%activeSources_hash; + + &readActiveSources($data_sources, $activeSources_href); + + my @id_list; + my $id_list_aref = \@id_list; + + #&readEBids($cts_conf, $id_list_aref); + + #- Overwrite array with EB numbers + @id_list = (0 .. 15); + #print Dumper $id_list_aref; + + &readEBports($gbe_conf, $activeSources_href, $id_list_aref, $eb_ids_href); +} + +sub readEBids() +{ + # + # Read EB Ids + # + + my ($file, $id_list_aref) = @_; + + my $nnn_table = 0; + my $val_table = 0; + + my $SPACE = ""; + + my $fh = new FileHandle("$file", "r"); + + while(<$fh>){ + + #- Remove all comments + $_ =~ s{ # Substitue... + \# # ...a literal octothorpe + [^\n]* # ...followed by any number of non-newlines + } + {$SPACE}gxms; # Raplace it with a single space + + #- Skip line if it contains only whitespaces + next unless(/\S/); + + if(/^(\s+)?!Value\stable/){ + $val_table = 1; + $nnn_table = 0; + next; + } + elsif(/^(\s+)?!\w+/){ + $val_table = 0; + $nnn_table = 1; + } + + if($val_table){ + my (@vals) = split(" ", $_); + my @id_list1 = split("", $vals[12]); + my @id_list2 = split("", $vals[13]); + foreach my $id (@id_list1){ + push(@$id_list_aref, hex($id)); + } + foreach my $id (@id_list2){ + push(@$id_list_aref, hex($id)); + } + } + elsif($nnn_table){ + } + } + + $fh->close; +} + +sub readEBports() +{ + # + # Read EB IPs and ports accoring to EB Id (type) + # and TRB-Net addresses of active data sources. + # + + my ($file, $activeSources_href, $id_list_aref, $ports_href) = @_; + + my $nnn_table = 0; + my $val_table = 0; + + my $fh = new FileHandle("$file", "r"); + + &isFileDefined($fh, $file); + + my %tmp; + my $tmp_href = \%tmp; + + my $SPACE = ""; + + while(<$fh>){ + + #print $_; + #- Remove all comments + $_ =~ s{ # Substitue... + \# # ...a literal octothorpe + [^\n]* # ...followed by any number of non-newlines + } + {$SPACE}gxms; # Raplace it with a single space + + #- Skip line if it contains only whitespaces + next unless(/\S/); + + #print $_; + if(/^(\s+)?!Value\stable/){ + $val_table = 1; + $nnn_table = 0; + next; + } + elsif(/^(\s+)?!\w+/){ + $nnn_table = 1; + $val_table = 0; + } + + if($val_table){ + my (@vals) = split(" ", $_); + my $id = $vals[1]; + + #if($id <0 or $id >15) { + # print "error: in $file there is a line with an eventbuilder number different than 0..15, the number given in the file is $id. please correct the config file.\n"; + # exit(128); + #} + + + #- Accept only EB Ids from CTS config file + #print "value: $_"; + next unless( any {$_ eq $id} @$id_list_aref ); + + #print Dumper \@vals; + #print "active sources: "; print Dumper $activeSources_href->{'addr_list'}; + #exit; + + my $ip = &getIP_hex2dec($vals[6]); + my $port = &getPort_hex2dec($vals[2]); + my $addr = $vals[0]; + + #print "got: ip: $ip, port: $port, addr: $addr\n"; + #- Accept only sources from active source list + if( any {hex($_) == hex($addr)} @{$activeSources_href->{'addr_list'}} ){ + $tmp_href->{$id}->{'IP'} = $ip; + push( @{$tmp_href->{$id}->{'port_list'}}, $port ); + push( @{$tmp_href->{$id}->{'addr_list'}}, $addr ); + } + } + } + + $fh->close; + + #print Dumper $tmp_href; + + #- Sort hash according to active data source list + foreach my $id (keys %tmp){ + $ports_href->{$id}->{'IP'} = $tmp_href->{$id}->{'IP'}; + + foreach my $addr (@{$activeSources_href->{'addr_list'}}){ + + my $ind1 = first_index {$_ eq $addr} @{$tmp_href->{$id}->{'addr_list'}}; + my $ind2 = first_index {$_ eq $addr} @{$activeSources_href->{'addr_list'}}; + + next if($ind1 == -1); + + push( @{$ports_href->{$id}->{'port_list'}}, $tmp_href->{$id}->{'port_list'}->[$ind1]); + push( @{$ports_href->{$id}->{'addr_list'}}, $addr); + push( @{$ports_href->{$id}->{'bufsize_list'}}, $activeSources_href->{'bufsize_list'}->[$ind2]); + } + } + + #print Dumper $ports_href; +} + +sub readActiveSources() +{ + # + # Read TRB-Net addresses of active data sources + # + + my ($file, $activeSources_href) = @_; + + my $fh = new FileHandle("$file", "r"); + + &isFileDefined($fh, $file); + + my $SPACE = ""; + + while(<$fh>){ + + #- Remove all comments + $_ =~ s{ # Substitue... + \# # ...a literal octothorpe + [^\n]* # ...followed by any number of non-newlines + } + {$SPACE}gxms; # Raplace it with a single space + + #- Skip line if it contains only whitespaces + next unless(/\S/); + + my ($addr, $astat, $sys, $size) = split(" ", $_); + + next if($astat == 0); + + push( @{$activeSources_href->{'addr_list'}}, $addr); + push( @{$activeSources_href->{'bufsize_list'}}, &getBufSize($size)); + } + + $fh->close; +} + +sub getBufSize() +{ + my ($bufSize) = @_; + + if(lc($bufSize) eq "low"){ + return $temp_args_href->{'Main'}->{'BUF_SIZE_LOW'}; + } + elsif(lc($bufSize) eq "mid"){ + return $temp_args_href->{'Main'}->{'BUF_SIZE_MID'}; + } + elsif(lc($bufSize) eq "high"){ + return $temp_args_href->{'Main'}->{'BUF_SIZE_HIGH'}; + } + else{ + print "Cannot understand $bufSize from data_sources.db.\n"; + exit(0); + } +} + +sub getIP_hex2dec() +{ + my ($ip_hex) = @_; + + my $ip_dec; + + if( $ip_hex =~ /0x(\w{2})(\w{2})(\w{2})(\w{2})/ ){ + $ip_dec = hex($1) . "." . hex($2) . "." . hex($3) . "." . hex($4); + } + else{ + print "getIP_hex2dec(): cannot extract ip address because of diferent format! Exit."; + exit(0); + } + + return $ip_dec; +} + +sub getPort_hex2dec() +{ + my ($port_hex) = @_; + + my $port_dec; + + if( $port_hex =~ /0x(\w+)/ ){ + $port_dec = hex($1); + } + else{ + print "getPort_hex2dec(): cannot extract port number because of diferent format! Exit."; + exit(0); + } + + return $port_dec; +} + +sub isFileDefined() +{ + my ($fh, $name) = @_; + + if(!$fh) { + my $txt = "\nError! Could not open file \'$name\'. Exit.\n"; + print STDERR $txt; + print $txt; + exit(128); + } + + return 0; +} + +sub writeArgs2file() +{ + my $fileName = $0; + + #- Replace .pl with .sh + $fileName =~ s/\.pl/\.sh/; + + my $fh = new FileHandle(">./$fileName"); + if(!$fh) { + my $txt = "\nError! Could not open file \"$fileName\" for output. Exit.\n"; + print STDERR $txt; + print $txt; + exit(128); + } + + my $current_dir = cwd(); + my $ptogName = $0; + + + #- Write to the file the script name itself + print $fh $0; + + #- Write to the file the arguments + foreach my $arg (@arg_list){ + print $fh " $arg"; + } + print $fh "\n"; + + $fh->close(); + + system("chmod 755 ./$fileName"); +} + diff --git a/evtbuild/start_eb_dabc.sh b/evtbuild/start_eb_dabc.sh new file mode 100755 index 0000000..327f0b0 --- /dev/null +++ b/evtbuild/start_eb_dabc.sh @@ -0,0 +1 @@ +./start_eb_dabc.pl -e restart -n 1-16 -d on -p te diff --git a/evtbuild/start_eb_gbe.pl b/evtbuild/start_eb_gbe.pl deleted file mode 100755 index c9d8ed1..0000000 --- a/evtbuild/start_eb_gbe.pl +++ /dev/null @@ -1,1520 +0,0 @@ -#!/usr/bin/perl -w - -use English; -use strict; -use Getopt::Long; -use Data::Dumper; -use Config::Std; -use FileHandle; -use List::MoreUtils qw(any apply first_index); -use File::Basename; -use Cwd; - -#- Copy all the arguments because -# later on the @ARGV becomes empty -my @arg_list = @ARGV; - -#- the command line option flags -my $opt_help = 0; -my $opt_ebconf = "/home/hadaq/trbsoft/hadesdaq/evtbuild/eb.conf"; -my $opt_ioc = ""; -my $opt_test = 0; -my $opt_verb = 0; -my $opt_eb = ""; -my @opt_ebrange = (); -my $opt_rfio = 'undef'; -my $opt_disk = 'undef'; -my $opt_online = 'undef'; -my $opt_prefix; - -GetOptions ('h|help' => \$opt_help, - 'c|conf=s' => \$opt_ebconf, - 'e|eb=s' => \$opt_eb, - 'i|ioc=s' => \$opt_ioc, - 't|test' => \$opt_test, - 'n|nr=s' => \@opt_ebrange, - 'd|disk=s' => \$opt_disk, - 'r|rfio=s' => \$opt_rfio, - 'p|prefix=s' => \$opt_prefix, - 'o|online=s' => \$opt_online, - 'v|verb' => \$opt_verb); - -if( $opt_help ) { - &help(); - exit(0); -} - -#- List of EBs provided via command line options -my $active_EBs_aref = &setArgs(); - -#- Hash with status of CPU cores of EBs (used for 'taskset') -my %EB_CPU_status; -my $EB_CPU_status_href = \%EB_CPU_status; -&init_CPU_status($EB_CPU_status_href); - -my $expect_ioc_script = "/tmp/ioc_exit.exp"; -my $log_path = "/tmp/log"; -my %temp_args; -my $temp_args_href = \%temp_args; -read_config $opt_ebconf => %$temp_args_href; -#print Dumper $temp_args_href; -#exit; - -my $numOfEBProcs = 0; -my %EB_Args; -my $EB_Args_href = \%EB_Args; - -my @EB_IP_list; - -&getEBArgs( $EB_Args_href ); - -if($opt_ioc eq "start"){ - &killIOC(); - &startIOC(); -} -elsif($opt_ioc eq "stop"){ - &killIOC(); -} -elsif($opt_eb eq "start"){ - &writeArgs2file(); - &startEvtBuilders(); -} -elsif($opt_eb eq "stop"){ - &stopEvtBuilders(); -} -elsif($opt_eb eq "restart"){ - &stopEvtBuilders(); - sleep 1; - &writeArgs2file(); - &startEvtBuilders(); -} - -exit(0); - -################### END OF MAIN #################### - -sub help() -{ - print "\n"; - print << 'EOF'; -start_eb_gbe.pl - - This script starts parallel Event Building processes. - The script also starts IOC processes for the run control. - -Usage: - - Command line: start_eb_gbe.pl - [-h|--help] : Show this help. - [-c|--conf ] : Path to the config file (default: ../evtbuild/eb.conf). - [-e|--eb ] : Start or stop Event Builders (default: start). - [-i|--ioc ] : Start or stop IOCs (default: start). - [-n|--nr ] : Range of numbers of Event Bulders to be started. - [-d|--disk ] : Switch writing to disk on|off. - [-r|--rfio ] : Switch writing to tape on|off. - [-p|--prefix ] : Prefix of hld file. - [-o|--online ] : Switch RPC server on|off. - [-t|--test] : Test without execution. - [-v|--verb] : More verbouse. - -Examples: - - Start 6 EBs with the numbers 1,2,3,5,7 and prefix 'md': - start_eb_gbe.pl -e start -n 1-3 -n 5 -n 7 -p md - - Start EBs and enable writing to disks but disable writing to tape for all EBs: - start_eb_gbe.pl -e start --disk on --rfio off - -EOF -} - -sub init_CPU_status() -{ - my ($EB_CPU_status_href) = @_; - - # CPU affinity with 'taskset' - # - # CPU dec bin hex - # 0 1 1 - # 1 10 2 - # 2 100 4 - # 3 1000 8 - # 4 10000 10 - - #cores 0/1 reserved for system 02-05 - #cores 2/3 reserved for interrupts on 02-05 - -#lxhadeb01 is gone -# foreach my $core (0..7){ -# if($core == 1){ -# $EB_CPU_status_href->{'192.168.100.11'}->{$core} = "res"; #reserved -# } -# else{ -# $EB_CPU_status_href->{'192.168.100.11'}->{$core} = "free"; -# } -# } - -#JAM adjust this to actual affinities for eth0 settings TODO -# eth0 interrupts are above core 8 now -# -# -# foreach my $core (0..11){ -# if(($core < 2) || ($core> 8 ) ){ -# $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "res"; #reserved -# $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "res"; #reserved -# $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "res"; #reserved -# } -# else{ -# $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "free"; -# $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "free"; -# $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "free"; -# } -# } -# -## after upgrade to debian 7: ethernet reserved cores are below 6 - foreach my $core (0..11){ - if(($core < 6) ){ - $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "res"; #reserved - $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "res"; #reserved - $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "res"; #reserved - } - else{ - $EB_CPU_status_href->{'192.168.100.12'}->{$core} = "free"; - $EB_CPU_status_href->{'192.168.100.13'}->{$core} = "free"; - $EB_CPU_status_href->{'192.168.100.14'}->{$core} = "free"; - } - } - -# eth0 ir is set above core 11 - foreach my $core (0..23){ - if( ($core < 2) ||( $core > 11) ){ - $EB_CPU_status_href->{'192.168.100.15'}->{$core} = "res"; #reserved - } - else{ - $EB_CPU_status_href->{'192.168.100.15'}->{$core} = "free"; - } - } - -} - -sub getCoreNr() -{ - my ($ip) = @_; - - my $core_nr; - - foreach my $eb_ip (sort keys %$EB_CPU_status_href){ - next unless($ip eq $eb_ip); - - foreach my $core ( sort {$a <=> $b} keys %{$EB_CPU_status_href->{$eb_ip}} ){ - my $core_status = $EB_CPU_status_href->{$eb_ip}->{$core}; - - next unless(lc($core_status) eq "free"); - - $core_nr = $core; - $EB_CPU_status_href->{$eb_ip}->{$core} = "busy"; - last; - } - } - - #- If no free cores left - take reserved cores - unless( defined $core_nr ){ - foreach my $eb_ip (sort keys %$EB_CPU_status_href){ - next unless($ip eq $eb_ip); - - foreach my $core ( sort {$a <=> $b} keys %{$EB_CPU_status_href->{$eb_ip}} ){ - my $core_status = $EB_CPU_status_href->{$eb_ip}->{$core}; - - if(lc($core_status) eq "res"){ - $core_nr = $core; - $EB_CPU_status_href->{$eb_ip}->{$core} = "busy"; - last; - } - } - } - } - - unless( defined $core_nr ){ - print "No free cores left on CPU $ip. Exit.\n"; - exit(0); - } - - return $core_nr; -} - -sub setArgs() -{ - my @active_EBs; - - if(@opt_ebrange){ - foreach my $range (@opt_ebrange){ - if($range =~ /(\d+)-(\d+)/){ - my $max = $1; - my $min = $2; - - foreach my $eb ($max..$min){ - #- 1 must be subtracted to match - # EB numbering in the register_configgbe_ip.db - # which starts from zero - &checkEB_nr($eb); - push(@active_EBs, $eb-1); - } - } - elsif($range =~ /(\d+)/){ - &checkEB_nr($1); - push(@active_EBs, $1-1); - } - } - } - - return \@active_EBs; -} - -sub checkEB_nr() -{ - my ($eb_nr) = @_; - - if( $eb_nr < 1 || $eb_nr > 16 ){ - print "ERROR: EB number should be in the range 1-16. Exit."; - exit(0); - } -} - -sub getEBArgs() -{ - my ($href) = @_; - - my $prefix = $temp_args_href->{'Main'}->{'EB_EXT'}; - $prefix = $opt_prefix if( defined $opt_prefix ); - my $filesize = $temp_args_href->{'Main'}->{'EB_FSIZE'}; - - my $base_port = $temp_args_href->{'Parallel'}->{'BASE_PORT'}; - my $shift_port = $temp_args_href->{'Parallel'}->{'SHIFT_PORT'}; - my $source_num = $temp_args_href->{'Parallel'}->{'NUM_OF_SOURCES'}; - my $queuesize = $temp_args_href->{'Parallel'}->{'QUEUESIZE'}; - - my $multidisk = $temp_args_href->{'Parallel'}->{'MULTIDISK'}; - - #- Number of EB process - my $ebproc = 0; - - #- List of BEs - my $listOfEBs = $temp_args_href->{'Parallel'}->{'EB_LIST'}; - my @eb_list = split(/\s+/, $listOfEBs); - - #- DABC mode selection - my $listOfDABC = $temp_args_href->{'Parallel'}->{'DABC'}; - my @dabc_list = split(/\s+/, $listOfDABC); - - - #- Default RFIO settings - my $rfio = $temp_args_href->{'Parallel'}->{'RFIO'}; - my $rfio_path = $temp_args_href->{'Parallel'}->{'RFIO_PATH'}; - my $rfio_pcOptions = $temp_args_href->{'Parallel'}->{'RFIO_pcOptions'}; - my $rfio_iCopyMode = $temp_args_href->{'Parallel'}->{'RFIO_iCopyMode'}; - my $rfio_pcCopyPath = $temp_args_href->{'Parallel'}->{'RFIO_pcCopyPath'}; - my $rfio_iCopyFrac = $temp_args_href->{'Parallel'}->{'RFIO_iCopyFraction'}; - my $rfio_iMaxFile = $temp_args_href->{'Parallel'}->{'RFIO_iMaxFile'}; - my $rfio_iPathConv = $temp_args_href->{'Parallel'}->{'RFIO_iPathConvention'}; - - my @rfio_list = split(/\s+/, $rfio); - - #- EPICS Controled - my $epics_ctrl = $temp_args_href->{'Parallel'}->{'EPICS_CTRL'}; - - my @epics_list = split(/\s+/, $epics_ctrl); - - #- Logging the output of EBs - my $eb_log = $temp_args_href->{'Parallel'}->{'EB_LOG'}; - my $eb_debug = $temp_args_href->{'Parallel'}->{'EB_DEBUG'}; - my $nm_log = $temp_args_href->{'Parallel'}->{'NM_LOG'}; - my @eblog_list = split(/\s+/, $eb_log); - my @ebdbg_list = split(/\s+/, $eb_debug); - my @nmlog_list = split(/\s+/, $nm_log); - - - #- Write to disk - my $write2disk = $temp_args_href->{'Parallel'}->{'WRITE_TO_DISK'}; - my @write2disk_list = split(/\s+/, $write2disk); - - #--- Read GbE configuration - my %eb_ids_gbe_hash; - my $eb_ids_gbe_href = \%eb_ids_gbe_hash; - - &getGbEconfig($eb_ids_gbe_href); - - #--- Loop over all EB processes - #print Dumper $eb_ids_gbe_href; - #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(@$active_EBs_aref){ - next unless( any {$_ == $ebproc} @$active_EBs_aref ); #from command line args - } - else{ - next unless( $eb_list[$ebproc] ); #from eb.conf - } - - - my $eb_ip = $eb_ids_gbe_href->{$ebproc}->{'IP'}; - - #- Save IP needed by other function to stop EBs. - push(@EB_IP_list, $eb_ip) unless( any {$_ eq $eb_ip} @EB_IP_list ); - - #- Some checks on number of EB processes - die "Number of EB processes exceeds the number in RFIO setting! Exit." if($ebproc > $#rfio_list); - die "Number of EB processes exceeds the number in EPICS_CTRL setting! Exit." if($ebproc > $#epics_list); - - #- Here we can overwrite default rfio settings with individual settings per EB processes - my $procname = sprintf("EB_PROC_%d", 1+$ebproc); - # $rfio_iCopyMode = $temp_args_href->{$procname}->{'RFIO_iCopyMode'}; - - $href->{$ebproc}->{'IP'} = $eb_ip; - $href->{$ebproc}->{'EBNUM'} = $ebproc+1; - $href->{$ebproc}->{'BASEPORT'} = $base_port; - $href->{$ebproc}->{'PORT_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'port_list'}; - $href->{$ebproc}->{'SOURCENUM'} = scalar @{$eb_ids_gbe_href->{$ebproc}->{'port_list'}}; - $href->{$ebproc}->{'BUFSIZE_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'bufsize_list'}; - $href->{$ebproc}->{'PREFIX'} = $prefix; - $href->{$ebproc}->{'QUEUESIZE'} = $queuesize; - $href->{$ebproc}->{'MULTIDISK'} = $multidisk; - $href->{$ebproc}->{'FILESIZE'} = $filesize; - - if( defined $temp_args_href->{$procname}->{'MULTIDISK'} ){ - $href->{$ebproc}->{'MULTIDISK'} = $temp_args_href->{$procname}->{'MULTIDISK'}; - } - elsif($multidisk){ - $href->{$ebproc}->{'MULTIDISK'} = $href->{$ebproc}->{'EBNUM'}; - } - else{ - $href->{$ebproc}->{'MULTIDISK'} = $multidisk; - } - - if( defined $temp_args_href->{$procname}->{'RESDOWNSCALE'} ){ - $href->{$ebproc}->{'RESDOWNSCALE'} = $temp_args_href->{$procname}->{'RESDOWNSCALE'}; - $href->{$ebproc}->{'RESNUMEVENTS'} = $temp_args_href->{$procname}->{'RESNUMEVENTS'}; - $href->{$ebproc}->{'RESPATH'} = $temp_args_href->{$procname}->{'RESPATH'}; - $href->{$ebproc}->{'RESSIZELIMIT'} = $temp_args_href->{$procname}->{'RESSIZELIMIT'}; - } - - if( defined $temp_args_href->{$procname}->{'ONLINESERVER'} ){ - if($opt_online eq "on"){ - $href->{$ebproc}->{'ONLINESERVER'} = "on"; - } - elsif($opt_online eq "off"){ - $href->{$ebproc}->{'ONLINESERVER'} = "off"; - } - else{ - $href->{$ebproc}->{'ONLINESERVER'} = $temp_args_href->{$procname}->{'ONLINESERVER'}; - } - } - else{ - $href->{$ebproc}->{'ONLINESERVER'} = "off"; - } - - $href->{$ebproc}->{'RFIO'} = $rfio_list[$ebproc] if(lc($opt_rfio) eq 'undef'); # 0|1 - $href->{$ebproc}->{'RFIO'} = 1 if(lc($opt_rfio) eq 'on'); # 0|1 - $href->{$ebproc}->{'RFIO'} = 0 if(lc($opt_rfio) eq 'off'); # 0|1 - $href->{$ebproc}->{'RFIO_PATH'} = $rfio_path; - $href->{$ebproc}->{'RFIO_pcOptions'} = $rfio_pcOptions; - $href->{$ebproc}->{'RFIO_iCopyMode'} = $rfio_iCopyMode; - $href->{$ebproc}->{'RFIO_pcCopyPath'} = $rfio_pcCopyPath; - $href->{$ebproc}->{'RFIO_iCopyFrac'} = $rfio_iCopyFrac; - $href->{$ebproc}->{'RFIO_iMaxFile'} = $rfio_iMaxFile; - $href->{$ebproc}->{'RFIO_iPathConv'} = $rfio_iPathConv; - - $href->{$ebproc}->{'EPICS_CTRL'} = $epics_list[$ebproc]; # 0|1 - - $href->{$ebproc}->{'DABC'} = $dabc_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 - - - - if( $write2disk_list[$ebproc] && lc($opt_disk) eq 'undef' ){ - if(&isVarDefined($temp_args_href->{$procname}->{'OUTDIR'}, "OUTDIR for $procname")){ - $href->{$ebproc}->{'OUTDIR'} = $temp_args_href->{$procname}->{'OUTDIR'}; - } - } - elsif( lc($opt_disk) eq 'on' ){ - if(&isVarDefined($temp_args_href->{$procname}->{'OUTDIR'}, "OUTDIR for $procname")){ - $href->{$ebproc}->{'OUTDIR'} = $temp_args_href->{$procname}->{'OUTDIR'}; - } - } - elsif( lc($opt_disk) eq 'off' ){ - #- do not do anything. If $href->{$ebproc}->{'OUTDIR'} is undefined, - # the data will go to /dev/null - } - } - - $numOfEBProcs = $ebproc; -} - -sub isVarDefined() -{ - my ($var, $msg) = @_; - - my $retval = 1; - - unless( defined $var ){ - print "Undefined variable found: $msg\n"; - $retval = 0; - } - - return $retval; -} - -sub getVarSizeArg() -{ - my ($ebproc) = @_; - - my $i = 0; - my $arg = " "; - - foreach my $size (@{$EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}}){ - - if($EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}->[$i] == - $EB_Args_href->{$ebproc}->{'QUEUESIZE'}){ - $i++; - next; - } - - $arg = $arg . " -Q " . $i . ":" . $EB_Args_href->{$ebproc}->{'BUFSIZE_LIST'}->[$i]; - $i++; - } - - return $arg; -} - -sub startEvtBuilders() -{ - - my $username = "hadaq"; - - my (@process_list); - - foreach my $ebproc (sort {$a <=> $b} keys %$EB_Args_href){ - - my $ebnum2print = $ebproc+1; - print "EB process: $ebnum2print\n"; - - -# JAM first test if we should activate dabc eventbuilder or old one - - if( $EB_Args_href->{$ebproc}->{'DABC'} ){ - print "Starting DABC process..\n"; -# TODO: here evaluate parameters and code into dabc command execution - -#". /home/joern/dabcwork/head/dabclogin;cd /home/joern/dabcwork/head/plugins/hadaq/app; export EBNUM=1; export STREAMS=5; export UDP00=10101; export UDP01=10102; export UDP02=10103; export UDP03=10104; export UDP04=10105 export PREFIX=be; /home/joern/dabcwork/head/bin/dabc_exe EventBuilderHades.xml &" > /dev/null 2>&1 & - - my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; - my $dabclogin = ". /home/hadaq/soft/dabc/head/dabclogin;"; - my $cdworkdir = "cd //home/hadaq/oper;"; - - my $cmd_dabc = "/home/hadaq/soft/dabc/head/bin/dabc_exe "; - my $conf_dabc = " EventBuilderHades.xml"; - my $exports = " export EBNUM=" . $EB_Args_href->{$ebproc}->{'EBNUM'} . "; " . - " export STREAMS=" . $EB_Args_href->{$ebproc}->{'SOURCENUM'} . "; " . - " export PREFIX=" . $EB_Args_href->{$ebproc}->{'PREFIX'}. "; " ; - - my @port_list = (); - - #- add ports - my $ix =0; - foreach my $port (@{$EB_Args_href->{$ebproc}->{'PORT_LIST'}}){ - #$cmd_nm = $cmd_nm . " -i UDP:0.0.0.0:" . $port; - my $index=sprintf("%02d", $ix++); - $exports = $exports . " export UDP". $index. "=" . $port . "; "; - push(@port_list, $port); - } - &cpPortList2EB(\@port_list, $EB_Args_href->{$ebproc}->{'EBNUM'}, $cpu); - - - - - - -# MULTIDISK - -#- add output type - - if($EB_Args_href->{$ebproc}->{'OUTDIR'} ){ - if($EB_Args_href->{$ebproc}->{'MULTIDISK'}){ - $exports = $exports . "export DAQDISK=1; export OUTDIR=/data01; "; - } - else{ - $exports = $exports . "export DAQDISK=0; export OUTDIR=" . $EB_Args_href->{$ebproc}->{'OUTDIR'} .";"; - } - - if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ - - $exports = $exports . " export FILEOUTPUTS=3;"; - # additional exports for RFIO - - $exports = $exports . " export RFIOPATH=". $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . ";"; - $exports = $exports . " export RFIOLUSTREPATH=". $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . ";"; - $exports = $exports . " export RFIOCOPYMODE=". $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . ";"; - $exports = $exports . " export RFIOCOPYFRAC=". $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . ";"; - $exports = $exports . " export RFIOMAXFILE=". $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . ";"; - $exports = $exports . " export RFIOPATHCONV=". $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'} . ";"; - -# switch on by number of outputs - } - else - { - # no rfio, just local file - $exports = $exports . " export FILEOUTPUTS=2;"; - } - - - - - } #outdir - else{ - $exports = $exports . " export FILEOUTPUTS=1;"; - # no output except for the stream server... - } - - - - - - - -# my $rfio; -# if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ -# $rfio = " --rfio " . $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . -# " --rfiolustre " . $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . -# " --rfio_pcoption " . $EB_Args_href->{$ebproc}->{'RFIO_pcOptions'} . -# " --rfio_icopymode " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . -# " --rfio_icopyfrac " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . -# " --rfio_imaxfile " . $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . -# " --rfio_ipathconv " . $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'}; -# } - - -# EPICSCONTROL ? always enabled for production -# SMALLFILES for online monitoring node - -# Jul14 beamtime setup 3 cores for dabc - #my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu) . "," . &getCoreNr($cpu); - -# try 2 cores each dabc for more dabc nodes: - my $core_nr = &getCoreNr($cpu) . "," . &getCoreNr($cpu); -# my $core_nr = &getCoreNr($cpu); -# dabc is set to 3 cores - -# JAM use fixed core number for kp1pc092 tests: -# my $core_nr = 1; - my $exe_dabc = "ssh -n $cpu -l $username \"$dabclogin $cdworkdir $exports taskset -c $core_nr $cmd_dabc $conf_dabc 1{$ebproc}->{'SOURCENUM'} . - " -q " . $EB_Args_href->{$ebproc}->{'QUEUESIZE'} . - " -S " . $EB_Args_href->{$ebproc}->{'EBNUM'} . - " --ebnum " . $EB_Args_href->{$ebproc}->{'EBNUM'} . - " -x " . $EB_Args_href->{$ebproc}->{'PREFIX'}; - - #- add queue variable size args - my $varsize_arg = &getVarSizeArg($ebproc); - $cmd_eb = $cmd_eb . $varsize_arg; - - #- add output type - if( defined $EB_Args_href->{$ebproc}->{'OUTDIR'} ){ - if($EB_Args_href->{$ebproc}->{'MULTIDISK'}){ - $cmd_eb = $cmd_eb . " -d file -o " . "/data01/data"; - } - else{ - $cmd_eb = $cmd_eb . " -d file -o " . $EB_Args_href->{$ebproc}->{'OUTDIR'}; - } - } - else{ - $cmd_eb = $cmd_eb . " -d null"; - } - - #- add file size - $cmd_eb = $cmd_eb . " --filesize " . $EB_Args_href->{$ebproc}->{'FILESIZE'}; - - #- add second output with small hdl files - if( defined $EB_Args_href->{$ebproc}->{'RESDOWNSCALE'} ){ - $cmd_eb = $cmd_eb . " --resdownscale " . $EB_Args_href->{$ebproc}->{'RESDOWNSCALE'} . - " --resnumevents " . $EB_Args_href->{$ebproc}->{'RESNUMEVENTS'} . - " --respath " . $EB_Args_href->{$ebproc}->{'RESPATH'} . - " --ressizelimit " . $EB_Args_href->{$ebproc}->{'RESSIZELIMIT'}; - } - - my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; - - #- add rfio args - my $rfio; - if( $EB_Args_href->{$ebproc}->{'RFIO'} ){ - $rfio = " --rfio rfiodaq:gstore:" . $EB_Args_href->{$ebproc}->{'RFIO_PATH'} . - " --rfiolustre " . $EB_Args_href->{$ebproc}->{'RFIO_pcCopyPath'} . - " --rfio_pcoption " . $EB_Args_href->{$ebproc}->{'RFIO_pcOptions'} . - " --rfio_icopymode " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyMode'} . - " --rfio_icopyfrac " . $EB_Args_href->{$ebproc}->{'RFIO_iCopyFrac'} . - " --rfio_imaxfile " . $EB_Args_href->{$ebproc}->{'RFIO_iMaxFile'} . - " --rfio_ipathconv " . $EB_Args_href->{$ebproc}->{'RFIO_iPathConv'}; - } - - $cmd_eb = $cmd_eb . $rfio if( defined $rfio ); - - #- add multiple disk arg (ctrl via daq_disks) - if($EB_Args_href->{$ebproc}->{'MULTIDISK'} && - defined $EB_Args_href->{$ebproc}->{'OUTDIR'}){ - $cmd_eb = $cmd_eb . " --multidisk " . $EB_Args_href->{$ebproc}->{'MULTIDISK'}; - } - - #- add online RPC server - if( $EB_Args_href->{$ebproc}->{'ONLINESERVER'} eq "on" ){ - $cmd_eb = $cmd_eb . " --online"; - } - - #- add epics controlled - $cmd_eb = $cmd_eb . " --epicsctrl " if( $EB_Args_href->{$ebproc}->{'EPICS_CTRL'} ); - - # switch on debug output - $cmd_eb = $cmd_eb . " --debug trignr --debug errbit --debug word " if( $EB_Args_href->{$ebproc}->{'EB_DEBUG'} ); - - - - #- logging the output - my $eblog_file = "/tmp/log_eb_" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".txt"; - my $eb_log = "1>$eblog_file 2>$eblog_file"; - $eb_log = "1>/dev/null 2>/dev/null" unless( $EB_Args_href->{$ebproc}->{'EB_LOG'} ); - - my $time = 1. * $ebproc; - my $sleep_cmd = "sleep " . $time; - - my $core_nr = &getCoreNr($cpu); - - my $exe_eb = "ssh -n $cpu -l $username \"cd /home/hadaq/oper; export DAQ_SETUP=/home/hadaq/oper/eb; taskset -c $core_nr $cmd_eb $eb_log &\""; - - #print "exec: $exe_eb\n"; - - #--- Prepare execution of daq_netmem - my $cmd_nm = "/home/hadaq/bin/daq_netmem" . - " -m " . $EB_Args_href->{$ebproc}->{'SOURCENUM'} . - " -q " . $EB_Args_href->{$ebproc}->{'QUEUESIZE'} . - " -S " . $EB_Args_href->{$ebproc}->{'EBNUM'}; - - #- add queue variable size args - $cmd_nm = $cmd_nm . $varsize_arg; - - my @port_list = (); - - #- add ports - foreach my $port (@{$EB_Args_href->{$ebproc}->{'PORT_LIST'}}){ - #$cmd_nm = $cmd_nm . " -i UDP:0.0.0.0:" . $port; - $cmd_nm = $cmd_nm . " -i " . $port; - - push(@port_list, $port); - } - - &cpPortList2EB(\@port_list, $EB_Args_href->{$ebproc}->{'EBNUM'}, $cpu); - - #- logging the output - my $nmlog_file = "/tmp/log_nm_" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".txt"; - my $nm_log = "1>$nmlog_file 2>$nmlog_file"; - $nm_log = "1>/dev/null 2>/dev/null" unless( $EB_Args_href->{$ebproc}->{'NM_LOG'} ); - - $core_nr = &getCoreNr($cpu); - - my $exe_nm = "ssh -n $cpu -l $username \"cd /home/hadaq/oper; export DAQ_SETUP=/home/hadaq/oper/eb; taskset -c $core_nr $cmd_nm $nm_log &\""; - - #print "exec: $exe_nm\n"; - - #--- Open permissions for shared memory - my $eb_shmem = "daq_evtbuild" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".shm"; - my $nm_shmem = "daq_netmem" . $EB_Args_href->{$ebproc}->{'EBNUM'} . ".shm"; - my $exe_open_eb = "ssh -n $cpu -l $username \"chmod 775 /dev/shm/$eb_shmem\""; - my $exe_open_nm = "ssh -n $cpu -l $username \"chmod 775 /dev/shm/$nm_shmem\""; - - &forkEB($exe_eb, $exe_nm, $exe_open_eb, $exe_open_nm, \@process_list); - } - -} -# if dabc - - #- Wait for children - foreach my $cur_child_pid (@process_list) { - waitpid($cur_child_pid,0); - } - -} -# foreach - -sub stopEvtBuilders() -{ - my $username = "hadaq"; - - my @process_list = (); - - #--- Loop over server IPs - foreach my $ip (@EB_IP_list){ - - my $exe = "ssh -n $ip -l $username \"/home/hadaq/bin/cleanup_evtbuild.pl; /home/hadaq/bin/ipcrm.pl\""; - - if($opt_verb){ - print "Killing running EBs...\n"; - print "Exec: $exe\n"; - } - - my $log = $log_path . "/log_" . $ip . "_" . "stopEB.txt"; - - forkMe($exe, $log, \@process_list) unless($opt_test); - } - - #- Wait for children - foreach my $cur_child_pid (@process_list) { - print "wait for $cur_child_pid\n"; - waitpid($cur_child_pid,0); - } -} - -sub cpPortList2EB() -{ - my ($port_list_aref, $ebnr, $cpu) = @_; - - my $tmpfile = "/tmp/eb" . $ebnr . "_" . $cpu . ".txt"; - - #- First write ports to tmp file - my $fh = new FileHandle(">$tmpfile"); - - if(!$fh) { - my $txt = "\nError! Could not open file \"$tmpfile\" for output. Exit.\n"; - print STDERR $txt; - print $txt; - exit(128); - } - - foreach my $port (@$port_list_aref){ - print $fh "$port\n"; - } - - $fh->close(); - - #- Copy this tmp file to EB - my $exe_cp = "scp $tmpfile hadaq\@$cpu:/tmp/ 1>/dev/null 2>/dev/null"; - system($exe_cp); -} - -sub startIOC() -{ - my $ioc_dir = "/home/scs/ebctrl/ioc/iocBoot/iocebctrl"; - - &writeIOC_stcmd( $ioc_dir ); - - print "Starting IOCs...\n" if($opt_verb); - - foreach my $ebproc (keys %$EB_Args_href){ - - my $stcmd = sprintf("st_eb%02d.cmd", 1 + $ebproc); - my $screen_name = sprintf("ioc_eb%02d", 1 + $ebproc); - - my $cmd = "bash; . /home/scs/.bashrc; export HOSTNAME=\\\$(hostname); cd $ioc_dir; screen -dmS $screen_name ../../bin/linux-x86_64/ebctrl $stcmd"; - my $cpu = $EB_Args_href->{$ebproc}->{'IP'}; - - my $exe = "ssh -n $cpu -l scs \"$cmd\""; - - print "Exec: $exe\n" if($opt_verb); - system($exe) unless($opt_test); - } -} - -sub smallestEBProcNum() -{ - my $smallest = 1000; - - foreach my $ebproc (keys %$EB_Args_href){ - $smallest = $ebproc if($smallest > $ebproc); - } - - return $smallest; -} - -sub writeIOC_stcmd() -{ - my ($ioc_dir) = @_; - - # JAM first evaluate ports for ca list - my $epicscalist = "192.168.103.255"; - foreach my $ebproc (keys %$EB_Args_href){ - $epicscalist=sprintf("%s 192.168.103.255:%d", $epicscalist, 10001 + $ebproc); - } - - print "Copying st.cmd files to servers...\n" if($opt_verb); - - my $smallest_ebproc = &smallestEBProcNum(); - - foreach my $ebproc (keys %$EB_Args_href){ - - my $ebNr = 1 + $ebproc; - my $ebnum = sprintf("eb%02d", $ebNr); - my $serverport = 10001+ $ebproc; - - - #- in MBytes - my $maxFileSize = $EB_Args_href->{$ebproc}->{'FILESIZE'}; - - my $ebtype = "slave"; - my $comment_genrunid = "#"; - my $comment_totalevt = "#"; - - if($ebproc == $smallest_ebproc){ - $ebtype = "master"; - $comment_genrunid = ""; - $comment_totalevt = ""; - } - -# if($ebNr == 1){ -# $comment_totalevt = ""; -# } - - my $ioc_stcmd = < \${TOP}/iocBoot/\${IOC}/$ebnum.dbl - -EOF - - my $outfile = "/tmp/st_" . $ebnum . ".cmd"; - my $fh = new FileHandle(">$outfile"); - - if(!$fh) { - my $txt = "\nError! Could not open file \"$outfile\" for output. Exit.\n"; - print STDERR $txt; - print $txt; - exit(128); - } - - print $fh $ioc_stcmd; - $fh->close(); - - my $ip = $EB_Args_href->{$ebproc}->{'IP'}; - my $cmd = "scp $outfile scs\@$ip:$ioc_dir/."; - - print "Exec: $cmd\n" if($opt_verb); - system($cmd) unless($opt_test); - } -} - -sub killIOC() -{ - my %ioc; - my $ioc_href = \%ioc; - - print "Looking for running IOCs...\n" if($opt_verb); - - #--- Loop over server IPs - foreach my $ip (@EB_IP_list){ - - &findRunningIOC($ip, $ioc_href); - } - - #print Dumper \%$ioc_href; - - &writeExpectIOC() if(%$ioc_href); - - if($opt_verb){ - print "Killing running IOCs...\n"; - print "No IOCs found - nothing to kill, continue...\n" unless(%$ioc_href); - } - - my (@process_list); - - foreach my $ip ( %$ioc_href ){ - foreach my $ioc ( @{$ioc_href->{$ip}} ){ - - my $cmd = $expect_ioc_script . " " . $ip . " " . $ioc; - my $log = $log_path . "/log_" . $ip . "_" . $ioc . ".txt"; - print "cmd: $cmd\n" if($opt_verb); - &forkMe($cmd, $log, \@process_list); - } - } - - - - - #- Wait for children - foreach my $cur_child_pid (@process_list) { - waitpid($cur_child_pid,0); - } - - ### just kill the remaining stuff - @process_list = (); - - foreach my $ip (@EB_IP_list){ - my $cmd = qq|ssh scs\@$ip "/usr/bin/pkill -f \\"SCREEN -dmS ioc_eb\\""|; - print $cmd; - &forkMe($cmd, "/tmp/ioc_kill_$ip", \@process_list); - } - - foreach my $cur_child_pid (@process_list) { - waitpid($cur_child_pid,0); - } - - sleep 1; - - ### just kill the remaining stuff - @process_list = (); - foreach my $ip (@EB_IP_list){ - my $cmd = qq|ssh scs\@$ip "/usr/bin/pkill -9 -f \\"SCREEN -dmS ioc_eb\\""|; - &forkMe($cmd, "/tmp/ioc_kill2_$ip", \@process_list); - } - - foreach my $cur_child_pid (@process_list) { - waitpid($cur_child_pid,0); - } - -} - -sub forkMe() -{ - my ($cmd, $log, $proc_list) = @_; - - my $child = fork(); - - if( $child ){ # parent - push( @$proc_list, $child ); - } - elsif( $child == 0 ) { # child - system("$cmd >$log 2>&1 "); - exit(0); - } - else{ - print "Could not fork: $!\n"; - exit(1); - } -} - -sub forkEB() -{ - my ($exe_eb, $exe_nm, $exe_open_eb, $exe_open_nm, $proc_list) = @_; - - my $child = fork(); - - if( $child ){ # parent - push( @$proc_list, $child ); - } - elsif( $child == 0 ) { # child - #--- Execute Event Builder - print "Exec: $exe_eb\n" if($opt_verb); - system($exe_eb) unless($opt_test); - - 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); - - #--- Execute Net-2-Memory - print "Exec: $exe_nm\n" if($opt_verb); - system($exe_nm) unless($opt_test); - - sleep(1); - - #--- Open permissions for NM shared memory - # ! Permissions should be opened by EB process - #print "Exec: $exe_open_nm\n" if($opt_verb); - #system($exe_open_nm) unless($opt_test); - - exit(0); - } - else{ - print "Could not fork: $!\n"; - exit(1); - } -} - -sub findRunningIOC() -{ - my ($cpu, $ioc_href) = @_; - - `ssh -n $cpu -l scs \"screen -wipe\"`; - my $exe = "ssh -n $cpu -l scs \"screen -ls\""; - - my @output = `$exe`; - - foreach my $line (@output){ - if($line =~ /\d+\.(ioc_eb\d{2})\s+/){ - my $name = $1; - push( @{$ioc_href->{$cpu}}, $name ); - print "Found IOC: $name on $cpu\n" if($opt_verb); - } - } -} - -sub writeExpectIOC() -{ - # This expect script can be executed to exit IOC. - - #! Look if /tmp dir exists - my $tmp_dir = dirname("/tmp"); - if ( !(-d $tmp_dir) ){ - print "\nCannot access /tmp directory!\nExit.\n"; - exit(1); - } - - my $expect_script_my = <0} { - set ip [lindex \$argv 0] - set iocname [lindex \$argv 1] -} else { - send_user "Usage: \$argv0 ip iocname\\n" -} - -spawn ssh scs@\$ip - -#expect { -# "error" { exit; } -# "login:" { exit; } -# "Password:" { exit; } -#} - -set timeout 20 -#240 - -expect "~\$ " -send "screen -r \$iocname\\r" -expect "epics> " -send "exit\\r" -expect "~\$ " - -EOF - - my $fh = new FileHandle(">$expect_ioc_script"); - - if(!$fh) { - my $txt = "\nError! Could not open file \"$expect_ioc_script\" for output. Exit.\n"; - print STDERR $txt; - print $txt; - exit(128); - } - - print $fh $expect_script_my; - $fh->close(); - - #- open permissions - system("chmod 755 $expect_ioc_script"); -} - -sub getGbEconfig() -{ - # - # Read DB configurations of GbE and CTS, - # look for active data sources as well as - # for EB IPs and ports. - # - - my ($eb_ids_href) = @_; - - my $data_sources = $temp_args_href->{'Parallel'}->{'DATA_SOURCES'}; - my $gbe_conf = $temp_args_href->{'Parallel'}->{'GBE_CONF'}; - #my $cts_conf = $temp_args_href->{'Parallel'}->{'CTS_CONF'}; - - my %activeSources_hash; - my $activeSources_href = \%activeSources_hash; - - &readActiveSources($data_sources, $activeSources_href); - - my @id_list; - my $id_list_aref = \@id_list; - - #&readEBids($cts_conf, $id_list_aref); - - #- Overwrite array with EB numbers - @id_list = (0 .. 15); - #print Dumper $id_list_aref; - - &readEBports($gbe_conf, $activeSources_href, $id_list_aref, $eb_ids_href); -} - -sub readEBids() -{ - # - # Read EB Ids - # - - my ($file, $id_list_aref) = @_; - - my $nnn_table = 0; - my $val_table = 0; - - my $SPACE = ""; - - my $fh = new FileHandle("$file", "r"); - - while(<$fh>){ - - #- Remove all comments - $_ =~ s{ # Substitue... - \# # ...a literal octothorpe - [^\n]* # ...followed by any number of non-newlines - } - {$SPACE}gxms; # Raplace it with a single space - - #- Skip line if it contains only whitespaces - next unless(/\S/); - - if(/^(\s+)?!Value\stable/){ - $val_table = 1; - $nnn_table = 0; - next; - } - elsif(/^(\s+)?!\w+/){ - $val_table = 0; - $nnn_table = 1; - } - - if($val_table){ - my (@vals) = split(" ", $_); - my @id_list1 = split("", $vals[12]); - my @id_list2 = split("", $vals[13]); - foreach my $id (@id_list1){ - push(@$id_list_aref, hex($id)); - } - foreach my $id (@id_list2){ - push(@$id_list_aref, hex($id)); - } - } - elsif($nnn_table){ - } - } - - $fh->close; -} - -sub readEBports() -{ - # - # Read EB IPs and ports accoring to EB Id (type) - # and TRB-Net addresses of active data sources. - # - - my ($file, $activeSources_href, $id_list_aref, $ports_href) = @_; - - my $nnn_table = 0; - my $val_table = 0; - - my $fh = new FileHandle("$file", "r"); - - &isFileDefined($fh, $file); - - my %tmp; - my $tmp_href = \%tmp; - - my $SPACE = ""; - - while(<$fh>){ - - #print $_; - #- Remove all comments - $_ =~ s{ # Substitue... - \# # ...a literal octothorpe - [^\n]* # ...followed by any number of non-newlines - } - {$SPACE}gxms; # Raplace it with a single space - - #- Skip line if it contains only whitespaces - next unless(/\S/); - - #print $_; - if(/^(\s+)?!Value\stable/){ - $val_table = 1; - $nnn_table = 0; - next; - } - elsif(/^(\s+)?!\w+/){ - $nnn_table = 1; - $val_table = 0; - } - - if($val_table){ - my (@vals) = split(" ", $_); - my $id = $vals[1]; - - #if($id <0 or $id >15) { - # print "error: in $file there is a line with an eventbuilder number different than 0..15, the number given in the file is $id. please correct the config file.\n"; - # exit(128); - #} - - - #- Accept only EB Ids from CTS config file - #print "value: $_"; - next unless( any {$_ eq $id} @$id_list_aref ); - - #print Dumper \@vals; - #print "active sources: "; print Dumper $activeSources_href->{'addr_list'}; - #exit; - - my $ip = &getIP_hex2dec($vals[6]); - my $port = &getPort_hex2dec($vals[2]); - my $addr = $vals[0]; - - #print "got: ip: $ip, port: $port, addr: $addr\n"; - #- Accept only sources from active source list - if( any {hex($_) == hex($addr)} @{$activeSources_href->{'addr_list'}} ){ - $tmp_href->{$id}->{'IP'} = $ip; - push( @{$tmp_href->{$id}->{'port_list'}}, $port ); - push( @{$tmp_href->{$id}->{'addr_list'}}, $addr ); - } - } - } - - $fh->close; - - #print Dumper $tmp_href; - - #- Sort hash according to active data source list - foreach my $id (keys %tmp){ - $ports_href->{$id}->{'IP'} = $tmp_href->{$id}->{'IP'}; - - foreach my $addr (@{$activeSources_href->{'addr_list'}}){ - - my $ind1 = first_index {$_ eq $addr} @{$tmp_href->{$id}->{'addr_list'}}; - my $ind2 = first_index {$_ eq $addr} @{$activeSources_href->{'addr_list'}}; - - next if($ind1 == -1); - - push( @{$ports_href->{$id}->{'port_list'}}, $tmp_href->{$id}->{'port_list'}->[$ind1]); - push( @{$ports_href->{$id}->{'addr_list'}}, $addr); - push( @{$ports_href->{$id}->{'bufsize_list'}}, $activeSources_href->{'bufsize_list'}->[$ind2]); - } - } - - #print Dumper $ports_href; -} - -sub readActiveSources() -{ - # - # Read TRB-Net addresses of active data sources - # - - my ($file, $activeSources_href) = @_; - - my $fh = new FileHandle("$file", "r"); - - &isFileDefined($fh, $file); - - my $SPACE = ""; - - while(<$fh>){ - - #- Remove all comments - $_ =~ s{ # Substitue... - \# # ...a literal octothorpe - [^\n]* # ...followed by any number of non-newlines - } - {$SPACE}gxms; # Raplace it with a single space - - #- Skip line if it contains only whitespaces - next unless(/\S/); - - my ($addr, $astat, $sys, $size) = split(" ", $_); - - next if($astat == 0); - - push( @{$activeSources_href->{'addr_list'}}, $addr); - push( @{$activeSources_href->{'bufsize_list'}}, &getBufSize($size)); - } - - $fh->close; -} - -sub getBufSize() -{ - my ($bufSize) = @_; - - if(lc($bufSize) eq "low"){ - return $temp_args_href->{'Main'}->{'BUF_SIZE_LOW'}; - } - elsif(lc($bufSize) eq "mid"){ - return $temp_args_href->{'Main'}->{'BUF_SIZE_MID'}; - } - elsif(lc($bufSize) eq "high"){ - return $temp_args_href->{'Main'}->{'BUF_SIZE_HIGH'}; - } - else{ - print "Cannot understand $bufSize from data_sources.db.\n"; - exit(0); - } -} - -sub getIP_hex2dec() -{ - my ($ip_hex) = @_; - - my $ip_dec; - - if( $ip_hex =~ /0x(\w{2})(\w{2})(\w{2})(\w{2})/ ){ - $ip_dec = hex($1) . "." . hex($2) . "." . hex($3) . "." . hex($4); - } - else{ - print "getIP_hex2dec(): cannot extract ip address because of diferent format! Exit."; - exit(0); - } - - return $ip_dec; -} - -sub getPort_hex2dec() -{ - my ($port_hex) = @_; - - my $port_dec; - - if( $port_hex =~ /0x(\w+)/ ){ - $port_dec = hex($1); - } - else{ - print "getPort_hex2dec(): cannot extract port number because of diferent format! Exit."; - exit(0); - } - - return $port_dec; -} - -sub isFileDefined() -{ - my ($fh, $name) = @_; - - if(!$fh) { - my $txt = "\nError! Could not open file \'$name\'. Exit.\n"; - print STDERR $txt; - print $txt; - exit(128); - } - - return 0; -} - -sub writeArgs2file() -{ - my $fileName = $0; - - #- Replace .pl with .sh - $fileName =~ s/\.pl/\.sh/; - - my $fh = new FileHandle(">./$fileName"); - if(!$fh) { - my $txt = "\nError! Could not open file \"$fileName\" for output. Exit.\n"; - print STDERR $txt; - print $txt; - exit(128); - } - - my $current_dir = cwd(); - my $ptogName = $0; - - - #- Write to the file the script name itself - print $fh $0; - - #- Write to the file the arguments - foreach my $arg (@arg_list){ - print $fh " $arg"; - } - print $fh "\n"; - - $fh->close(); - - system("chmod 755 ./$fileName"); -} - diff --git a/evtbuild/start_eb_gbe.pl b/evtbuild/start_eb_gbe.pl new file mode 120000 index 0000000..b43afde --- /dev/null +++ b/evtbuild/start_eb_gbe.pl @@ -0,0 +1 @@ +start_eb_gbe_bnet_ltsm.pl \ No newline at end of file diff --git a/evtbuild/start_eb_gbe.sh b/evtbuild/start_eb_gbe.sh index aef0339..625449c 100755 --- a/evtbuild/start_eb_gbe.sh +++ b/evtbuild/start_eb_gbe.sh @@ -1 +1 @@ -./start_eb_gbe.pl -e restart -n 1-16 -d on -p te +./start_eb_gbe.pl -e restart -n 1-16 -d off -p -- diff --git a/hmon/editlogfiles.pl b/hmon/editlogfiles.pl index 45413ec..6ed41ca 100755 --- a/hmon/editlogfiles.pl +++ b/hmon/editlogfiles.pl @@ -9,7 +9,7 @@ use Data::Dumper; # use Perl2Epics; use HADES::TrbNet; -my $pathtoarchive = "/home/hadaq/trbsoft/daq/tools/hmon/archive"; +my $pathtoarchive = "/home/hadaq/trbsoft/daq/hmon/archive"; my $cmd = "ls $pathtoarchive/*/logfile.htm"; my @files = qx($cmd); @@ -33,8 +33,8 @@ foreach my $f (@files) { close($fout); } -my $cmd = "ls $pathtoarchive/*/logfile.ht"; -my @files = qx($cmd); +$cmd = "ls $pathtoarchive/*/logfile.ht"; +@files = qx($cmd); my $store; my $fout; diff --git a/hmon/hmon_hadplotnew.sh b/hmon/hmon_hadplotnew.sh deleted file mode 100755 index 059a842..0000000 --- a/hmon/hmon_hadplotnew.sh +++ /dev/null @@ -1,1456 +0,0 @@ -#!/usr/bin/perl -w -use warnings; - -use FileHandle; -use Time::HiRes qw( gettimeofday usleep time ); -use Getopt::Long; -use Data::Dumper; -use POSIX qw/floor strftime/; -use HADES::TrbNet; - -use constant AXISISTIME => 1; -use constant AXISISNOTIME => 0; -use constant DIFFY => 1; -use constant DIFFX => 1; -use constant NODIFFY => 0; -use constant NODIFFX => 0; -use constant NODELAY => 0; -use constant NO => 0; -use constant YES => 1; -use constant NONEWLINE => 1; - -my $GPbuffer = ""; -my $buffercount = 0; - -my $windowtitle = ""; #Global var to store real name of GUI window - -my $PlotBuffer = {}; -my $PlotBufferCnt = 0; - -my @PlotBufArr = (); - -#my @color = ("#1155bb","#bb1111","#999900","#660000","#006633","#990066","#6633CC","#00CCCC"); -my @color = ("#2222dd","#880000","#00cc00","#ee00dd","#ffcc00","#00cc88","#6633CC","#00CCCC"); -our $write2file = ""; -our $plotendedbefore = 0; - -trb_init_ports() or die trb_strerror(); - -################################################# -# Variables... -################################################# -my $delay = 1000; -my $samples = 100; -my $downscale = 1; -# my $system = 0; -my $address = []; -my $register = []; -my $regoffset = []; -my $regwidth = []; -my $title = []; -my $timeref = []; -my $geom = "700x400"; -my $style = 0; -my $nametmp = ""; -my $regamount = []; -my $xscale = []; -my $yscale = []; -my $xtitle = ""; -my $ytitle = ""; -my $windowname = "No Name"; -my $xistime = AXISISNOTIME; -my $xoverflow = []; -my $yoverflow = []; -my $ydiff = 0; -my $outputcfg = ""; -my $name = "HadPlot"; -my $key ; -my $curvestyle= 'points'; #points, steps, histo or histostacked -my $xticks = 0; #show labels on x-axis -my $yticks = 1; #show labels on y-axis -my $plotoption= ""; #string with additional gnuplot commands -my $curveoption= []; #options for plot command -my $xgrid = 1; -my $ygrid = 1; -my $ymax = '.01<*'; -my $ymin; -my $xmin; -my $xmax; - -GetOptions('d=f' => \$delay, - 'n=i' => \$samples, - 'o=i' => \$downscale, - 'a=s' => $address, - 'r=s' => $register, - 'w=i' => $regwidth, - 'p=i' => $regoffset, - 't=s' => $title, - 'm=i' => $regamount, - 'g=s' => \$geom, - 'z=i' => \$style, - 'output=s' => \$outputcfg, - 'windowname=s' => \$windowname, - 'xscale=f' => $xscale, - 'yscale=f' => $yscale, - 'xtitle=s' => \$xtitle, - 'ytitle=s' => \$ytitle, - 'xistime!' => \$xistime, - 'timeref=s' => $timeref, - 'xoverflow=f' => $xoverflow, - 'yoverflow=f' => $yoverflow, - 'ydiff!' => \$ydiff, - 'name=s' => \$name, - 'key!' => \$key, - 'xticks!' => \$xticks, - 'yticks!' => \$yticks, - 'xgrid!' => \$xgrid, - 'ygrid!' => \$ygrid, - 'ymax=s' => \$ymax, - 'ymin=s' => \$ymin, - 'xmax=s' => \$xmax, - 'xmin=s' => \$xmin, - 'curvestyle=s' => \$curvestyle, - 'curveoption=s'=> $curveoption, - 'plotoption=s' => \$plotoption - ); - -for(my $i=0;$i<16;$i++) { - $regoffset->[$i] = 0 unless defined $regoffset->[$i]; - $regwidth->[$i] = 32 unless defined $regwidth->[$i]; - $xoverflow->[$i] = 2**20 unless defined $xoverflow->[$i]; - $yoverflow->[$i] = 2**32 unless defined $yoverflow->[$i]; - $xscale->[$i] = 1 unless defined $xscale->[$i]; - $yscale->[$i] = 1 unless defined $yscale->[$i]; - $title->[$i] = "" unless defined $title->[$i]; - $curveoption->[$i] = "" unless defined $curveoption->[$i]; - } - -for(my $k = 0; $k < scalar @$address; $k++) { - if($address->[$k] =~ /^0x/) { - $address->[$k] = hex($address->[$k]); - } - if($register->[$k] =~ /^0x/) { - $register->[$k] = hex($register->[$k]); - } - } - - -for(my $i=0;$i < scalar @{$address};$i++) { - if(!defined($title->[$i])) { - $title->[$i] = $address->[$i]." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1); - } - } - - -$delay *= 1000; -if($style == 1) {$curvestyle="points"; $xticks=1;} -if($style == 2) {$curvestyle="histo"; $xticks=0;} -if($style == 3) {$curvestyle="histo"; $xticks=1;} -if($style == 4) {$curvestyle="histostacked"; $xticks=0;} -if($style == 5) {$curvestyle="histostacked"; $xticks=1;} - - - -#Open Gnuplot -our $fh; -my $fn = "gnuplot -geometry $geom -bg 'ghost white'"; -$fh = new FileHandle ("|$fn") or die "error: no gnuplot"; -$fh->autoflush(1); - -sub makeTimeString{ - return strftime("set label 100 \"%H:%M:%S\" at screen 0.92,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) - } - -################################################# -# When exiting, close Gnuplot window -################################################# -sub finish { - print $fh "exit;\n"; - close $fh; - exit; -} - -$SIG{INT} = \&finish; -$SIG{PIPE} = \&finish; - - - -my $last_wakeup; - -sub max { - my $a = shift; - my $b = shift; - return $a > $b ? $a : $b; - } - -sub min { - my $a = shift; - my $b = shift; - return $a < $b ? $a : $b; - } - -sub usleep_total { - my $delay = shift; - if(defined $last_wakeup) { - my $time = time(); -# printf "%.0f\n",$delay-($time-$last_wakeup)*1E6; - usleep(max(0,$delay-($time-$last_wakeup)*1E6)); - } - else { - usleep($delay); - } - $last_wakeup = time(); - return $last_wakeup; - } - - -################################################# -# Write to gnuplot -################################################# -sub plot_write { - my ($str,$no) = @_; - if(defined($no) && $no) { - print $fh $str; -# print $str; - } - else { - print $fh $str."\n"; -# print $str."\n"; - } - } - -sub plot_add { - my ($x,$y) = @_; - $x = $x || $PlotBufferCnt; - $PlotBufArr[$PlotBufferCnt]->{x} = $x; - $PlotBufArr[$PlotBufferCnt]->{y} = $y; - - $PlotBufferCnt++; -# $PlotBuffer->{$x} = $y; -# print $x." ".$y."\n"; - } - -sub plot_end { - my ($single) = @_; - for(my $i = 0;$i{y}."\n"; - } - else { - print $fh $PlotBufArr[$i]->{x}." ".$PlotBufArr[$i]->{y}."\n"; - } - } -# foreach my $line (sort keys %{$PlotBuffer}) { -# if($single) { -# print $fh $PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$PlotBuffer->{$line}."\n"; -# } -# else { -# print $fh $line." ".$PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$line." ".$PlotBuffer->{$line}."\n"; -# } -# } - @PlotBufArr = (); - $PlotBuffer = {}; - $PlotBufferCnt = 0; - print $fh "e\n"; - $plotendedbefore = 1 unless $plotendedbefore; - } - - -sub plot_reset { - if($write2file eq ""){ - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - #print $?."\n"; - if($? != 0) { - usleep(1E5); - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - if($? != 0) { - finish(); - } - } - if ($plotendedbefore != 0) { - $plotendedbefore = 0; - print $fh makeTimeString(); - print $fh "replot\n"; - } - } - else { - if ($plotendedbefore != 0) { - system("mv $write2file.tmp $write2file"); - plot_write("set out \"$write2file.tmp\"\n"); - $plotendedbefore = 0; - print $fh makeTimeString(); - print $fh "replot\n"; -# print "reset\n"; - } - } - } - -sub plot_finished { - my ($store) = @_; - if($write2file ne "") { - if(defined $store) { - if($store->{"initing"} != 2 and $store->{"iteration"} % $store->{"downscale"} == 0) { -# system("mv $write2file.tmp $write2file"); - } - } - else { - if($write2file ne "") { -# system("mv $write2file.tmp $write2file"); - } - } - } - } - -sub plot_init { - my ($xtics) = @_; - $windowtitle = $name ." - ".$windowname; - if ($outputcfg =~ m$PNG.([/\w]*).(\d+).(\d+)$) { - print "Writing PNG to file $1\n"; - $write2file = $1.".png"; - plot_write("set term png size $2,$3 font \"monospace,8\""); - plot_write("set out \"$write2file.tmp\""); - } - elsif ($outputcfg =~ m$SVG.([/\w]*).(\d+).(\d+)$) { - print "Writing SVG to file $1\n"; - $write2file = $1.".svg"; - plot_write("set term svg size ".($2*2).",".($3*2)." dynamic font \"monospace,18\" lw 1.5 \n"); - plot_write("set out \"$write2file.tmp\"\n"); - } - else { - plot_write("set term x11 title '$windowtitle'"); - } - plot_write("set grid"); - plot_write("set xlabel \"$xtitle\""); - plot_write("set ylabel \"$ytitle\""); - if(defined $xtics) { - plot_write("set xtics $xtics\n"); - } - if(defined $xmin && defined $xmax) { - plot_write("set xrange [$xmin:$xmax]"); - } - if(defined $ymin && defined $ymax) { - plot_write("set yrange [$ymin:$ymax]"); - } - elsif(defined $ymax) { - plot_write("set yrange [:$ymax]"); - } - elsif(defined $ymin) { - plot_write("set yrange [$ymin:]"); - } - if (!defined $key || $key == 0) { - plot_write("unset key"); - } - if($xgrid == 0) { - plot_write("set grid noxtics"); - } - if($ygrid == 0) { - plot_write("set grid noytics"); - } - if($plotoption ne "") { - plot_write($plotoption); - } - } - -sub plot_sleep { - my ($delay) = @_; - my $t = usleep_total($delay); - plot_reset(); - return $t; - } - -sub plot_end_sleep { - my ($delay,$single) = @_; - plot_end($single); - return plot_sleep($delay); - } - -sub plot_storage_end_sleep { - my ($store, $single) = @_; - my $delay = $store->{"delay"}; - my $t; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end($single); - $t = usleep_total($delay); - plot_reset(); - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_sleep { - my ($store,$noreset) = @_; - my $t; - my $delay = $store->{"delay"}; - #print $store->{"initing"}.$store->{"iteration"}.$store->{"downscale"}."\n"; - if($store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - $t = usleep_total($delay); - plot_storage_reset() unless $noreset; - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_reset { - my ($store) = @_; - if(defined $store->{"initing"} && $store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_reset(); - } - } - } - -sub plot_storage_end { - my ($store) = @_; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end(); - } - } - } - -################################################# -# Writes a new value pair to storage -################################################# -sub store_push { - my ($storage,$x,$y,$divtime) = @_; - my $xval = $x; - my $yval = $y; - my $curtime = time(); - - if ($storage->{"initing"} != 2) { - if (scalar(@{$storage->{"datax"}}) == $storage->{"size"}) { - my $tmp = shift(@{$storage->{"datax"}}); - my $tmpy = shift(@{$storage->{"datay"}}); - $storage->{"totalx"} -= $tmp; -# if($storage->{"initing"} == 0 && (($tmpy <= $storage->{"miny"}) || ($tmpy >= $storage->{"maxy"}))) { -# store_calc_range($storage); -# } - } - if($storage->{"diffx"}) { - if(defined($storage->{"xmax"}) && $x < $storage->{"lastx"}) { - $xval = ($x - $storage->{"lastx"} + $storage->{"xmax"}); - } - else { - $xval = ($x - $storage->{"lastx"}); - } - if(defined($storage->{"last_push"}) && $storage->{"last_push"} != 0) { - while (floor($xval/$storage->{"xmax"}) < floor(($curtime - $storage->{"last_push"})/($storage->{"xmax"}/1E6))){ - $xval += $storage->{"xmax"}; - } - } - } - if($storage->{"diffy"}) { - $yval = $y - $storage->{"lasty"}; - if(defined($storage->{"ymax"}) && $y < $storage->{"lasty"}) { - while($yval < 0) { - $yval += $storage->{"ymax"}; - } - } - if($divtime) { - $yval /= ($xval?$xval:1)/1000000; - } - } - - - if($storage->{"initing"} == 1) { - $storage->{"initing"} = 0; - for(my $i = $storage->{"size"}-1; $i>0; $i--) { - push(@{$storage->{"datax"}},$storage->{"delay"}); - push(@{$storage->{"datay"}},$yval); - $storage->{"totalx"} += $storage->{"delay"}; - } - } - - push(@{$storage->{"datax"}},$xval?$xval:0); - push(@{$storage->{"datay"}},$yval?$yval:0); - $storage->{"totalx"} += $xval?$xval:0; - } - else { - $storage->{"initing"} = 1; - } - - $storage->{"last_push"} = $curtime; - $storage->{"lasty"} = $y; - $storage->{"lastx"} = $x; - } - -################################################# -# Writes storage contents to stream -################################################# -sub store_print { - my $str = ""; - my ($storage) = @_; - if($storage->{"initing"} != 2) { - if($storage->{"iteration"} % $storage->{"downscale"} == 0) { - my $xcnt = - $storage->{"totalx"} /1000000.0; - for (my $i = 0; $i < $storage->{"size"}; $i++) { - my $xval = $storage->{"datax"}->[$i]; #${}[] - my $yval = $storage->{"datay"}->[$i]; - $xval = 0 unless defined($xval); - $yval = 0 unless defined($yval); - $xcnt += $xval/1000000.0; -# $str .= $xcnt." ".$yval."\n"; - $str .= sprintf "%.3f %.2f\n", $xcnt,$yval; - #plot_write($xcnt/1000000.0." ".$yval); - } - plot_write($str,1); -# print $str; - plot_end(1); - } - $storage->{"iteration"}++; - } - } - - -################################################# -# Initialize storage -################################################# -sub store_init { - my ($storage,$size,$diffx,$diffy,$delay,$downscale,$xmax,$ymax) = @_; - - $storage->{"datax"} = []; - $storage->{"datay"} = []; - $storage->{"size"} = $size; - $storage->{"diffx"} = $diffx; - $storage->{"diffy"} = $diffy; - $storage->{"delay"} = $delay; - $storage->{"downscale"} = $downscale; - $storage->{"initing"} = 2; - $storage->{"iteration"} = 0; - $storage->{"totalx"} = 0; - $storage->{"xmax"} = $xmax; - $storage->{"ymax"} = $ymax; - $storage->{"maxy"} = 0; - $storage->{"miny"} = 1E100; - $storage->{"last_push"} = 0; - $storage->{"last_sleep"} = 0; - } - -################################################# -# Help Message -################################################# -sub help { - print <[$i])) || ($title->[$i] eq "")) { -# $title->[$i] = hex($address->[$i])." ".$register->[$i]." ".$regoff->[$i]."..".($regoff->[$i]+$regwidth->[$i]-1); -# } - if (!(defined $regamount->[$i])) { - $regamount->[$i] = 1; - } - } - $ymin = $regoff->[0]; - $ymax = $regoff->[0]+$regwidth->[0]; - plot_init(256); -# if ($style == 0) { -# plot_write("plot",1); -# for(my $i = 0; $i[$i]\" ",1); -# plot_write(", ",1) unless $i == scalar(@{$address})-1; -# } -# plot_write(""); -# } -# elsif($style == 1) { - plot_write("set xtics rotate by 90 offset .7,-2 scale 0 "); - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 1 absolute"); - plot_write("unset key"); - plot_write('set format x "%x"'); - plot_write("plot ",1); - for(my $i = 0; $i[$i]\" ",1); #using 2:xticlabels(1) - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); -# } - while(1) { - for(my $i = 0; $i[$i] == 1) { - $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - } - else { - $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - } - my @out = qx($c); - my $addr = undef; - my $cnt = 0; - foreach my $s (@out) { - if($s =~ /^H:\s*0x(\w\w\w\w)/) { - $addr = $1; - } - if($s =~ /^0x(\w\w\w\w)\s*0x(\w{8})/) { - $addr = hex($1) if($regamount->[$i] == 1); - if ($regamount->[$i] == 1) { plot_add($addr,-1); } - else { plot_add("\"$addr.$1\"",-1); } - for(my $j = $regoff->[$i]; $j < $regoff->[$i] + $regwidth->[$i];$j++) { - if(hex($2) & (1<<$j)) { - if ($regamount->[$i] == 1) { plot_add("$addr",$j); } - else { plot_add("\"$addr.$1\"",$j); } - } - } - $cnt++; - } - } - plot_end(1); - } - plot_sleep($delay); - } - } - - - -################################################# -# Generic Register differences -################################################# -sub genreg { - my %oldvals; - - plot_init(undef); - - if($xticks) { - plot_write("set xtics rotate by 90 offset .7,-1.7 scale .7 "); - } - if($curvestyle eq "histo") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 2 absolute"); - } - elsif($curvestyle eq "histostacked") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set style histogram rowstacked"); - plot_write("set boxwidth 1 absolute"); - plot_write("set key outside") unless defined $key && $key==0; - plot_write("set autoscale xfix "); - } - - plot_write("plot",1); - for(my $i = 0; $i[$i]\" ",NONEWLINE); - } - elsif ($curvestyle eq "steps") { - plot_write("with histeps title \"$title->[$i]\" ",NONEWLINE); - } - else { - plot_write("with points pt 5 title \"$title->[$i]\" ",NONEWLINE); - } - plot_write(" ".$curveoption->[$i],NONEWLINE); - plot_write(", ",NONEWLINE) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - - while(1) { - for(my $i = 0; $i[$i]) || $regamount->[$i] == 1) { -# $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - $c = trb_register_read(($address->[$i]),($register->[$i])); - foreach my $s (keys %$c) { - $c->{$s}=[$c->{$s}]; - } - } - else { -# $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - $c = trb_register_read_mem(($address->[$i]),($register->[$i]),0,$regamount->[$i]); -# print Dumper $c; - } -# my @out = qx($c); - foreach my $s (sort keys %$c) { - for(my $r = 0; $r < scalar @{$c->{$s}};$r++) { - my $tmp = ($c->{$s}->[$r]>>$regoffset->[$i])&(2**$regwidth->[$i]-1); - my $val = $tmp; - my $board = sprintf("%04x",$s); - if($ydiff) { - if(defined $oldvals{$i}->{$board.($r+$register->[$i])}) { - if ($oldvals{$i}->{$board.($r+$register->[$i])} > $tmp) { - $val = $tmp - $oldvals{$i}->{$board.($r+$register->[$i])} + 2**$regwidth->[$i]; - } - else { - $val = $tmp - $oldvals{$i}->{$board.($r+$register->[$i])}; - } - } - $oldvals{$i}->{$board.($r+$register->[$i])} = $tmp; - } - - if($xticks) { - if (!(defined $regamount->[$i]) || $regamount->[$i] == 1) { - plot_add("\"$board\"",$val/$yscale->[$i]); - } - else { - plot_add("\"$board.($r+$register->[$i])\"",$val/$yscale->[$i]); - } - } - else { - plot_add("",$val/$yscale->[$i]); - } - } - } - plot_end(!$xticks); - } - plot_sleep($delay); - } - } - -################################################# -# Generic Histogram -################################################# -sub genhist { - my %storearr; - my %oldvals; -# $xtitle = "Time [s]" unless $xtitle ne ""; - plot_init(); - plot_write("set autoscale fix"); - plot_write("plot",1); - $diff = 0 unless defined($diff); - for(my $i = 0; $i[$i],$yoverflow->[$i]); - plot_write("'-' with lines title \"$title->[$i]\" ",1); - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - while(1) { - my $a, my $s, my $t; - my $val = 0 , my $time; - plot_storage_reset($storearr{0}); - for(my $i = 0; $i[$i], $register->[$i]) or sleep 1 and print "Error\n" and next; - foreach my $o (sort keys %$c) { -# if (($a,$s,$t) = $o =~ /^0x(\w{4})\s*0x(\w{8})\s*0x(\w{4})/) { - - $val += (($c->{$o}->{'value'}->[0]>>($regoffset->[$i]))&(2**($regwidth->[$i])-1)); - $time = $c->{$o}->{'time'}->[0]*16; -# } - } - store_push($storearr{$i},$time/$xscale->[$i],$val/$yscale->[$i],AXISISTIME); - store_print($storearr{$i}); - } - plot_storage_sleep($storearr{0}); - plot_finished($storearr{0}); - } - } - -################################################# -# Deadtime histogram -################################################# -sub deadtimehist2 { - my %values, my %lastvalues, my %diffvalues; - my @keys = ("33","34","36","31","38","37","3b","35"); - my @keys2 = ("43","44","46","41","48","47","4b","45"); - my @names = ("MDC12","MDC34","TOF","RPC","RICH","SHW","Start","FW"); - my %storearr; - - if ($style != 0) { - for(my $i= 0; $i < scalar(@keys); $i++) { - $storearr{$keys[$i]} = {}; - store_init($storearr{$keys[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - for(my $i= 0; $i < scalar(@keys2); $i++) { - $storearr{$keys2[$i]} = {}; - store_init($storearr{$keys2[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - } - - plot_init(); - plot_write("set key left top Left"); - plot_write("set autoscale fix"); - plot_write("set yrange [-1:101]"); - - if ($style != 0) { - plot_write("plot ",1); - plot_write("\"-\" title \"MDC12\" with lines,",1); - plot_write("\"-\" title \"MDC34\" with lines,",1); - plot_write("\"-\" title \"TOF\" with lines,",1); - plot_write("\"-\" title \"RPC\" with lines,",1); - plot_write("\"-\" title \"RICH\" with lines,",1); - plot_write("\"-\" title \"SHW\" with lines,",1); - plot_write("\"-\" title \"Start\" with lines,",1); - plot_write("\"-\" title \"FW\" with lines"); - } - else { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set grid noxtics ytics"); - plot_write("set boxwidth 2 absolute"); - plot_write("set xtics ('MDC12' 0,'MDC34' 1,'TOF' 2, 'RPC' 3, 'RICH' 4, 'SHW' 5, 'Start' 6, 'FW' 7) offset 2,0 scale 0"); - plot_write("set style histogram title offset character 0, 0, 0"); - plot_write("set style data histograms"); - plot_write("plot \"-\" title 'incl. busy' lt rgb \"#1155bb\", \"-\" title 'excl. busy' lt rgb \"#bb1111\""); - } - my $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 31 0",$delay/1000); - if($style != 0) { - $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 12 0",$delay/1000); - } - open(FTRB, "$cmd|"); - - while(my $a = ) { - if($a =~ /^0x\w{2}(\w{2})\s*0x(\w{8})\s*0x(\w{4})/) { - $values{$1} = hex($2); - $values{"50"} = hex($3)*16; - } - if ($a eq "---\n") { - $diffvalues{"50"} = 1E6; - if (defined $lastvalues{"50"}) { - if ($values{"50"} > $lastvalues{"50"}) { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"}; - } - else { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} + 2**20; - } - } - #$diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} if defined $lastvalues{"50"}; - my $time = $diffvalues{"50"}; - foreach my $key (keys %values) { - next unless hex($key)<0x50; - $diffvalues{$key} = 0; - if (defined $lastvalues{$key}) { - if ($values{$key} >= $lastvalues{$key}) { - $diffvalues{$key} = $values{$key} - $lastvalues{$key}; - } - else { - $diffvalues{$key} = $values{$key} - $lastvalues{$key} + 2**32; - } - } - $diffvalues{$key} /= $time if $time; - #print $key." ".$values{$key}." ".$lastvalues{$key}." ".$diffvalues{$key}."\n"; - } - #print "=====\n"; - $diffvalues{"31"} = max($diffvalues{"31"},$diffvalues{"32"}); - $diffvalues{"38"} = max(max($diffvalues{"38"},$diffvalues{"39"}),$diffvalues{"3a"}); - if ($style == 0) { - $diffvalues{"41"} = max($diffvalues{"41"},$diffvalues{"42"}); - $diffvalues{"48"} = max(max($diffvalues{"48"},$diffvalues{"49"}),$diffvalues{"4a"}); - } - %lastvalues = %values; - if($style != 0) { - plot_storage_reset($storearr{$keys[0]}); - for(my $i= 0; $i < scalar(@keys); $i++) { - store_push($storearr{$keys[$i]},$time,$diffvalues{$keys[$i]},0); - store_print($storearr{$keys[$i]}); - } - plot_storage_sleep($storearr{$keys[0]},1); - plot_finished($storearr{$keys[0]}); - } - else { - plot_reset(); - for(my $i= 0; $i < scalar(@keys); $i++) { - plot_add("",$diffvalues{$keys[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - for(my $i= 0; $i < scalar(@keys2); $i++) { - plot_add("",$diffvalues{$keys2[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - plot_finished(); - } - } - } - } - - -################################################# -# Select Operation -################################################# - -if(!(defined $ARGV[0]) || $ARGV[0] =~ /help/) {help(); exit;} - -if($ARGV[0] =~ /oep5V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8010,0x8011]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5.8V input","5V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3.3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8012,0x8013]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["3.8V input","3.3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep1.2V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8014,0x8015]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["1.8V input","1.2V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8016,0x8017]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V input","-3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxp3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801e,0x801e]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V minimum","+3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxn3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801f,0x801f]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["-3V minimum","-3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmax5Vin/) { - $address = [0xfffd,0xfffd,0xfffd]; - $register = [0x8018,0x8018,0x8010]; - $regwidth = [12,12,12]; - $regoffset = [0,16,0]; - $yscale = [.5,.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5Vin minimum","5Vin maximum","5Vin"]; - genreg(); - } - -if($ARGV[0] =~ /oeptemp/) { - oeptemp(($delay)?$delay:5000000,[$name." - OEP Temperature"]); - } - - -if($ARGV[0] =~ /rpcdatarate/) { - $delay = 1000000 unless $delay; - $xticks = 1 ; - $xtitle = "Sender ((Sector mod 3)*4+TRB)"; - $ytitle = "Data Words /1024"; - $windowname = "Data Words sent by RPC"; - $curvestyle = "histo"; - $key = YES; - $ydiff = DIFFY; - $ymin = 0; - $yscale = [512,512]; - $address = [0x8401,0x8411]; - $register = [0x4001,0x4001]; - $regamount = [12,12]; - $title = ["Sector 0,1,2","Sector 3,4,5"]; - $regoffset = [0,0]; - $regwidth = [32,32]; - genreg(); - } - -#hadplot -a 2 -r 1 -p 0 -w 16 -d 5 -o 200 -n 1000 -yoverflow 65536 genhistdiff - - -if($ARGV[0] =~ /slowcontrolrate/) { - $delay = 1000000 unless $delay; - $samples = 240 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $windowname = "Slow Control Data Rate"; - $ydiff = DIFFY; - $ytitle = "Slow Control Data / kByte/s"; - $address = [0x8000]; - $register = [0x4012]; - $regoffset = [0]; - $regwidth = [32]; - $yscale = [102.4]; - genhist(); - } - -if($ARGV[0] =~ /eventratehighres/) { - $delay = 5000 ; #unless $delay; - $samples = 1000; # unless $samples; - $downscale = 200;# unless $downscale; -# $style = 0 unless $style; - $windowname = "Eventrate High Resolution"; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $title = ["Event rate"]; - $address = [0x2]; - $register = [0x1]; - $regoffset = [0]; - $regwidth = [16]; - $yoverflow = [65536]; - genhist(); - } - - -if($ARGV[0] =~ /eventrate/) { - $address = [0x2]; - $register = [0x1]; - $regwidth = [16]; - $regoffset = [0]; - $timeref = [0x2]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 10 unless $downscale; - $windowname = "Event rate history"; - $key = NO; - $ytitle = "Event rate [Hz]" if $ytitle eq ""; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**16] unless $yoverflow->[0] != 2**32; - genhist(); - } - -if($ARGV[0] =~ /datarate/) { - $address = [0xff7f]; - $register = [0x83f3]; - $regwidth = [32]; - $regoffset = [0]; - $timeref = [0x8000]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 5 unless $downscale; - $windowname = "Total data rate history"; - $xtitle = "Time [s]" unless defined $xtitle; - $ytitle = "Data rate [MiByte]" unless defined $ytitle; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**12]; - $yscale = [2**20]; - $key = NO; - genhist(); - } - -if($ARGV[0] =~ /busytime/) { - $delay = 100000 unless $delay; - $samples = 100 unless $samples; - $downscale = 5 unless $downscale; - $style = 1; - $windowname = "Busytime history"; - deadtimehist2(); - } - -if($ARGV[0] =~ /busy/) { - $delay = 100000 unless $delay; - $style = 0; - $windowname = "Busy time"; - deadtimehist2(); - } - -if($ARGV[0] =~ /oepspikehist/) { - $delay = 100000 unless $delay; - $samples = 1000 unless $samples; - $downscale = 10 unless $downscale; -# $style = 0 unless $style; - $windowname = "OEP CMS Spikes"; - $ydiff = DIFFY; - $title = ["OEP CMS Spikes"]; - $address = [0xfffd]; - $register = [7]; - $regoffset = [0]; - $regwidth = [16]; - genhist(); - } - -if($ARGV[0] =~ /oepretrhist/) { - $delay = 500000 unless $delay; - $samples = 600 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Retransmissions"; - $ydiff = DIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genhist(); - } - -if($ARGV[0] =~ /oeptokenmisshist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 4 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Token Missing"; - $ydiff = DIFFY; - $title = ["Missing Tokens"]; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genhist(); - } - - -if($ARGV[0] =~ /oeptrgerrhist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP CMS Errors"; - $ydiff = DIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genhist(); - } - - -if($ARGV[0] =~ /histdiff/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = DIFFY; - genhist(); - } - -if($ARGV[0] =~ /hist/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = NODIFFY; - genhist(); - } - -if($ARGV[0] =~ /oepworktime/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 0 unless $xticks; - $ymax = $delay*1.1/1000; - $yscale = [1000]; - $xtitle = "OEP"; - $ytitle = "Time [ms]"; - $windowname = "OEP Trigger Handling Times"; - $ydiff = DIFFY; - $title = ["Readout","Waiting","Initialization","Calibration","Idle"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [0x9113,0x9114,0x9111,0x9112,0x9110]; - $regoffset = [0,0,0,0,0]; - $regwidth = [32,32,32,32,32]; - genreg(); - } - -if($ARGV[0] =~ /gberate/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 1 unless $xticks; - $xtitle = "Sender"; - $ytitle = "Data Rate (kiB)" if $ytitle eq ""; - $windowname = "Gbe Data Rate"; - $key = NO; - $ydiff = DIFFY; - $xgrid = NO; - $address = [0xff7f]; - $register = [0x83f3]; - $regoffset = [10]; - $regwidth = [22]; - genreg(); - } - -if($ARGV[0] =~ /oepwords/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data Words sent by OEP"; - $yscale = [1]; - $key = NO; - $ydiff = DIFFY; - $address = [0xfffd]; - $register = [0x910B]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /mdcchan/) { - $delay = 1000000 unless $delay; - $xticks = 1; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data words per TDC channel"; - $yscale = [1]; - $key = NO; - $ydiff = NODIFFY; - if ($ARGV[0] =~ /diff/) { - $ydiff = DIFFY; - } - $address = [$address->[0]?$address->[0]:0xfffd]; - $register = [0xc088]; - $regamount = [96]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /regdiff/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = DIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /reg/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = NODIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /oeptrgerr/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "# of errors"; - $windowname = "OEP CMS Errors"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "OEP Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xfffd]; - $register = [0x7100]; - $regoffset = [0]; - $regwidth = [16]; - genreg(); - } - -if($ARGV[0] =~ /showerfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Shower Data Buffer Fill Level"; - $key = $key || NO; - $ydiff = NODIFFY; - $address = [0xfff7,0xfff7,0xfff7,0xfff7,0xfff7,0xfff7]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /filllevel/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Front-end Data Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xffff,0xffff,0xffff,0xffff,0xffff,0xffff]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepretr/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Retransmissions"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genreg(); - } - -if($ARGV[0] =~ /timecmslvl1/) { - $delay = 1000000 unless $delay; - $windowname = "Trigger Delay"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "Time between CMS and LVL1 [10ns]"; - $address = [0xfffd]; - $register = [2]; - $regoffset = [16]; - $regwidth = [11]; - genreg(); - } - -if($ARGV[0] =~ /oeptokenmiss/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Token Missing"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "# of missing token"; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genreg(); - } - - - - -if($ARGV[0] =~ /commonstatus/) { - bitmap(($delay)?$delay:1000000,[0xffff],[0],[1],[0],[20],["Common Status Bits"],0,$name." - Common Status Bit"); - } -if($ARGV[0] =~ /genbit/ || $ARGV[0] =~ /bitmap/) { - bitmap(($delay)?$delay:1000000,$address,$register,$regamount,$regoffset,$regwidth,$title,$style,$name." - ".$windowname); - } - diff --git a/hmon/hmon_hadplotnew.sh b/hmon/hmon_hadplotnew.sh new file mode 120000 index 0000000..9faf824 --- /dev/null +++ b/hmon/hmon_hadplotnew.sh @@ -0,0 +1 @@ +../../daqtools/tools/hadplot \ No newline at end of file diff --git a/hmon/permanent/hmon_cpu.pl b/hmon/permanent/hmon_cpu.pl index 696f04c..f6878b1 100755 --- a/hmon/permanent/hmon_cpu.pl +++ b/hmon/permanent/hmon_cpu.pl @@ -31,7 +31,7 @@ my $fqa = QA::OpenQAFile(); # softirq: servicing softirqs #my @srv = qw(lxhadeb01 lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hades31 hades33); -my @srv = qw(lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hades31 hades33); +my @srv = qw(lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hadesp31 hades33); my $template .= "\n\n
"; diff --git a/hmon/permanent/hmon_eb_run.pl b/hmon/permanent/hmon_eb_run.pl index 96f5998..b392010 100755 --- a/hmon/permanent/hmon_eb_run.pl +++ b/hmon/permanent/hmon_eb_run.pl @@ -80,9 +80,14 @@ while(1) { # 0x3000 => ?? - $rh_result = trb_register_read(0x3001, 0x1) or $trbneterr = 1; - my $res = ($rh_result->{0x3001} || 0) & 0xFFFF; - + #$rh_result = trb_register_read(0x3001, 0x1) or $trbneterr = 1; + # my $res = ($rh_result->{0x3001} || 0) & 0xFFFF; + + # JAM2017: try to check rate with tof if rich is not up: + $rh_result = trb_register_read(0x4c00, 0x1) or $trbneterr = 1; + my $res = ($rh_result->{0x4c00} || 0) & 0xFFFF; + + $evtrate = $res - ($events || $res); $evtrate += 2**16 if $evtrate < 0; $events = $res; diff --git a/hmon/permanent/hmon_mdchv_new.pl b/hmon/permanent/hmon_mdchv_new.pl new file mode 100644 index 0000000..116b8df --- /dev/null +++ b/hmon/permanent/hmon_mdchv_new.pl @@ -0,0 +1,128 @@ +#!/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 Hmon; +use QA; +use Perl2Epics; +use HADES::TrbNet; +use HPlot; + +my $timer = 0; +my @colors = ("#000000", "#ff0000","#00ff00","#0000ff","#cccc00","#cc00cc"); +my @names = qw( S1 S2 S3 S4 S5 S6); +my @layerlabel = qw(F C); +my $connect_status = &trb_init_ports(); +if(!$connect_status) { + die("could not connect to trbnetd"); +} + +########### +#Change 3 for-loops to include all four planes again! +############ + +# my $fqa = QA::OpenQAFile(); +my @plot; +foreach my $s (0..1) { + foreach my $p (0..3) { + $plot[$p*2+$s] = (); + $plot[$p*2+$s]->{name} = "P".$p.($s?'F':'C')."I"; + $plot[$p*2+$s]->{file} = "files/MDCHV".$plot[$p*2+$s]->{name}; + $plot[$p*2+$s]->{entries} = 360; + $plot[$p*2+$s]->{xscale} = 12; + $plot[$p*2+$s]->{type} = HPlot::TYPE_HISTORY; + $plot[$p*2+$s]->{output} = HPlot::OUT_PNG; + $plot[$p*2+$s]->{xlabel} = "Minutes"; + $plot[$p*2+$s]->{ylabel} = ($s?'F':'C')." Current"; + $plot[$p*2+$s]->{sizex} = 800; + $plot[$p*2+$s]->{sizey} = 420; + $plot[$p*2+$s]->{curves} = 6; + $plot[$p*2+$s]->{dots} = 1; + $plot[$p*2+$s]->{colors} = \@colors; + foreach my $c (0..5) { + $plot[$p*2+$s]->{titles}->[$c] = ($s?'F ':'C ').$names[$c]; + } + HPlot::PlotInit($plot[$p*2+$s]); + + $plot[$p*2+$s+8]->{name} = "P".$p.($s?'F':'C')."V"; + $plot[$p*2+$s+8]->{file} = "files/MDCHV".$plot[$p*2+$s+8]->{name}; + $plot[$p*2+$s+8]->{entries} = 360; + $plot[$p*2+$s+8]->{xscale} = 12; + $plot[$p*2+$s+8]->{type} = HPlot::TYPE_HISTORY; + $plot[$p*2+$s+8]->{output} = HPlot::OUT_PNG; + $plot[$p*2+$s+8]->{xlabel} = "Minutes"; + $plot[$p*2+$s+8]->{ylabel} = ($s?'F':'C')." Voltage"; + $plot[$p*2+$s+8]->{sizex} = 800; + $plot[$p*2+$s+8]->{sizey} = 420; + $plot[$p*2+$s+8]->{curves} = 6; + $plot[$p*2+$s+8]->{dots} = 1; + $plot[$p*2+$s+8]->{colors} = \@colors; + foreach my $c (0..5) { + $plot[$p*2+$s+8]->{titles}->[$c] = ($s?'F ':'C ').$names[$c]; + } + HPlot::PlotInit($plot[$p*2+$s+8]); + } + } + + +for(my $i = 1; $i<=4; $i++) { + for(my $j = 1; $j<=6; $j++) { + my $s = sprintf("HAD:MDC:HV:P%i:S%i:F:vmon",$i,$j); + Perl2Epics::Connect("$i-$j-0-V",$s); + $s = sprintf("HAD:MDC:HV:P%i:S%i:C:vmon",$i,$j); + Perl2Epics::Connect("$i-$j-1-V",$s); + $s = sprintf("HAD:MDC:HV:P%i:S%i:F:imon",$i,$j); + Perl2Epics::Connect("$i-$j-0-I",$s); + $s = sprintf("HAD:MDC:HV:P%i:S%i:C:imon",$i,$j); + Perl2Epics::Connect("$i-$j-1-I",$s); + } + } +print "Connected.\n"; + +while(1) { + my $data = Perl2Epics::GetAll(); + my $str = Hmon::MakeTitle(13, 6, "MDC HV", 1, ""); + $str .= ""; #
+ $str .= "
Sector 1Sector 2Sector 3Sector 4Sector 5Sector 6"; + for(my $i = 1; $i<=4; $i++) { + $str .= "
Plane $i\n"; + for(my $v = 0; $v<=1; $v++) { + $str .= "
".$layerlabel[$v]." "; + for(my $s = 1; $s<=6; $s++) { + my $volt = $data->{"$i-$s-$v-V"}->{val}; + my $curr = $data->{"$i-$s-$v-I"}->{val}; + my $tv = strftime("%H:%M:%S",localtime($data->{"$i-$s-$v-V"}->{tme} || 0)); + my $tc = strftime("%H:%M:%S",localtime($data->{"$i-$s-$v-I"}->{tme} || 0)); + $volt = -1 unless defined $volt; + $curr = -1 unless defined $curr; + HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."I",$curr,$s-1); + HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."V",$volt,$s-1); + my $tmp .= sprintf(" %4i V | %2.2f uA",$volt,$curr); + $tmp =~ s/\s/ /gi; + $str .= "".$tmp; + } + } + + #$str .= "
 \n"; + } + $str .= "
";# + $str .= Hmon::MakeFooter(); + + if(!($timer%1)) { + Hmon::WriteFile("MDCHV", $str); + } + if(!($timer%3)) { + foreach my $s (0..1){ + foreach my $p (0..3) { + HPlot::PlotDraw("P".$p.($s?'F':'C')."I"); + HPlot::PlotDraw("P".$p.($s?'F':'C')."V"); + } + } + } + $timer++; + sleep(1); + } diff --git a/hmon/permanent/hmon_open_ssh_master_channels.pl b/hmon/permanent/hmon_open_ssh_master_channels.pl index abea18a..410052c 100755 --- a/hmon/permanent/hmon_open_ssh_master_channels.pl +++ b/hmon/permanent/hmon_open_ssh_master_channels.pl @@ -4,7 +4,7 @@ use strict; use warnings; use v5.10.0; -my @cpus = qw |lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hades31 hades33|; +my @cpus = qw |lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05 lxhadeb06 lxhadeb07 lxhadesdaq hadesdaq01 hadesdaq02 hades30 hadesp31 hades33|; for my $cpu (@cpus) { my $c = "~/trbsoft/hadesdaq/hmon/hmon_ssh hadaq\@$cpu -N -f {name} = "PionLvCurrent"; +$plot->{file} = "files/PionLvCurrent"; +$plot->{entries} = 500; +$plot->{curves} = 2; +$plot->{type} = HPlot::TYPE_HISTORY; +$plot->{output} = HPlot::OUT_PNG; +$plot->{titles}->[0] = "Pion0"; +$plot->{titles}->[1] = "Pion1"; +$plot->{xlabel} = "Seconds"; +$plot->{ylabel} = "mA"; +$plot->{sizex} = 630; +$plot->{sizey} = 220; +HPlot::PlotInit($plot); + + + + $str = Hmon::MakeTitle(9, 10, "Pion Low Voltage"); + $str .= qq@
\n@; + $str .= qq@\n@; + $str .= Hmon::MakeFooter(); + Hmon::WriteFile("PionLV",$str); + + +while (1) { + + + + #Hmon::WriteLog($flog, "Pion LV","Test"); + + my $curr0 = 4; + my $curr1 = 5.11; + + HPlot::PlotAdd("PionLvCurrent",$curr0,0); + HPlot::PlotAdd("PionLvCurrent",$curr1,1); + HPlot::PlotDraw("PionLvCurrent"); + + + + + my $qastate = QA::GetQAState('below', max($curr0,$curr1), @QA::PionLvCurrLimits); + my $str = sprintf("%i/%i", $curr0, $curr1); + QA::WriteQALog($fqa,"pion","LV", 10, $qastate, "LV Current", $str, + "Current on LV line for Pion FEE: " . $str); + + sleep(1); +} diff --git a/hub/register_configgbe_ip_eb5master.db b/hub/register_configgbe_ip_eb5master.db index 3003f4c..d26d27d 100644 --- a/hub/register_configgbe_ip_eb5master.db +++ b/hub/register_configgbe_ip_eb5master.db @@ -668,43 +668,94 @@ # Dest Port Src MAC Src IP Src Port # Hub # Type # C3 # C4 # C6 # C7 # ####################################################################### +# JAM 2016: this EB will be used as pseudo node to setup the dabc bnet +# last column will distribute to bnet input nodes +# EB_LUT must be 0x8000 in CTS for bnet mode +# 0xc0a8640f - lxhadeb05 +# 0xc0a8640C - lxhadeb02 +# 0xc0a8640D - lxhadeb03 +# 0xc0a8640E - lxhadeb04 +# note that we also need to set same destination ips in the hub table at the end of this file! +# #lxhadeb04, EB15 .14 - 0x8000 15 0xc65B 0xdead8000 0xc0a86480 0xc65B 0xc0a8640E - 0x8100 15 0xc651 0xdead8100 0xc0a86481 0xc651 0xc0a8640E - 0x8110 15 0xc652 0xdead8110 0xc0a86482 0xc652 0xc0a8640E - 0x8300 15 0xc653 0xdead8300 0xc0a86483 0xc653 0xc0a8640E - 0x8310 15 0xc654 0xdead8310 0xc0a86484 0xc654 0xc0a8640E - 0x8320 15 0xc655 0xdead8320 0xc0a86485 0xc655 0xc0a8640E - 0x8400 15 0xc656 0xdead8400 0xc0a86486 0xc656 0xc0a8640E - 0x8410 15 0xc657 0xdead8410 0xc0a86487 0xc657 0xc0a8640E - 0x8420 15 0xc658 0xdead8420 0xc0a86488 0xc658 0xc0a8640E - 0x8600 15 0xc659 0xdead8600 0xc0a86489 0xc659 0xc0a8640E - 0x8700 15 0xc65A 0xdead8700 0xc0a8648A 0xc65A 0xc0a8640E - 0x8800 15 0xc650 0xdead8800 0xc0a8648B 0xc650 0xc0a8640E - 0x8900 15 0xc65C 0xdead8900 0xc0a8648C 0xc65C 0xc0a8640E - 0x8880 15 0xc65D 0xdead8A00 0xc0a8648D 0xc65D 0xc0a8640E - 0x8890 15 0xc65F 0xdead8890 0xc0a8648F 0xc65F 0xc0a8640E - 0x8910 15 0xc65E 0xdead8910 0xc0a8648E 0xc65E 0xc0a8640E - 0x1000 15 0xc660 0xdead1000 0xc0a86490 0xc660 0xc0a8640E - 0x1010 15 0xc661 0xdead1010 0xc0a86491 0xc661 0xc0a8640E - 0x1020 15 0xc662 0xdead1020 0xc0a86492 0xc662 0xc0a8640E - 0x1030 15 0xc663 0xdead1030 0xc0a86493 0xc663 0xc0a8640E + 0x8000 15 0xc65B 0xdead8000 0xc0a86480 0xc65B 0xc0a8640F + 0x8100 15 0xc651 0xdead8100 0xc0a86481 0xc651 0xc0a8640F + 0x8110 15 0xc652 0xdead8110 0xc0a86482 0xc652 0xc0a8640F + 0x8300 15 0xc653 0xdead8300 0xc0a86483 0xc653 0xc0a8640F + 0x8310 15 0xc654 0xdead8310 0xc0a86484 0xc654 0xc0a8640F + 0x8320 15 0xc655 0xdead8320 0xc0a86485 0xc655 0xc0a8640F + 0x8400 15 0xc656 0xdead8400 0xc0a86486 0xc656 0xc0a8640C + 0x8410 15 0xc657 0xdead8410 0xc0a86487 0xc657 0xc0a8640C + 0x8420 15 0xc658 0xdead8420 0xc0a86488 0xc658 0xc0a8640C + 0x8600 15 0xc659 0xdead8600 0xc0a86489 0xc659 0xc0a8640C + 0x8700 15 0xc65A 0xdead8700 0xc0a8648A 0xc65A 0xc0a8640C + 0x8800 15 0xc650 0xdead8800 0xc0a8648B 0xc650 0xc0a8640F + 0x8900 15 0xc65C 0xdead8900 0xc0a8648C 0xc65C 0xc0a8640D + 0x8880 15 0xc65D 0xdead8A00 0xc0a8648D 0xc65D 0xc0a8640D + 0x8890 15 0xc65F 0xdead8890 0xc0a8648F 0xc65F 0xc0a8640D + 0x8910 15 0xc65E 0xdead8910 0xc0a8648E 0xc65E 0xc0a8640D + 0x1000 15 0xc660 0xdead1000 0xc0a86490 0xc660 0xc0a8640D + 0x1010 15 0xc661 0xdead1010 0xc0a86491 0xc661 0xc0a8640D + 0x1020 15 0xc662 0xdead1020 0xc0a86492 0xc662 0xc0a8640D + 0x1030 15 0xc663 0xdead1030 0xc0a86493 0xc663 0xc0a8640D 0x1040 15 0xc664 0xdead1040 0xc0a86494 0xc664 0xc0a8640E 0x1050 15 0xc665 0xdead1050 0xc0a86495 0xc665 0xc0a8640E 0x1100 15 0xc666 0xdead1100 0xc0a86496 0xc666 0xc0a8640E 0x1110 15 0xc667 0xdead1110 0xc0a86497 0xc667 0xc0a8640E - 0x1120 15 0xc668 0xdead1120 0xc0a86498 0xc668 0xc0a8640E - 0x1130 15 0xc669 0xdead1130 0xc0a86499 0xc669 0xc0a8640E - 0x1140 15 0xc66A 0xdead1140 0xc0a8649A 0xc66A 0xc0a8640E - 0x1150 15 0xc66B 0xdead1150 0xc0a8649B 0xc66B 0xc0a8640E - 0x1160 15 0xc66C 0xdead1160 0xc0a8649C 0xc66C 0xc0a8640E - 0x3200 15 0xc670 0xdead3200 0xc0a864A0 0xc670 0xc0a8640E - 0x3210 15 0xc671 0xdead3210 0xc0a864A1 0xc671 0xc0a8640E - 0x3220 15 0xc672 0xdead3220 0xc0a864A2 0xc672 0xc0a8640E - 0x3230 15 0xc673 0xdead3230 0xc0a864A3 0xc673 0xc0a8640E - 0x3240 15 0xc674 0xdead3240 0xc0a864A4 0xc674 0xc0a8640E - 0x3250 15 0xc675 0xdead3250 0xc0a864A5 0xc675 0xc0a8640E + 0x1120 15 0xc668 0xdead1120 0xc0a86498 0xc668 0xc0a8640F + 0x1130 15 0xc669 0xdead1130 0xc0a86499 0xc669 0xc0a8640F + 0x1140 15 0xc66A 0xdead1140 0xc0a8649A 0xc66A 0xc0a8640F + 0x1150 15 0xc66B 0xdead1150 0xc0a8649B 0xc66B 0xc0a8640F + 0x1160 15 0xc66C 0xdead1160 0xc0a8649C 0xc66C 0xc0a8640F + 0x3200 15 0xc670 0xdead3200 0xc0a864A0 0xc670 0xc0a8640F + 0x3210 15 0xc671 0xdead3210 0xc0a864A1 0xc671 0xc0a8640F + 0x3220 15 0xc672 0xdead3220 0xc0a864A2 0xc672 0xc0a8640F + 0x3230 15 0xc673 0xdead3230 0xc0a864A3 0xc673 0xc0a8640F + 0x3240 15 0xc674 0xdead3240 0xc0a864A4 0xc674 0xc0a8640F + 0x3250 15 0xc675 0xdead3250 0xc0a864A5 0xc675 0xc0a8640F + +# JAM below the original setup for single EB 15 +# 0x8000 15 0xc65B 0xdead8000 0xc0a86480 0xc65B 0xc0a8640E +# 0x8100 15 0xc651 0xdead8100 0xc0a86481 0xc651 0xc0a8640E +# 0x8110 15 0xc652 0xdead8110 0xc0a86482 0xc652 0xc0a8640E +# 0x8300 15 0xc653 0xdead8300 0xc0a86483 0xc653 0xc0a8640E +# 0x8310 15 0xc654 0xdead8310 0xc0a86484 0xc654 0xc0a8640E +# 0x8320 15 0xc655 0xdead8320 0xc0a86485 0xc655 0xc0a8640E +# 0x8400 15 0xc656 0xdead8400 0xc0a86486 0xc656 0xc0a8640E +# 0x8410 15 0xc657 0xdead8410 0xc0a86487 0xc657 0xc0a8640E +# 0x8420 15 0xc658 0xdead8420 0xc0a86488 0xc658 0xc0a8640E +# 0x8600 15 0xc659 0xdead8600 0xc0a86489 0xc659 0xc0a8640E +# 0x8700 15 0xc65A 0xdead8700 0xc0a8648A 0xc65A 0xc0a8640E +# 0x8800 15 0xc650 0xdead8800 0xc0a8648B 0xc650 0xc0a8640E +# 0x8900 15 0xc65C 0xdead8900 0xc0a8648C 0xc65C 0xc0a8640E +# 0x8880 15 0xc65D 0xdead8A00 0xc0a8648D 0xc65D 0xc0a8640E +# 0x8890 15 0xc65F 0xdead8890 0xc0a8648F 0xc65F 0xc0a8640E +# 0x8910 15 0xc65E 0xdead8910 0xc0a8648E 0xc65E 0xc0a8640E +# 0x1000 15 0xc660 0xdead1000 0xc0a86490 0xc660 0xc0a8640E +# 0x1010 15 0xc661 0xdead1010 0xc0a86491 0xc661 0xc0a8640E +# 0x1020 15 0xc662 0xdead1020 0xc0a86492 0xc662 0xc0a8640E +# 0x1030 15 0xc663 0xdead1030 0xc0a86493 0xc663 0xc0a8640E +# 0x1040 15 0xc664 0xdead1040 0xc0a86494 0xc664 0xc0a8640E +# 0x1050 15 0xc665 0xdead1050 0xc0a86495 0xc665 0xc0a8640E +# 0x1100 15 0xc666 0xdead1100 0xc0a86496 0xc666 0xc0a8640E +# 0x1110 15 0xc667 0xdead1110 0xc0a86497 0xc667 0xc0a8640E +# 0x1120 15 0xc668 0xdead1120 0xc0a86498 0xc668 0xc0a8640E +# 0x1130 15 0xc669 0xdead1130 0xc0a86499 0xc669 0xc0a8640E +# 0x1140 15 0xc66A 0xdead1140 0xc0a8649A 0xc66A 0xc0a8640E +# 0x1150 15 0xc66B 0xdead1150 0xc0a8649B 0xc66B 0xc0a8640E +# 0x1160 15 0xc66C 0xdead1160 0xc0a8649C 0xc66C 0xc0a8640E +# 0x3200 15 0xc670 0xdead3200 0xc0a864A0 0xc670 0xc0a8640E +# 0x3210 15 0xc671 0xdead3210 0xc0a864A1 0xc671 0xc0a8640E +# 0x3220 15 0xc672 0xdead3220 0xc0a864A2 0xc672 0xc0a8640E +# 0x3230 15 0xc673 0xdead3230 0xc0a864A3 0xc673 0xc0a8640E +# 0x3240 15 0xc674 0xdead3240 0xc0a864A4 0xc674 0xc0a8640E +# 0x3250 15 0xc675 0xdead3250 0xc0a864A5 0xc675 0xc0a8640E + + + + + # Dest MAC Dest MAC Dest IP Src MAC Packet Size # Hub # Type # C0 # C1 # C2 # C5 # C8 # ##################################################################################### @@ -723,5 +774,44 @@ 0xff7f 112 0x2157b095 0x001B 0xc0a8640f 0x0230 0x0578 0xff7f 113 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 0xff7f 114 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 - 0xff7f 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 +# 0xff7f 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 # lxhadeb04 no bnet # 0xff7f 115 0x4877f487 0x0030 0xc0a86432 0x0230 0x0578 #lxhadesdaq +# JAM2016: for DABC-BNET the destination ips have to be set here for individual hubs +# the ip entries in above table for eb15 needs to match this to configure EBs! + 0x8000 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8100 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8110 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8300 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8310 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8320 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8400 115 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 # 0xc0a8640C lxhadeb02 + 0x8410 115 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 # 0xc0a8640C lxhadeb02 + 0x8420 115 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 # 0xc0a8640C lxhadeb02 + 0x8600 115 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 # 0xc0a8640C lxhadeb02 + 0x8700 115 0x21553E1E 0x001B 0xc0a8640C 0x0230 0x0578 # 0xc0a8640C lxhadeb02 + 0x8800 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x8900 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x8880 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x8890 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x8910 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x1000 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x1010 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x1020 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x1030 115 0x2155068A 0x001B 0xc0a8640D 0x0230 0x0578 # 0xc0a8640D lxhadeb03 + 0x1040 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 # 0xc0a8640E lxhadeb04 + 0x1050 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 # 0xc0a8640E lxhadeb04 + 0x1100 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 # 0xc0a8640E lxhadeb04 + 0x1110 115 0x2129b7c4 0x001B 0xc0a8640E 0x0230 0x0578 # 0xc0a8640E lxhadeb04 + 0x1120 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x1130 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x1140 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x1150 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x1160 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3200 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3210 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3220 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3230 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3240 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + 0x3250 115 0x2157b095 0x001B 0xc0a8640F 0x0230 0x0578 # 0xc0a8640F lxhadeb05 + + diff --git a/hub/trb.db b/hub/trb.db index c85be0d..358ed0d 100644 --- a/hub/trb.db +++ b/hub/trb.db @@ -6,7 +6,7 @@ hub etraxp100 hub etraxp101 hub etraxp102 hub etraxp103 -hub etraxp104 +#hub etraxp104 # jam2017: used in ee lab hub etraxp121 hubcts etraxp107 #hubcentral etraxp023 diff --git a/main/data_sources.db b/main/data_sources.db index 1f57bff..fe1818a 100644 --- a/main/data_sources.db +++ b/main/data_sources.db @@ -2,22 +2,22 @@ # Addr On/Off Name DataSize #Start must be the first for EvtId -0x8800 1 StartVetoCTS low +0x8800 0 StartVetoCTS low 0x8000 0 Central low #off 0x8100 0 innerMDC low #off 0x8110 0 outerMDC low #off -0x8300 1 RICH12 mid -0x8310 1 RICH34 mid -0x8320 1 RICH56 mid -0x8400 1 RPC12 mid -0x8410 1 RPC34 mid -0x8420 1 RPC56 mid +0x8300 0 RICH12 mid +0x8310 0 RICH34 mid +0x8320 0 RICH56 mid +0x8400 0 RPC12 mid +0x8410 0 RPC34 mid +0x8420 0 RPC56 mid 0x8600 1 TOF low -0x8700 1 FW low -0x8880 1 StartTRB3 low -0x8890 1 VetoTRB3 low -0x8900 1 Pion1 mid -0x8910 1 Pion2 mid +0x8700 0 FW low +0x8880 0 StartTRB3 low +0x8890 0 VetoTRB3 low +0x8900 0 Pion1 mid +0x8910 0 Pion2 mid 0x1000 1 MDC12sec1 high 0x1010 1 MDC12sec2 high 0x1020 1 MDC12sec3 mid @@ -31,9 +31,9 @@ 0x1140 1 MDC34sec5 high 0x1150 1 MDC34sec6 high #0x1160 1 MDCspecial mid #off -0x3200 1 Shower1 mid -0x3210 1 Shower2 mid -0x3220 1 Shower3 mid -0x3230 1 Shower4 mid -0x3240 1 Shower5 mid -0x3250 1 Shower6 mid +0x3200 0 Shower1 mid +0x3210 0 Shower2 mid +0x3220 0 Shower3 mid +0x3230 0 Shower4 mid +0x3240 0 Shower5 mid +0x3250 0 Shower6 mid diff --git a/main/main_hades.script b/main/main_hades.script index b93f331..439a0f5 100644 --- a/main/main_hades.script +++ b/main/main_hades.script @@ -58,7 +58,8 @@ read_addrange_db ../main/address_range.db # Program 1st AddOn FPGA exec_cmd{local} echo "Programming FPGA1" - exec_cmd{hub} jam_trbv2 --addononly -aFP /home/hadaq/hub/hub2_fpga1_single_20110517.stp +# exec_cmd{hub} jam_trbv2 --addononly -aFP /home/hadaq/hub/hub2_fpga1_single_20110517.stp + exec_cmd{hub} jam_trbv2 --addononly -aFP /home/hadaq/hub/hub2_fpga1_single_20140818.stp exec_cmd{hubcts} jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp # exec_cmd{hubcentral} jam_trbv2 --addon -aFP /home/hadaq/hub/hub2_fpga1_full_20110517.stp # exec_cmd{cts} jam_trbv2 --addononly -aFP /home/hadaq/cts/20120410_cts_fpga1_only_etrax_a.stp diff --git a/main/startup_briccolage.sh b/main/startup_briccolage.sh index 2ce9bae..236dc80 100755 --- a/main/startup_briccolage.sh +++ b/main/startup_briccolage.sh @@ -16,10 +16,10 @@ notifyall.sh "DAQ" " DAQ is going to be restarted." "STARTUP" & export DAQOPSERVER=hadesp31 echo " Pexor clean-up..." #set DMA transfer size, flush buffers, reset DMA core" - ssh hades31 "pkill -USR1 trbnetd 2>/dev/null; killall trbcmd 2>/dev/null; trbcmdlocal W 0x703 0x20; trbcmdlocal f 3; trbcmdlocal W 0x702 2;" + ssh hadesp31 "pkill -USR1 trbnetd 2>/dev/null; killall trbcmd 2>/dev/null; trbcmdlocal W 0x703 0x20; trbcmdlocal f 3; trbcmdlocal W 0x702 2;" echo " Doing Reset..." - ssh hades31 "tryreset.pl; pkill -USR2 trbnetd" - ssh hades31 "pgrep trbnetd 1>/dev/null || trbnetd" + ssh hadesp31 "tryreset.pl; pkill -USR2 trbnetd" + ssh hadesp31 "pgrep trbnetd 1>/dev/null || trbnetd" echo " Enable ports..." trbcmd w 0xfffe 0xc5 0x4000 @@ -41,13 +41,15 @@ notifyall.sh "DAQ" " DAQ is going to be restarted." "STARTUP" & #switchport.pl 0x1003 5 off #0x2124 + # 2012-04-30: 10:16:00 0x223b removed from system, reinit doesnt work # switchport.pl 0x1133 5 off # 2012-09-09: 0x2022 0x2233 removed as not working # switchport.pl 0x1134 5 off #0x2233 # switchport.pl 0x1034 6 off #0x2022 -# + +# switchport.pl 0x1034 8 off #0x2029 23.09.2014 # 2012-10-5: 06:50 removed, busy several times. #switchport.pl 0x1052 3 off #0x214a @@ -55,6 +57,8 @@ notifyall.sh "DAQ" " DAQ is going to be restarted." "STARTUP" & #2014-04-16 frquent reinits, still token missing 20114-08-13 CW switchport.pl 0x1151 8 off #2257 #switchport.pl 0x1134 5 off #2233, removed 2014-08-24 during beamtime +#switchport.pl 0x1101 4 off #2203, removed 2014-09-03 during beamtime +#switchport.pl 0x1034 1 off #2029, JAM optionally remove this also #2014-06-11 link not working # switchport.pl 0x1134 5 off #2233 @@ -65,6 +69,9 @@ switchport.pl 0x1151 8 off #2257 #2014-07-12 0x2026 is reported dead by Joern Wuestenfeld, removed by Michael Traxler #switchport.pl 0x1033 7 off #0x2026 + +#2016-05-23 0x2012 disabled due to causing FEE error. done by Christian Wiebusch +#switchport.pl 0x1031 4 off #0x2012 #Main Start-up echo " Running Startup script" @@ -72,7 +79,7 @@ switchport.pl 0x1151 8 off #2257 -m TOF -m RPC -m WALL -m RICH -m SHOWER \ -m STARTCTS -m NORESET -m CONFIGONLY -m MON_CTS \ -m MDC -m MDCreg0current -m MDCnomasks -m MDCDATASET -m MDCindiv -# -m NOMDC + #-m MDC #Switch off one DBO due to ringing 2014-07-5, no ringin ok again 20114-08-13 CW, ringing back on 2014-08-27 CW @@ -201,16 +208,16 @@ scp /home/hadaq/oper/daq2ora/daq2ora_current.txt hades33:/home/hadaq/trbsoft/had #Uncomment these lines to run with TRB # export DAQOPSERVER=hadesp31 # echo "Doing Reset..." -# ssh hades31 "killall trbnetd; killall trbcmd; trbcmdlocal f 3; trbcmdlocal reset" & +# ssh hadesp31 "killall trbnetd; killall trbcmd; trbcmdlocal f 3; trbcmdlocal reset" & # sleep 1; # command_client.pl -e etraxp023 -c "monitorlock.sh lock; killall trbnetd; trbcmd reset; trbnetd; monitorlock.sh unlock" # sleep 1; -# # ssh hades31 "trbcmd reset" -# ssh hades31 "trbnetd" +# # ssh hadesp31 "trbcmd reset" +# ssh hadesp31 "trbnetd" # echo "Done. Enable ports..." -# echo "hades31"; -# ssh hades31 "killall trbnetd; trbcmd reset; sleep 3; trbnetd" & +# echo "hadesp31"; +# ssh hadesp31 "killall trbnetd; trbcmd reset; sleep 3; trbnetd" & # echo "trb"; # command_client.pl -e etraxp023 -c "monitorlock.sh lock; killall trbnetd; t reset; sleep 3; trbnetd; monitorlock.sh unlock" # echo "sleep"; diff --git a/mdc/addresses_oep.db b/mdc/addresses_oep.db index 01c6c85..69f0b36 100644 --- a/mdc/addresses_oep.db +++ b/mdc/addresses_oep.db @@ -285,8 +285,11 @@ 0x222b 301 1 12 0 # exchange 2010-08-03, no light from FOT on 426 0x222c 238 1 12 0 0x222d 054 1 12 0 -0x222e 381 1 12 0 -0x222f 155 1 12 0 +# 0x222e 381 1 12 0 # original before 14.6.2017 +# 0x222f 155 1 12 0 +0x222f 381 1 12 0 # switched e <--> f - for testchamber readout with short MBO 14.6.2017 +0x222e 155 1 12 0 + #old setting! ################################################### #0x2220 177 1 12 0 @@ -416,7 +419,7 @@ #0x231e 466 1 12 0 #0x231f 464 1 12 0 #### M3S1 from Feb 8,2012 -#0x2310 013 1 12 0 ## for MBO Test setup 14.5.2014 CW +#0x2310 013 1 12 0 ## for MBO (short) Test setup 14.5.2014 CW 0x2310 071 1 12 0 ## original 0x2311 104 1 12 0 0x2312 101 1 12 0 @@ -430,10 +433,10 @@ 0x231a 046 1 12 0 0x231b 047 1 12 0 0x231c 080 1 12 0 -0x231d 076 1 12 0 +0x231d 076 1 12 0 ## original +#0x231d 113 1 12 0 ## for MBO (long) Test setup 0x231e 081 1 12 0 ## original -#0x231e 013 1 12 0 ## for MBO Test -setup 14.5.2014 CW +#0x231e 013 1 12 0 ## for MBO (long) Test setup 14.5.2014 CW 0x231f 065 1 12 0 ################################################### 0x2320 320 1 12 0 diff --git a/mdc/thresholds/register_thresholds_35.db b/mdc/thresholds/register_thresholds_35.db new file mode 100644 index 0000000..22b46b6 --- /dev/null +++ b/mdc/thresholds/register_thresholds_35.db @@ -0,0 +1,421 @@ +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x35 0x35 0x35 0x35 +0x2001 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2002 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2003 1 0x35 0x35 0x35 0x35 +0x2004 1 0x35 0x35 0x35 0x35 +0x2005 1 0x35 0x35 0x35 0x35 +0x2006 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2007 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2008 1 0x35 0x35 0x35 0x35 +0x2009 1 0x35 0x35 0x35 0x35 +0x200a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x200b 1 0x35 0x35 0x35 0x35 +0x200c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x200d 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2010 1 0x35 0x35 0x35 0x35 +0x2011 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2012 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2013 1 0x35 0x35 0x35 0x35 +0x2014 1 0x35 0x35 0x35 0x35 +0x2015 1 0x35 0x35 0x35 0x35 +0x2016 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2017 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2018 1 0x35 0x35 0x35 0x35 +0x2019 1 0x35 0x35 0x35 0x35 +0x201a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x201b 1 0x35 0x35 0x35 0x35 +0x201c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x201d 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2020 1 0x35 0x35 0x35 0x35 +0x2021 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2022 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2023 1 0x35 0x35 0x35 0x35 +0x2024 1 0x35 0x35 0x35 0x35 +0x2025 1 0x35 0x35 0x35 0x35 +0x2026 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2027 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2028 1 0x35 0x35 0x35 0x35 +0x2029 1 0x35 0x35 0x35 0x35 +0x202a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x202b 1 0x35 0x35 0x35 0x35 +0x202c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x202d 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2030 1 0x35 0x35 0x35 0x35 +0x2031 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2032 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2033 1 0x35 0x35 0x35 0x35 +0x2034 1 0x35 0x35 0x35 0x35 +0x2035 1 0x35 0x35 0x35 0x35 +0x2036 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2037 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2038 1 0x35 0x35 0x35 0x35 +0x2039 1 0x35 0x35 0x35 0x35 +0x203a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x203b 1 0x35 0x35 0x35 0x35 +0x203c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x203d 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2040 1 0x35 0x35 0x35 0x35 +0x2041 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2042 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2043 1 0x35 0x35 0x35 0x35 +0x2044 1 0x35 0x35 0x35 0x35 +0x2045 1 0x35 0x35 0x35 0x35 +0x2046 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2047 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2048 1 0x35 0x35 0x35 0x35 +0x2049 1 0x35 0x35 0x35 0x35 +0x204a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x204b 1 0x35 0x35 0x35 0x35 +0x204c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x204d 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2050 1 0x35 0x35 0x35 0x35 +0x2051 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2052 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2053 1 0x35 0x35 0x35 0x35 +0x2054 1 0x35 0x35 0x35 0x35 +0x2055 1 0x35 0x35 0x35 0x35 +0x2056 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2057 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2058 1 0x35 0x35 0x35 0x35 +0x2059 1 0x35 0x35 0x35 0x35 +0x205a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x205b 1 0x35 0x35 0x35 0x35 +0x205c 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x205d 1 0x35 0x35 0x35 0x35 + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x35 0x35 0x35 0x35 +0x2101 1 0x35 0x35 0x35 0x35 +0x2102 1 0x35 0x35 0x35 0x35 +0x2103 1 0x35 0x35 0x35 0x35 +0x2104 1 0x35 0x35 0x35 0x35 +0x2105 1 0x35 0x35 0x35 0x35 +0x2106 1 0x35 0x35 0x35 0x35 +0x2107 1 0x35 0x35 0x35 0x35 +0x2108 1 0x35 0x35 0x35 0x35 +0x2109 1 0x35 0x35 0x35 0x35 +0x210a 1 0x35 0x35 0x35 0x35 +0x210b 1 0x35 0x35 0x35 0x35 +0x210c 1 0x35 0x35 0x35 0x35 +0x210d 1 0x35 0x35 0x35 0x35 +0x210e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x210f 2 0x35 0x35 0x35 0x35 0x35 0x35 +######################################################################## +0x2110 1 0x35 0x35 0x35 0x35 +0x2111 1 0x35 0x35 0x35 0x35 +0x2112 1 0x35 0x35 0x35 0x35 +0x2113 1 0x35 0x35 0x35 0x35 +0x2114 1 0x35 0x35 0x35 0x35 +0x2115 1 0x35 0x35 0x35 0x35 +0x2116 1 0x35 0x35 0x35 0x35 +0x2117 1 0x35 0x35 0x35 0x35 +0x2118 1 0x35 0x35 0x35 0x35 +0x2119 1 0x35 0x35 0x35 0x35 +0x211a 1 0x35 0x35 0x35 0x35 +0x211b 1 0x35 0x35 0x35 0x35 +0x211c 1 0x35 0x35 0x35 0x35 +0x211d 1 0x35 0x35 0x35 0x35 +0x211e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x211f 2 0x35 0x35 0x35 0x35 0x35 0x35 +######################################################################## +0x2120 1 0x35 0x35 0x35 0x35 +0x2121 1 0x35 0x35 0x35 0x35 +0x2122 1 0x35 0x35 0x35 0x35 +0x2123 1 0x35 0x35 0x35 0x35 +0x2124 1 0x35 0x35 0x35 0x35 +0x2125 1 0x35 0x35 0x35 0x35 +0x2126 1 0x35 0x35 0x35 0x35 +0x2127 1 0x35 0x35 0x35 0x35 +0x2128 1 0x35 0x35 0x35 0x35 +0x2129 1 0x35 0x35 0x35 0x35 +0x212a 1 0x35 0x35 0x35 0x35 +0x212b 1 0x35 0x35 0x35 0x35 +0x212c 1 0x35 0x35 0x35 0x35 +0x212d 1 0x35 0x35 0x35 0x35 +0x212e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x212f 2 0x35 0x35 0x35 0x35 0x35 0x35 +######################################################################## +0x2130 1 0x35 0x35 0x35 0x35 +0x2131 1 0x35 0x35 0x35 0x35 +0x2132 1 0x35 0x35 0x35 0x35 +0x2133 1 0x35 0x35 0x35 0x35 +0x2134 1 0x35 0x35 0x35 0x35 +0x2135 1 0x35 0x35 0x35 0x35 +0x2136 1 0x35 0x35 0x35 0x35 +0x2137 1 0x35 0x35 0x35 0x35 +0x2138 1 0x35 0x35 0x35 0x35 +0x2139 1 0x35 0x35 0x35 0x35 +0x213a 1 0x35 0x35 0x35 0x35 +0x213b 1 0x35 0x35 0x35 0x35 +0x213c 1 0x35 0x35 0x35 0x35 +0x213d 1 0x35 0x35 0x35 0x35 +0x213e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x213f 2 0x35 0x35 0x35 0x35 0x35 0x35 +######################################################################## +0x2140 1 0x35 0x35 0x35 0x35 +0x2141 1 0x35 0x35 0x35 0x35 +0x2142 1 0x35 0x35 0x35 0x35 +0x2143 1 0x35 0x35 0x35 0x35 +0x2144 1 0x35 0x35 0x35 0x35 +0x2145 1 0x35 0x35 0x35 0x35 +0x2146 1 0x35 0x35 0x35 0x35 +0x2147 1 0x35 0x35 0x35 0x35 +0x2148 1 0x35 0x35 0x35 0x35 +0x2149 1 0x35 0x35 0x35 0x35 +0x214a 1 0x35 0x35 0x35 0x35 +0x214b 1 0x35 0x35 0x35 0x35 +0x214c 1 0x35 0x35 0x35 0x35 +0x214d 1 0x35 0x35 0x35 0x35 +0x214e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x214f 2 0x35 0x35 0x35 0x35 0x35 0x35 +######################################################################## +0x2150 1 0x35 0x35 0x35 0x35 +0x2151 1 0x35 0x35 0x35 0x35 +0x2152 1 0x35 0x35 0x35 0x35 +0x2153 1 0x35 0x35 0x35 0x35 +0x2154 1 0x35 0x35 0x35 0x35 +0x2155 1 0x35 0x35 0x35 0x35 +0x2156 1 0x35 0x35 0x35 0x35 +0x2157 1 0x35 0x35 0x35 0x35 +0x2158 1 0x35 0x35 0x35 0x35 +0x2159 1 0x35 0x35 0x35 0x35 +0x215a 1 0x35 0x35 0x35 0x35 +0x215b 1 0x35 0x35 0x35 0x35 +0x215c 1 0x35 0x35 0x35 0x35 +0x215d 1 0x35 0x35 0x35 0x35 +0x215e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x215f 2 0x35 0x35 0x35 0x35 0x35 0x35 + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2201 1 0x35 0x35 0x35 0x35 +0x2202 1 0x35 0x35 0x35 0x35 +0x2203 1 0x35 0x35 0x35 0x35 +0x2204 1 0x35 0x35 0x35 0x35 +0x2205 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2206 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2207 1 0x35 0x35 0x35 0x35 +0x2208 1 0x35 0x35 0x35 0x35 +0x2209 1 0x35 0x35 0x35 0x35 +0x220a 1 0x35 0x35 0x35 0x35 +0x220b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x220c 1 0x35 0x35 0x35 0x35 +0x220d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x220e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x220f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2210 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2211 1 0x35 0x35 0x35 0x35 +0x2212 1 0x35 0x35 0x35 0x35 +0x2213 1 0x35 0x35 0x35 0x35 +0x2214 1 0x35 0x35 0x35 0x35 +0x2215 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2216 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2217 1 0x35 0x35 0x35 0x35 +0x2218 1 0x35 0x35 0x35 0x35 +0x2219 1 0x35 0x35 0x35 0x35 +0x221a 1 0x35 0x35 0x35 0x35 +0x221b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x221c 1 0x35 0x35 0x35 0x35 +0x221d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x221e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x221f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2220 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2221 1 0x35 0x35 0x35 0x35 +0x2222 1 0x35 0x35 0x35 0x35 +0x2223 1 0x35 0x35 0x35 0x35 +0x2224 1 0x35 0x35 0x35 0x35 +0x2225 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2226 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2227 1 0x35 0x35 0x35 0x35 +0x2228 1 0x35 0x35 0x35 0x35 +0x2229 1 0x35 0x35 0x35 0x35 +0x222a 1 0x35 0x35 0x35 0x35 +0x222b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x222c 1 0x35 0x35 0x35 0x35 +0x222d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x222e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x222f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2230 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2231 1 0x35 0x35 0x35 0x35 +0x2232 1 0x35 0x35 0x35 0x35 +0x2233 1 0x35 0x35 0x35 0x35 +0x2234 1 0x35 0x35 0x35 0x35 +0x2235 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2236 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2237 1 0x35 0x35 0x35 0x35 +0x2238 1 0x35 0x35 0x35 0x35 +0x2239 1 0x35 0x35 0x35 0x35 +0x223a 1 0x35 0x35 0x35 0x35 +0x223b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x223c 1 0x35 0x35 0x35 0x35 +0x223d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x223e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x223f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2240 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2241 1 0x35 0x35 0x35 0x35 +0x2242 1 0x35 0x35 0x35 0x35 +0x2243 1 0x35 0x35 0x35 0x35 +0x2244 1 0x35 0x35 0x35 0x35 +0x2245 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2246 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2247 1 0x35 0x35 0x35 0x35 +0x2248 1 0x35 0x35 0x35 0x35 +0x2249 1 0x35 0x35 0x35 0x35 +0x224a 1 0x35 0x35 0x35 0x35 +0x224b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x224c 1 0x35 0x35 0x35 0x35 +0x224d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x224e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x224f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2250 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2251 1 0x35 0x35 0x35 0x35 +0x2252 1 0x35 0x35 0x35 0x35 +0x2253 1 0x35 0x35 0x35 0x35 +0x2254 1 0x35 0x35 0x35 0x35 +0x2255 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2256 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2257 1 0x35 0x35 0x35 0x35 +0x2258 1 0x35 0x35 0x35 0x35 +0x2259 1 0x35 0x35 0x35 0x35 +0x225a 1 0x35 0x35 0x35 0x35 +0x225b 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x225c 1 0x35 0x35 0x35 0x35 +0x225d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x225e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x225f 1 0x35 0x35 0x35 0x35 + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x35 0x35 0x35 0x35 +0x2301 1 0x35 0x35 0x35 0x35 +0x2302 1 0x35 0x35 0x35 0x35 +0x2303 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2304 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2305 1 0x35 0x35 0x35 0x35 +0x2306 1 0x35 0x35 0x35 0x35 +0x2307 1 0x35 0x35 0x35 0x35 +0x2308 1 0x35 0x35 0x35 0x35 +0x2309 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x230a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x230b 1 0x35 0x35 0x35 0x35 +0x230c 1 0x35 0x35 0x35 0x35 +0x230d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x230e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x230f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2310 1 0x35 0x35 0x35 0x35 +0x2311 1 0x35 0x35 0x35 0x35 +0x2312 1 0x35 0x35 0x35 0x35 +0x2313 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2314 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2315 1 0x35 0x35 0x35 0x35 +0x2316 1 0x35 0x35 0x35 0x35 +0x2317 1 0x35 0x35 0x35 0x35 +0x2318 1 0x35 0x35 0x35 0x35 +0x2319 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x231a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x231b 1 0x35 0x35 0x35 0x35 +0x231c 1 0x35 0x35 0x35 0x35 +0x231d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x231e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x231f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2320 1 0x35 0x35 0x35 0x35 +0x2321 1 0x35 0x35 0x35 0x35 +0x2322 1 0x35 0x35 0x35 0x35 +0x2323 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2324 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2325 1 0x35 0x35 0x35 0x35 +0x2326 1 0x35 0x35 0x35 0x35 +0x2327 1 0x35 0x35 0x35 0x35 +0x2328 1 0x35 0x35 0x35 0x35 +0x2329 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x232a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x232b 1 0x35 0x35 0x35 0x35 +0x232c 1 0x35 0x35 0x35 0x35 +0x232d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x232e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x232f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2330 1 0x35 0x35 0x35 0x35 +0x2331 1 0x35 0x35 0x35 0x35 +0x2332 1 0x35 0x35 0x35 0x35 +0x2333 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2334 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2335 1 0x35 0x35 0x35 0x35 +0x2336 1 0x35 0x35 0x35 0x35 +0x2337 1 0x35 0x35 0x35 0x35 +0x2338 1 0x35 0x35 0x35 0x35 +0x2339 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x233a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x233b 1 0x35 0x35 0x35 0x35 +0x233c 1 0x35 0x35 0x35 0x35 +0x233d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x233e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x233f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2340 1 0x35 0x35 0x35 0x35 +0x2341 1 0x35 0x35 0x35 0x35 +0x2342 1 0x35 0x35 0x35 0x35 +0x2343 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2344 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2345 1 0x35 0x35 0x35 0x35 +0x2346 1 0x35 0x35 0x35 0x35 +0x2347 1 0x35 0x35 0x35 0x35 +0x2348 1 0x35 0x35 0x35 0x35 +0x2349 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x234a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x234b 1 0x35 0x35 0x35 0x35 +0x234c 1 0x35 0x35 0x35 0x35 +0x234d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x234e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x234f 1 0x35 0x35 0x35 0x35 +######################################################################## +0x2350 1 0x35 0x35 0x35 0x35 +0x2351 1 0x35 0x35 0x35 0x35 +0x2352 1 0x35 0x35 0x35 0x35 +0x2353 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2354 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x2355 1 0x35 0x35 0x35 0x35 +0x2356 1 0x35 0x35 0x35 0x35 +0x2357 1 0x35 0x35 0x35 0x35 +0x2358 1 0x35 0x35 0x35 0x35 +0x2359 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x235a 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x235b 1 0x35 0x35 0x35 0x35 +0x235c 1 0x35 0x35 0x35 0x35 +0x235d 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x235e 2 0x35 0x35 0x35 0x35 0x35 0x35 +0x235f 1 0x35 0x35 0x35 0x35 diff --git a/mdc/thresholds/register_thresholds_92.db b/mdc/thresholds/register_thresholds_92.db new file mode 100644 index 0000000..c4468d0 --- /dev/null +++ b/mdc/thresholds/register_thresholds_92.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x92 0x92 0x92 0x92 +0x2001 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2002 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2003 1 0x92 0x92 0x92 0x92 +0x2004 1 0x92 0x92 0x92 0x92 +0x2005 1 0x92 0x92 0x92 0x92 +0x2006 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2007 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2008 1 0x92 0x92 0x92 0x92 +0x2009 1 0x92 0x92 0x92 0x92 +0x200a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x200b 1 0x92 0x92 0x92 0x92 +0x200c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x200d 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2010 1 0x92 0x92 0x92 0x92 +0x2011 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2012 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2013 1 0x92 0x92 0x92 0x92 +0x2014 1 0x92 0x92 0x92 0x92 +0x2015 1 0x92 0x92 0x92 0x92 +0x2016 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2017 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2018 1 0x92 0x92 0x92 0x92 +0x2019 1 0x92 0x92 0x92 0x92 +0x201a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x201b 1 0x92 0x92 0x92 0x92 +0x201c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x201d 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2020 1 0x92 0x92 0x92 0x92 +0x2021 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2022 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2023 1 0x92 0x92 0x92 0x92 +0x2024 1 0x92 0x92 0x92 0x92 +0x2025 1 0x92 0x92 0x92 0x92 +0x2026 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2027 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2028 1 0x92 0x92 0x92 0x92 +0x2029 1 0x92 0x92 0x92 0x92 +0x202a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x202b 1 0x92 0x92 0x92 0x92 +0x202c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x202d 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2030 1 0x92 0x92 0x92 0x92 +0x2031 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2032 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2033 1 0x92 0x92 0x92 0x92 +0x2034 1 0x92 0x92 0x92 0x92 +0x2035 1 0x92 0x92 0x92 0x92 +0x2036 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2037 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2038 1 0x92 0x92 0x92 0x92 +0x2039 1 0x92 0x92 0x92 0x92 +0x203a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x203b 1 0x92 0x92 0x92 0x92 +0x203c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x203d 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2040 1 0x92 0x92 0x92 0x92 +0x2041 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2042 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2043 1 0x92 0x92 0x92 0x92 +0x2044 1 0x92 0x92 0x92 0x92 +0x2045 1 0x92 0x92 0x92 0x92 +0x2046 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2047 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2048 1 0x92 0x92 0x92 0x92 +0x2049 1 0x92 0x92 0x92 0x92 +0x204a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x204b 1 0x92 0x92 0x92 0x92 +0x204c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x204d 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2050 1 0x92 0x92 0x92 0x92 +0x2051 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2052 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2053 1 0x92 0x92 0x92 0x92 +0x2054 1 0x92 0x92 0x92 0x92 +0x2055 1 0x92 0x92 0x92 0x92 +0x2056 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2057 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2058 1 0x92 0x92 0x92 0x92 +0x2059 1 0x92 0x92 0x92 0x92 +0x205a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x205b 1 0x92 0x92 0x92 0x92 +0x205c 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x205d 1 0x92 0x92 0x92 0x92 + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x92 0x92 0x92 0x92 +0x2101 1 0x92 0x92 0x92 0x92 +0x2102 1 0x92 0x92 0x92 0x92 +0x2103 1 0x92 0x92 0x92 0x92 +0x2104 1 0x92 0x92 0x92 0x92 +0x2105 1 0x92 0x92 0x92 0x92 +0x2106 1 0x92 0x92 0x92 0x92 +0x2107 1 0x92 0x92 0x92 0x92 +0x2108 1 0x92 0x92 0x92 0x92 +0x2109 1 0x92 0x92 0x92 0x92 +0x210a 1 0x92 0x92 0x92 0x92 +0x210b 1 0x92 0x92 0x92 0x92 +0x210c 1 0x92 0x92 0x92 0x92 +0x210d 1 0x92 0x92 0x92 0x92 +0x210e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x210f 2 0x92 0x92 0x92 0x92 0x92 0x92 +######################################################################## +0x2110 1 0x92 0x92 0x92 0x92 +0x2111 1 0x92 0x92 0x92 0x92 +0x2112 1 0x92 0x92 0x92 0x92 +0x2113 1 0x92 0x92 0x92 0x92 +0x2114 1 0x92 0x92 0x92 0x92 +0x2115 1 0x92 0x92 0x92 0x92 +0x2116 1 0x92 0x92 0x92 0x92 +0x2117 1 0x92 0x92 0x92 0x92 +0x2118 1 0x92 0x92 0x92 0x92 +0x2119 1 0x92 0x92 0x92 0x92 +0x211a 1 0x92 0x92 0x92 0x92 +0x211b 1 0x92 0x92 0x92 0x92 +0x211c 1 0x92 0x92 0x92 0x92 +0x211d 1 0x92 0x92 0x92 0x92 +0x211e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x211f 2 0x92 0x92 0x92 0x92 0x92 0x92 +######################################################################## +0x2120 1 0x92 0x92 0x92 0x92 +0x2121 1 0x92 0x92 0x92 0x92 +0x2122 1 0x92 0x92 0x92 0x92 +0x2123 1 0x92 0x92 0x92 0x92 +0x2124 1 0x92 0x92 0x92 0x92 +0x2125 1 0x92 0x92 0x92 0x92 +0x2126 1 0x92 0x92 0x92 0x92 +0x2127 1 0x92 0x92 0x92 0x92 +0x2128 1 0x92 0x92 0x92 0x92 +0x2129 1 0x92 0x92 0x92 0x92 +0x212a 1 0x92 0x92 0x92 0x92 +0x212b 1 0x92 0x92 0x92 0x92 +0x212c 1 0x92 0x92 0x92 0x92 +0x212d 1 0x92 0x92 0x92 0x92 +0x212e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x212f 2 0x92 0x92 0x92 0x92 0x92 0x92 +######################################################################## +0x2130 1 0x92 0x92 0x92 0x92 +0x2131 1 0x92 0x92 0x92 0x92 +0x2132 1 0x92 0x92 0x92 0x92 +0x2133 1 0x92 0x92 0x92 0x92 +0x2134 1 0x92 0x92 0x92 0x92 +0x2135 1 0x92 0x92 0x92 0x92 +0x2136 1 0x92 0x92 0x92 0x92 +0x2137 1 0x92 0x92 0x92 0x92 +0x2138 1 0x92 0x92 0x92 0x92 +0x2139 1 0x92 0x92 0x92 0x92 +0x213a 1 0x92 0x92 0x92 0x92 +0x213b 1 0x92 0x92 0x92 0x92 +0x213c 1 0x92 0x92 0x92 0x92 +0x213d 1 0x92 0x92 0x92 0x92 +0x213e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x213f 2 0x92 0x92 0x92 0x92 0x92 0x92 +######################################################################## +0x2140 1 0x92 0x92 0x92 0x92 +0x2141 1 0x92 0x92 0x92 0x92 +0x2142 1 0x92 0x92 0x92 0x92 +0x2143 1 0x92 0x92 0x92 0x92 +0x2144 1 0x92 0x92 0x92 0x92 +0x2145 1 0x92 0x92 0x92 0x92 +0x2146 1 0x92 0x92 0x92 0x92 +0x2147 1 0x92 0x92 0x92 0x92 +0x2148 1 0x92 0x92 0x92 0x92 +0x2149 1 0x92 0x92 0x92 0x92 +0x214a 1 0x92 0x92 0x92 0x92 +0x214b 1 0x92 0x92 0x92 0x92 +0x214c 1 0x92 0x92 0x92 0x92 +0x214d 1 0x92 0x92 0x92 0x92 +0x214e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x214f 2 0x92 0x92 0x92 0x92 0x92 0x92 +######################################################################## +0x2150 1 0x92 0x92 0x92 0x92 +0x2151 1 0x92 0x92 0x92 0x92 +0x2152 1 0x92 0x92 0x92 0x92 +0x2153 1 0x92 0x92 0x92 0x92 +0x2154 1 0x92 0x92 0x92 0x92 +0x2155 1 0x92 0x92 0x92 0x92 +0x2156 1 0x92 0x92 0x92 0x92 +0x2157 1 0x92 0x92 0x92 0x92 +0x2158 1 0x92 0x92 0x92 0x92 +0x2159 1 0x92 0x92 0x92 0x92 +0x215a 1 0x92 0x92 0x92 0x92 +0x215b 1 0x92 0x92 0x92 0x92 +0x215c 1 0x92 0x92 0x92 0x92 +0x215d 1 0x92 0x92 0x92 0x92 +0x215e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x215f 2 0x92 0x92 0x92 0x92 0x92 0x92 + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2201 1 0x92 0x92 0x92 0x92 +0x2202 1 0x92 0x92 0x92 0x92 +0x2203 1 0x92 0x92 0x92 0x92 +0x2204 1 0x92 0x92 0x92 0x92 +0x2205 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2206 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2207 1 0x92 0x92 0x92 0x92 +0x2208 1 0x92 0x92 0x92 0x92 +0x2209 1 0x92 0x92 0x92 0x92 +0x220a 1 0x92 0x92 0x92 0x92 +0x220b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x220c 1 0x92 0x92 0x92 0x92 +0x220d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x220e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x220f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2210 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2211 1 0x92 0x92 0x92 0x92 +0x2212 1 0x92 0x92 0x92 0x92 +0x2213 1 0x92 0x92 0x92 0x92 +0x2214 1 0x92 0x92 0x92 0x92 +0x2215 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2216 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2217 1 0x92 0x92 0x92 0x92 +0x2218 1 0x92 0x92 0x92 0x92 +0x2219 1 0x92 0x92 0x92 0x92 +0x221a 1 0x92 0x92 0x92 0x92 +0x221b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x221c 1 0x92 0x92 0x92 0x92 +0x221d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x221e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x221f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2220 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2221 1 0x92 0x92 0x92 0x92 +0x2222 1 0x92 0x92 0x92 0x92 +0x2223 1 0x92 0x92 0x92 0x92 +0x2224 1 0x92 0x92 0x92 0x92 +0x2225 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2226 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2227 1 0x92 0x92 0x92 0x92 +0x2228 1 0x92 0x92 0x92 0x92 +0x2229 1 0x92 0x92 0x92 0x92 +0x222a 1 0x92 0x92 0x92 0x92 +0x222b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x222c 1 0x92 0x92 0x92 0x92 +0x222d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x222e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x222f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2230 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2231 1 0x92 0x92 0x92 0x92 +0x2232 1 0x92 0x92 0x92 0x92 +0x2233 1 0x92 0x92 0x92 0x92 +0x2234 1 0x92 0x92 0x92 0x92 +0x2235 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2236 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2237 1 0x92 0x92 0x92 0x92 +0x2238 1 0x92 0x92 0x92 0x92 +0x2239 1 0x92 0x92 0x92 0x92 +0x223a 1 0x92 0x92 0x92 0x92 +0x223b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x223c 1 0x92 0x92 0x92 0x92 +0x223d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x223e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x223f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2240 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2241 1 0x92 0x92 0x92 0x92 +0x2242 1 0x92 0x92 0x92 0x92 +0x2243 1 0x92 0x92 0x92 0x92 +0x2244 1 0x92 0x92 0x92 0x92 +0x2245 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2246 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2247 1 0x92 0x92 0x92 0x92 +0x2248 1 0x92 0x92 0x92 0x92 +0x2249 1 0x92 0x92 0x92 0x92 +0x224a 1 0x92 0x92 0x92 0x92 +0x224b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x224c 1 0x92 0x92 0x92 0x92 +0x224d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x224e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x224f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2250 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2251 1 0x92 0x92 0x92 0x92 +0x2252 1 0x92 0x92 0x92 0x92 +0x2253 1 0x92 0x92 0x92 0x92 +0x2254 1 0x92 0x92 0x92 0x92 +0x2255 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2256 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2257 1 0x92 0x92 0x92 0x92 +0x2258 1 0x92 0x92 0x92 0x92 +0x2259 1 0x92 0x92 0x92 0x92 +0x225a 1 0x92 0x92 0x92 0x92 +0x225b 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x225c 1 0x92 0x92 0x92 0x92 +0x225d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x225e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x225f 1 0x92 0x92 0x92 0x92 + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x92 0x92 0x92 0x92 +0x2301 1 0x92 0x92 0x92 0x92 +0x2302 1 0x92 0x92 0x92 0x92 +0x2303 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2304 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2305 1 0x92 0x92 0x92 0x92 +0x2306 1 0x92 0x92 0x92 0x92 +0x2307 1 0x92 0x92 0x92 0x92 +0x2308 1 0x92 0x92 0x92 0x92 +0x2309 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x230a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x230b 1 0x92 0x92 0x92 0x92 +0x230c 1 0x92 0x92 0x92 0x92 +0x230d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x230e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x230f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2310 1 0x92 0x92 0x92 0x92 +0x2311 1 0x92 0x92 0x92 0x92 +0x2312 1 0x92 0x92 0x92 0x92 +0x2313 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2314 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2315 1 0x92 0x92 0x92 0x92 +0x2316 1 0x92 0x92 0x92 0x92 +0x2317 1 0x92 0x92 0x92 0x92 +0x2318 1 0x92 0x92 0x92 0x92 +0x2319 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x231a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x231b 1 0x92 0x92 0x92 0x92 +0x231c 1 0x92 0x92 0x92 0x92 +0x231d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x231e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x231f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2320 1 0x92 0x92 0x92 0x92 +0x2321 1 0x92 0x92 0x92 0x92 +0x2322 1 0x92 0x92 0x92 0x92 +0x2323 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2324 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2325 1 0x92 0x92 0x92 0x92 +0x2326 1 0x92 0x92 0x92 0x92 +0x2327 1 0x92 0x92 0x92 0x92 +0x2328 1 0x92 0x92 0x92 0x92 +0x2329 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x232a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x232b 1 0x92 0x92 0x92 0x92 +0x232c 1 0x92 0x92 0x92 0x92 +0x232d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x232e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x232f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2330 1 0x92 0x92 0x92 0x92 +0x2331 1 0x92 0x92 0x92 0x92 +0x2332 1 0x92 0x92 0x92 0x92 +0x2333 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2334 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2335 1 0x92 0x92 0x92 0x92 +0x2336 1 0x92 0x92 0x92 0x92 +0x2337 1 0x92 0x92 0x92 0x92 +0x2338 1 0x92 0x92 0x92 0x92 +0x2339 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x233a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x233b 1 0x92 0x92 0x92 0x92 +0x233c 1 0x92 0x92 0x92 0x92 +0x233d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x233e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x233f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2340 1 0x92 0x92 0x92 0x92 +0x2341 1 0x92 0x92 0x92 0x92 +0x2342 1 0x92 0x92 0x92 0x92 +0x2343 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2344 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2345 1 0x92 0x92 0x92 0x92 +0x2346 1 0x92 0x92 0x92 0x92 +0x2347 1 0x92 0x92 0x92 0x92 +0x2348 1 0x92 0x92 0x92 0x92 +0x2349 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x234a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x234b 1 0x92 0x92 0x92 0x92 +0x234c 1 0x92 0x92 0x92 0x92 +0x234d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x234e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x234f 1 0x92 0x92 0x92 0x92 +######################################################################## +0x2350 1 0x92 0x92 0x92 0x92 +0x2351 1 0x92 0x92 0x92 0x92 +0x2352 1 0x92 0x92 0x92 0x92 +0x2353 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2354 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x2355 1 0x92 0x92 0x92 0x92 +0x2356 1 0x92 0x92 0x92 0x92 +0x2357 1 0x92 0x92 0x92 0x92 +0x2358 1 0x92 0x92 0x92 0x92 +0x2359 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x235a 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x235b 1 0x92 0x92 0x92 0x92 +0x235c 1 0x92 0x92 0x92 0x92 +0x235d 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x235e 2 0x92 0x92 0x92 0x92 0x92 0x92 +0x235f 1 0x92 0x92 0x92 0x92 diff --git a/mdc/thresholds/register_thresholds_94.db b/mdc/thresholds/register_thresholds_94.db new file mode 100644 index 0000000..88de6eb --- /dev/null +++ b/mdc/thresholds/register_thresholds_94.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x94 0x94 0x94 0x94 +0x2001 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2002 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2003 1 0x94 0x94 0x94 0x94 +0x2004 1 0x94 0x94 0x94 0x94 +0x2005 1 0x94 0x94 0x94 0x94 +0x2006 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2007 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2008 1 0x94 0x94 0x94 0x94 +0x2009 1 0x94 0x94 0x94 0x94 +0x200a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x200b 1 0x94 0x94 0x94 0x94 +0x200c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x200d 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2010 1 0x94 0x94 0x94 0x94 +0x2011 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2012 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2013 1 0x94 0x94 0x94 0x94 +0x2014 1 0x94 0x94 0x94 0x94 +0x2015 1 0x94 0x94 0x94 0x94 +0x2016 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2017 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2018 1 0x94 0x94 0x94 0x94 +0x2019 1 0x94 0x94 0x94 0x94 +0x201a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x201b 1 0x94 0x94 0x94 0x94 +0x201c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x201d 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2020 1 0x94 0x94 0x94 0x94 +0x2021 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2022 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2023 1 0x94 0x94 0x94 0x94 +0x2024 1 0x94 0x94 0x94 0x94 +0x2025 1 0x94 0x94 0x94 0x94 +0x2026 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2027 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2028 1 0x94 0x94 0x94 0x94 +0x2029 1 0x94 0x94 0x94 0x94 +0x202a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x202b 1 0x94 0x94 0x94 0x94 +0x202c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x202d 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2030 1 0x94 0x94 0x94 0x94 +0x2031 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2032 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2033 1 0x94 0x94 0x94 0x94 +0x2034 1 0x94 0x94 0x94 0x94 +0x2035 1 0x94 0x94 0x94 0x94 +0x2036 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2037 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2038 1 0x94 0x94 0x94 0x94 +0x2039 1 0x94 0x94 0x94 0x94 +0x203a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x203b 1 0x94 0x94 0x94 0x94 +0x203c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x203d 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2040 1 0x94 0x94 0x94 0x94 +0x2041 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2042 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2043 1 0x94 0x94 0x94 0x94 +0x2044 1 0x94 0x94 0x94 0x94 +0x2045 1 0x94 0x94 0x94 0x94 +0x2046 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2047 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2048 1 0x94 0x94 0x94 0x94 +0x2049 1 0x94 0x94 0x94 0x94 +0x204a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x204b 1 0x94 0x94 0x94 0x94 +0x204c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x204d 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2050 1 0x94 0x94 0x94 0x94 +0x2051 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2052 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2053 1 0x94 0x94 0x94 0x94 +0x2054 1 0x94 0x94 0x94 0x94 +0x2055 1 0x94 0x94 0x94 0x94 +0x2056 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2057 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2058 1 0x94 0x94 0x94 0x94 +0x2059 1 0x94 0x94 0x94 0x94 +0x205a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x205b 1 0x94 0x94 0x94 0x94 +0x205c 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x205d 1 0x94 0x94 0x94 0x94 + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x94 0x94 0x94 0x94 +0x2101 1 0x94 0x94 0x94 0x94 +0x2102 1 0x94 0x94 0x94 0x94 +0x2103 1 0x94 0x94 0x94 0x94 +0x2104 1 0x94 0x94 0x94 0x94 +0x2105 1 0x94 0x94 0x94 0x94 +0x2106 1 0x94 0x94 0x94 0x94 +0x2107 1 0x94 0x94 0x94 0x94 +0x2108 1 0x94 0x94 0x94 0x94 +0x2109 1 0x94 0x94 0x94 0x94 +0x210a 1 0x94 0x94 0x94 0x94 +0x210b 1 0x94 0x94 0x94 0x94 +0x210c 1 0x94 0x94 0x94 0x94 +0x210d 1 0x94 0x94 0x94 0x94 +0x210e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x210f 2 0x94 0x94 0x94 0x94 0x94 0x94 +######################################################################## +0x2110 1 0x94 0x94 0x94 0x94 +0x2111 1 0x94 0x94 0x94 0x94 +0x2112 1 0x94 0x94 0x94 0x94 +0x2113 1 0x94 0x94 0x94 0x94 +0x2114 1 0x94 0x94 0x94 0x94 +0x2115 1 0x94 0x94 0x94 0x94 +0x2116 1 0x94 0x94 0x94 0x94 +0x2117 1 0x94 0x94 0x94 0x94 +0x2118 1 0x94 0x94 0x94 0x94 +0x2119 1 0x94 0x94 0x94 0x94 +0x211a 1 0x94 0x94 0x94 0x94 +0x211b 1 0x94 0x94 0x94 0x94 +0x211c 1 0x94 0x94 0x94 0x94 +0x211d 1 0x94 0x94 0x94 0x94 +0x211e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x211f 2 0x94 0x94 0x94 0x94 0x94 0x94 +######################################################################## +0x2120 1 0x94 0x94 0x94 0x94 +0x2121 1 0x94 0x94 0x94 0x94 +0x2122 1 0x94 0x94 0x94 0x94 +0x2123 1 0x94 0x94 0x94 0x94 +0x2124 1 0x94 0x94 0x94 0x94 +0x2125 1 0x94 0x94 0x94 0x94 +0x2126 1 0x94 0x94 0x94 0x94 +0x2127 1 0x94 0x94 0x94 0x94 +0x2128 1 0x94 0x94 0x94 0x94 +0x2129 1 0x94 0x94 0x94 0x94 +0x212a 1 0x94 0x94 0x94 0x94 +0x212b 1 0x94 0x94 0x94 0x94 +0x212c 1 0x94 0x94 0x94 0x94 +0x212d 1 0x94 0x94 0x94 0x94 +0x212e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x212f 2 0x94 0x94 0x94 0x94 0x94 0x94 +######################################################################## +0x2130 1 0x94 0x94 0x94 0x94 +0x2131 1 0x94 0x94 0x94 0x94 +0x2132 1 0x94 0x94 0x94 0x94 +0x2133 1 0x94 0x94 0x94 0x94 +0x2134 1 0x94 0x94 0x94 0x94 +0x2135 1 0x94 0x94 0x94 0x94 +0x2136 1 0x94 0x94 0x94 0x94 +0x2137 1 0x94 0x94 0x94 0x94 +0x2138 1 0x94 0x94 0x94 0x94 +0x2139 1 0x94 0x94 0x94 0x94 +0x213a 1 0x94 0x94 0x94 0x94 +0x213b 1 0x94 0x94 0x94 0x94 +0x213c 1 0x94 0x94 0x94 0x94 +0x213d 1 0x94 0x94 0x94 0x94 +0x213e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x213f 2 0x94 0x94 0x94 0x94 0x94 0x94 +######################################################################## +0x2140 1 0x94 0x94 0x94 0x94 +0x2141 1 0x94 0x94 0x94 0x94 +0x2142 1 0x94 0x94 0x94 0x94 +0x2143 1 0x94 0x94 0x94 0x94 +0x2144 1 0x94 0x94 0x94 0x94 +0x2145 1 0x94 0x94 0x94 0x94 +0x2146 1 0x94 0x94 0x94 0x94 +0x2147 1 0x94 0x94 0x94 0x94 +0x2148 1 0x94 0x94 0x94 0x94 +0x2149 1 0x94 0x94 0x94 0x94 +0x214a 1 0x94 0x94 0x94 0x94 +0x214b 1 0x94 0x94 0x94 0x94 +0x214c 1 0x94 0x94 0x94 0x94 +0x214d 1 0x94 0x94 0x94 0x94 +0x214e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x214f 2 0x94 0x94 0x94 0x94 0x94 0x94 +######################################################################## +0x2150 1 0x94 0x94 0x94 0x94 +0x2151 1 0x94 0x94 0x94 0x94 +0x2152 1 0x94 0x94 0x94 0x94 +0x2153 1 0x94 0x94 0x94 0x94 +0x2154 1 0x94 0x94 0x94 0x94 +0x2155 1 0x94 0x94 0x94 0x94 +0x2156 1 0x94 0x94 0x94 0x94 +0x2157 1 0x94 0x94 0x94 0x94 +0x2158 1 0x94 0x94 0x94 0x94 +0x2159 1 0x94 0x94 0x94 0x94 +0x215a 1 0x94 0x94 0x94 0x94 +0x215b 1 0x94 0x94 0x94 0x94 +0x215c 1 0x94 0x94 0x94 0x94 +0x215d 1 0x94 0x94 0x94 0x94 +0x215e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x215f 2 0x94 0x94 0x94 0x94 0x94 0x94 + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2201 1 0x94 0x94 0x94 0x94 +0x2202 1 0x94 0x94 0x94 0x94 +0x2203 1 0x94 0x94 0x94 0x94 +0x2204 1 0x94 0x94 0x94 0x94 +0x2205 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2206 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2207 1 0x94 0x94 0x94 0x94 +0x2208 1 0x94 0x94 0x94 0x94 +0x2209 1 0x94 0x94 0x94 0x94 +0x220a 1 0x94 0x94 0x94 0x94 +0x220b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x220c 1 0x94 0x94 0x94 0x94 +0x220d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x220e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x220f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2210 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2211 1 0x94 0x94 0x94 0x94 +0x2212 1 0x94 0x94 0x94 0x94 +0x2213 1 0x94 0x94 0x94 0x94 +0x2214 1 0x94 0x94 0x94 0x94 +0x2215 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2216 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2217 1 0x94 0x94 0x94 0x94 +0x2218 1 0x94 0x94 0x94 0x94 +0x2219 1 0x94 0x94 0x94 0x94 +0x221a 1 0x94 0x94 0x94 0x94 +0x221b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x221c 1 0x94 0x94 0x94 0x94 +0x221d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x221e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x221f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2220 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2221 1 0x94 0x94 0x94 0x94 +0x2222 1 0x94 0x94 0x94 0x94 +0x2223 1 0x94 0x94 0x94 0x94 +0x2224 1 0x94 0x94 0x94 0x94 +0x2225 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2226 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2227 1 0x94 0x94 0x94 0x94 +0x2228 1 0x94 0x94 0x94 0x94 +0x2229 1 0x94 0x94 0x94 0x94 +0x222a 1 0x94 0x94 0x94 0x94 +0x222b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x222c 1 0x94 0x94 0x94 0x94 +0x222d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x222e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x222f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2230 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2231 1 0x94 0x94 0x94 0x94 +0x2232 1 0x94 0x94 0x94 0x94 +0x2233 1 0x94 0x94 0x94 0x94 +0x2234 1 0x94 0x94 0x94 0x94 +0x2235 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2236 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2237 1 0x94 0x94 0x94 0x94 +0x2238 1 0x94 0x94 0x94 0x94 +0x2239 1 0x94 0x94 0x94 0x94 +0x223a 1 0x94 0x94 0x94 0x94 +0x223b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x223c 1 0x94 0x94 0x94 0x94 +0x223d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x223e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x223f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2240 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2241 1 0x94 0x94 0x94 0x94 +0x2242 1 0x94 0x94 0x94 0x94 +0x2243 1 0x94 0x94 0x94 0x94 +0x2244 1 0x94 0x94 0x94 0x94 +0x2245 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2246 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2247 1 0x94 0x94 0x94 0x94 +0x2248 1 0x94 0x94 0x94 0x94 +0x2249 1 0x94 0x94 0x94 0x94 +0x224a 1 0x94 0x94 0x94 0x94 +0x224b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x224c 1 0x94 0x94 0x94 0x94 +0x224d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x224e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x224f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2250 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2251 1 0x94 0x94 0x94 0x94 +0x2252 1 0x94 0x94 0x94 0x94 +0x2253 1 0x94 0x94 0x94 0x94 +0x2254 1 0x94 0x94 0x94 0x94 +0x2255 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2256 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2257 1 0x94 0x94 0x94 0x94 +0x2258 1 0x94 0x94 0x94 0x94 +0x2259 1 0x94 0x94 0x94 0x94 +0x225a 1 0x94 0x94 0x94 0x94 +0x225b 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x225c 1 0x94 0x94 0x94 0x94 +0x225d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x225e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x225f 1 0x94 0x94 0x94 0x94 + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x94 0x94 0x94 0x94 +0x2301 1 0x94 0x94 0x94 0x94 +0x2302 1 0x94 0x94 0x94 0x94 +0x2303 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2304 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2305 1 0x94 0x94 0x94 0x94 +0x2306 1 0x94 0x94 0x94 0x94 +0x2307 1 0x94 0x94 0x94 0x94 +0x2308 1 0x94 0x94 0x94 0x94 +0x2309 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x230a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x230b 1 0x94 0x94 0x94 0x94 +0x230c 1 0x94 0x94 0x94 0x94 +0x230d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x230e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x230f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2310 1 0x94 0x94 0x94 0x94 +0x2311 1 0x94 0x94 0x94 0x94 +0x2312 1 0x94 0x94 0x94 0x94 +0x2313 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2314 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2315 1 0x94 0x94 0x94 0x94 +0x2316 1 0x94 0x94 0x94 0x94 +0x2317 1 0x94 0x94 0x94 0x94 +0x2318 1 0x94 0x94 0x94 0x94 +0x2319 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x231a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x231b 1 0x94 0x94 0x94 0x94 +0x231c 1 0x94 0x94 0x94 0x94 +0x231d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x231e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x231f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2320 1 0x94 0x94 0x94 0x94 +0x2321 1 0x94 0x94 0x94 0x94 +0x2322 1 0x94 0x94 0x94 0x94 +0x2323 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2324 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2325 1 0x94 0x94 0x94 0x94 +0x2326 1 0x94 0x94 0x94 0x94 +0x2327 1 0x94 0x94 0x94 0x94 +0x2328 1 0x94 0x94 0x94 0x94 +0x2329 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x232a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x232b 1 0x94 0x94 0x94 0x94 +0x232c 1 0x94 0x94 0x94 0x94 +0x232d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x232e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x232f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2330 1 0x94 0x94 0x94 0x94 +0x2331 1 0x94 0x94 0x94 0x94 +0x2332 1 0x94 0x94 0x94 0x94 +0x2333 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2334 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2335 1 0x94 0x94 0x94 0x94 +0x2336 1 0x94 0x94 0x94 0x94 +0x2337 1 0x94 0x94 0x94 0x94 +0x2338 1 0x94 0x94 0x94 0x94 +0x2339 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x233a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x233b 1 0x94 0x94 0x94 0x94 +0x233c 1 0x94 0x94 0x94 0x94 +0x233d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x233e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x233f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2340 1 0x94 0x94 0x94 0x94 +0x2341 1 0x94 0x94 0x94 0x94 +0x2342 1 0x94 0x94 0x94 0x94 +0x2343 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2344 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2345 1 0x94 0x94 0x94 0x94 +0x2346 1 0x94 0x94 0x94 0x94 +0x2347 1 0x94 0x94 0x94 0x94 +0x2348 1 0x94 0x94 0x94 0x94 +0x2349 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x234a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x234b 1 0x94 0x94 0x94 0x94 +0x234c 1 0x94 0x94 0x94 0x94 +0x234d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x234e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x234f 1 0x94 0x94 0x94 0x94 +######################################################################## +0x2350 1 0x94 0x94 0x94 0x94 +0x2351 1 0x94 0x94 0x94 0x94 +0x2352 1 0x94 0x94 0x94 0x94 +0x2353 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2354 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x2355 1 0x94 0x94 0x94 0x94 +0x2356 1 0x94 0x94 0x94 0x94 +0x2357 1 0x94 0x94 0x94 0x94 +0x2358 1 0x94 0x94 0x94 0x94 +0x2359 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x235a 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x235b 1 0x94 0x94 0x94 0x94 +0x235c 1 0x94 0x94 0x94 0x94 +0x235d 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x235e 2 0x94 0x94 0x94 0x94 0x94 0x94 +0x235f 1 0x94 0x94 0x94 0x94 diff --git a/mdc/thresholds/register_thresholds_96.db b/mdc/thresholds/register_thresholds_96.db new file mode 100644 index 0000000..1a40637 --- /dev/null +++ b/mdc/thresholds/register_thresholds_96.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x96 0x96 0x96 0x96 +0x2001 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2002 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2003 1 0x96 0x96 0x96 0x96 +0x2004 1 0x96 0x96 0x96 0x96 +0x2005 1 0x96 0x96 0x96 0x96 +0x2006 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2007 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2008 1 0x96 0x96 0x96 0x96 +0x2009 1 0x96 0x96 0x96 0x96 +0x200a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x200b 1 0x96 0x96 0x96 0x96 +0x200c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x200d 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2010 1 0x96 0x96 0x96 0x96 +0x2011 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2012 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2013 1 0x96 0x96 0x96 0x96 +0x2014 1 0x96 0x96 0x96 0x96 +0x2015 1 0x96 0x96 0x96 0x96 +0x2016 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2017 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2018 1 0x96 0x96 0x96 0x96 +0x2019 1 0x96 0x96 0x96 0x96 +0x201a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x201b 1 0x96 0x96 0x96 0x96 +0x201c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x201d 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2020 1 0x96 0x96 0x96 0x96 +0x2021 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2022 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2023 1 0x96 0x96 0x96 0x96 +0x2024 1 0x96 0x96 0x96 0x96 +0x2025 1 0x96 0x96 0x96 0x96 +0x2026 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2027 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2028 1 0x96 0x96 0x96 0x96 +0x2029 1 0x96 0x96 0x96 0x96 +0x202a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x202b 1 0x96 0x96 0x96 0x96 +0x202c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x202d 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2030 1 0x96 0x96 0x96 0x96 +0x2031 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2032 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2033 1 0x96 0x96 0x96 0x96 +0x2034 1 0x96 0x96 0x96 0x96 +0x2035 1 0x96 0x96 0x96 0x96 +0x2036 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2037 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2038 1 0x96 0x96 0x96 0x96 +0x2039 1 0x96 0x96 0x96 0x96 +0x203a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x203b 1 0x96 0x96 0x96 0x96 +0x203c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x203d 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2040 1 0x96 0x96 0x96 0x96 +0x2041 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2042 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2043 1 0x96 0x96 0x96 0x96 +0x2044 1 0x96 0x96 0x96 0x96 +0x2045 1 0x96 0x96 0x96 0x96 +0x2046 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2047 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2048 1 0x96 0x96 0x96 0x96 +0x2049 1 0x96 0x96 0x96 0x96 +0x204a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x204b 1 0x96 0x96 0x96 0x96 +0x204c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x204d 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2050 1 0x96 0x96 0x96 0x96 +0x2051 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2052 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2053 1 0x96 0x96 0x96 0x96 +0x2054 1 0x96 0x96 0x96 0x96 +0x2055 1 0x96 0x96 0x96 0x96 +0x2056 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2057 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2058 1 0x96 0x96 0x96 0x96 +0x2059 1 0x96 0x96 0x96 0x96 +0x205a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x205b 1 0x96 0x96 0x96 0x96 +0x205c 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x205d 1 0x96 0x96 0x96 0x96 + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x96 0x96 0x96 0x96 +0x2101 1 0x96 0x96 0x96 0x96 +0x2102 1 0x96 0x96 0x96 0x96 +0x2103 1 0x96 0x96 0x96 0x96 +0x2104 1 0x96 0x96 0x96 0x96 +0x2105 1 0x96 0x96 0x96 0x96 +0x2106 1 0x96 0x96 0x96 0x96 +0x2107 1 0x96 0x96 0x96 0x96 +0x2108 1 0x96 0x96 0x96 0x96 +0x2109 1 0x96 0x96 0x96 0x96 +0x210a 1 0x96 0x96 0x96 0x96 +0x210b 1 0x96 0x96 0x96 0x96 +0x210c 1 0x96 0x96 0x96 0x96 +0x210d 1 0x96 0x96 0x96 0x96 +0x210e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x210f 2 0x96 0x96 0x96 0x96 0x96 0x96 +######################################################################## +0x2110 1 0x96 0x96 0x96 0x96 +0x2111 1 0x96 0x96 0x96 0x96 +0x2112 1 0x96 0x96 0x96 0x96 +0x2113 1 0x96 0x96 0x96 0x96 +0x2114 1 0x96 0x96 0x96 0x96 +0x2115 1 0x96 0x96 0x96 0x96 +0x2116 1 0x96 0x96 0x96 0x96 +0x2117 1 0x96 0x96 0x96 0x96 +0x2118 1 0x96 0x96 0x96 0x96 +0x2119 1 0x96 0x96 0x96 0x96 +0x211a 1 0x96 0x96 0x96 0x96 +0x211b 1 0x96 0x96 0x96 0x96 +0x211c 1 0x96 0x96 0x96 0x96 +0x211d 1 0x96 0x96 0x96 0x96 +0x211e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x211f 2 0x96 0x96 0x96 0x96 0x96 0x96 +######################################################################## +0x2120 1 0x96 0x96 0x96 0x96 +0x2121 1 0x96 0x96 0x96 0x96 +0x2122 1 0x96 0x96 0x96 0x96 +0x2123 1 0x96 0x96 0x96 0x96 +0x2124 1 0x96 0x96 0x96 0x96 +0x2125 1 0x96 0x96 0x96 0x96 +0x2126 1 0x96 0x96 0x96 0x96 +0x2127 1 0x96 0x96 0x96 0x96 +0x2128 1 0x96 0x96 0x96 0x96 +0x2129 1 0x96 0x96 0x96 0x96 +0x212a 1 0x96 0x96 0x96 0x96 +0x212b 1 0x96 0x96 0x96 0x96 +0x212c 1 0x96 0x96 0x96 0x96 +0x212d 1 0x96 0x96 0x96 0x96 +0x212e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x212f 2 0x96 0x96 0x96 0x96 0x96 0x96 +######################################################################## +0x2130 1 0x96 0x96 0x96 0x96 +0x2131 1 0x96 0x96 0x96 0x96 +0x2132 1 0x96 0x96 0x96 0x96 +0x2133 1 0x96 0x96 0x96 0x96 +0x2134 1 0x96 0x96 0x96 0x96 +0x2135 1 0x96 0x96 0x96 0x96 +0x2136 1 0x96 0x96 0x96 0x96 +0x2137 1 0x96 0x96 0x96 0x96 +0x2138 1 0x96 0x96 0x96 0x96 +0x2139 1 0x96 0x96 0x96 0x96 +0x213a 1 0x96 0x96 0x96 0x96 +0x213b 1 0x96 0x96 0x96 0x96 +0x213c 1 0x96 0x96 0x96 0x96 +0x213d 1 0x96 0x96 0x96 0x96 +0x213e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x213f 2 0x96 0x96 0x96 0x96 0x96 0x96 +######################################################################## +0x2140 1 0x96 0x96 0x96 0x96 +0x2141 1 0x96 0x96 0x96 0x96 +0x2142 1 0x96 0x96 0x96 0x96 +0x2143 1 0x96 0x96 0x96 0x96 +0x2144 1 0x96 0x96 0x96 0x96 +0x2145 1 0x96 0x96 0x96 0x96 +0x2146 1 0x96 0x96 0x96 0x96 +0x2147 1 0x96 0x96 0x96 0x96 +0x2148 1 0x96 0x96 0x96 0x96 +0x2149 1 0x96 0x96 0x96 0x96 +0x214a 1 0x96 0x96 0x96 0x96 +0x214b 1 0x96 0x96 0x96 0x96 +0x214c 1 0x96 0x96 0x96 0x96 +0x214d 1 0x96 0x96 0x96 0x96 +0x214e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x214f 2 0x96 0x96 0x96 0x96 0x96 0x96 +######################################################################## +0x2150 1 0x96 0x96 0x96 0x96 +0x2151 1 0x96 0x96 0x96 0x96 +0x2152 1 0x96 0x96 0x96 0x96 +0x2153 1 0x96 0x96 0x96 0x96 +0x2154 1 0x96 0x96 0x96 0x96 +0x2155 1 0x96 0x96 0x96 0x96 +0x2156 1 0x96 0x96 0x96 0x96 +0x2157 1 0x96 0x96 0x96 0x96 +0x2158 1 0x96 0x96 0x96 0x96 +0x2159 1 0x96 0x96 0x96 0x96 +0x215a 1 0x96 0x96 0x96 0x96 +0x215b 1 0x96 0x96 0x96 0x96 +0x215c 1 0x96 0x96 0x96 0x96 +0x215d 1 0x96 0x96 0x96 0x96 +0x215e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x215f 2 0x96 0x96 0x96 0x96 0x96 0x96 + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2201 1 0x96 0x96 0x96 0x96 +0x2202 1 0x96 0x96 0x96 0x96 +0x2203 1 0x96 0x96 0x96 0x96 +0x2204 1 0x96 0x96 0x96 0x96 +0x2205 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2206 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2207 1 0x96 0x96 0x96 0x96 +0x2208 1 0x96 0x96 0x96 0x96 +0x2209 1 0x96 0x96 0x96 0x96 +0x220a 1 0x96 0x96 0x96 0x96 +0x220b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x220c 1 0x96 0x96 0x96 0x96 +0x220d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x220e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x220f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2210 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2211 1 0x96 0x96 0x96 0x96 +0x2212 1 0x96 0x96 0x96 0x96 +0x2213 1 0x96 0x96 0x96 0x96 +0x2214 1 0x96 0x96 0x96 0x96 +0x2215 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2216 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2217 1 0x96 0x96 0x96 0x96 +0x2218 1 0x96 0x96 0x96 0x96 +0x2219 1 0x96 0x96 0x96 0x96 +0x221a 1 0x96 0x96 0x96 0x96 +0x221b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x221c 1 0x96 0x96 0x96 0x96 +0x221d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x221e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x221f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2220 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2221 1 0x96 0x96 0x96 0x96 +0x2222 1 0x96 0x96 0x96 0x96 +0x2223 1 0x96 0x96 0x96 0x96 +0x2224 1 0x96 0x96 0x96 0x96 +0x2225 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2226 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2227 1 0x96 0x96 0x96 0x96 +0x2228 1 0x96 0x96 0x96 0x96 +0x2229 1 0x96 0x96 0x96 0x96 +0x222a 1 0x96 0x96 0x96 0x96 +0x222b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x222c 1 0x96 0x96 0x96 0x96 +0x222d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x222e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x222f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2230 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2231 1 0x96 0x96 0x96 0x96 +0x2232 1 0x96 0x96 0x96 0x96 +0x2233 1 0x96 0x96 0x96 0x96 +0x2234 1 0x96 0x96 0x96 0x96 +0x2235 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2236 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2237 1 0x96 0x96 0x96 0x96 +0x2238 1 0x96 0x96 0x96 0x96 +0x2239 1 0x96 0x96 0x96 0x96 +0x223a 1 0x96 0x96 0x96 0x96 +0x223b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x223c 1 0x96 0x96 0x96 0x96 +0x223d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x223e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x223f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2240 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2241 1 0x96 0x96 0x96 0x96 +0x2242 1 0x96 0x96 0x96 0x96 +0x2243 1 0x96 0x96 0x96 0x96 +0x2244 1 0x96 0x96 0x96 0x96 +0x2245 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2246 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2247 1 0x96 0x96 0x96 0x96 +0x2248 1 0x96 0x96 0x96 0x96 +0x2249 1 0x96 0x96 0x96 0x96 +0x224a 1 0x96 0x96 0x96 0x96 +0x224b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x224c 1 0x96 0x96 0x96 0x96 +0x224d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x224e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x224f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2250 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2251 1 0x96 0x96 0x96 0x96 +0x2252 1 0x96 0x96 0x96 0x96 +0x2253 1 0x96 0x96 0x96 0x96 +0x2254 1 0x96 0x96 0x96 0x96 +0x2255 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2256 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2257 1 0x96 0x96 0x96 0x96 +0x2258 1 0x96 0x96 0x96 0x96 +0x2259 1 0x96 0x96 0x96 0x96 +0x225a 1 0x96 0x96 0x96 0x96 +0x225b 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x225c 1 0x96 0x96 0x96 0x96 +0x225d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x225e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x225f 1 0x96 0x96 0x96 0x96 + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x96 0x96 0x96 0x96 +0x2301 1 0x96 0x96 0x96 0x96 +0x2302 1 0x96 0x96 0x96 0x96 +0x2303 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2304 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2305 1 0x96 0x96 0x96 0x96 +0x2306 1 0x96 0x96 0x96 0x96 +0x2307 1 0x96 0x96 0x96 0x96 +0x2308 1 0x96 0x96 0x96 0x96 +0x2309 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x230a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x230b 1 0x96 0x96 0x96 0x96 +0x230c 1 0x96 0x96 0x96 0x96 +0x230d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x230e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x230f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2310 1 0x96 0x96 0x96 0x96 +0x2311 1 0x96 0x96 0x96 0x96 +0x2312 1 0x96 0x96 0x96 0x96 +0x2313 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2314 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2315 1 0x96 0x96 0x96 0x96 +0x2316 1 0x96 0x96 0x96 0x96 +0x2317 1 0x96 0x96 0x96 0x96 +0x2318 1 0x96 0x96 0x96 0x96 +0x2319 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x231a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x231b 1 0x96 0x96 0x96 0x96 +0x231c 1 0x96 0x96 0x96 0x96 +0x231d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x231e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x231f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2320 1 0x96 0x96 0x96 0x96 +0x2321 1 0x96 0x96 0x96 0x96 +0x2322 1 0x96 0x96 0x96 0x96 +0x2323 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2324 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2325 1 0x96 0x96 0x96 0x96 +0x2326 1 0x96 0x96 0x96 0x96 +0x2327 1 0x96 0x96 0x96 0x96 +0x2328 1 0x96 0x96 0x96 0x96 +0x2329 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x232a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x232b 1 0x96 0x96 0x96 0x96 +0x232c 1 0x96 0x96 0x96 0x96 +0x232d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x232e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x232f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2330 1 0x96 0x96 0x96 0x96 +0x2331 1 0x96 0x96 0x96 0x96 +0x2332 1 0x96 0x96 0x96 0x96 +0x2333 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2334 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2335 1 0x96 0x96 0x96 0x96 +0x2336 1 0x96 0x96 0x96 0x96 +0x2337 1 0x96 0x96 0x96 0x96 +0x2338 1 0x96 0x96 0x96 0x96 +0x2339 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x233a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x233b 1 0x96 0x96 0x96 0x96 +0x233c 1 0x96 0x96 0x96 0x96 +0x233d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x233e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x233f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2340 1 0x96 0x96 0x96 0x96 +0x2341 1 0x96 0x96 0x96 0x96 +0x2342 1 0x96 0x96 0x96 0x96 +0x2343 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2344 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2345 1 0x96 0x96 0x96 0x96 +0x2346 1 0x96 0x96 0x96 0x96 +0x2347 1 0x96 0x96 0x96 0x96 +0x2348 1 0x96 0x96 0x96 0x96 +0x2349 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x234a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x234b 1 0x96 0x96 0x96 0x96 +0x234c 1 0x96 0x96 0x96 0x96 +0x234d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x234e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x234f 1 0x96 0x96 0x96 0x96 +######################################################################## +0x2350 1 0x96 0x96 0x96 0x96 +0x2351 1 0x96 0x96 0x96 0x96 +0x2352 1 0x96 0x96 0x96 0x96 +0x2353 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2354 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x2355 1 0x96 0x96 0x96 0x96 +0x2356 1 0x96 0x96 0x96 0x96 +0x2357 1 0x96 0x96 0x96 0x96 +0x2358 1 0x96 0x96 0x96 0x96 +0x2359 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x235a 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x235b 1 0x96 0x96 0x96 0x96 +0x235c 1 0x96 0x96 0x96 0x96 +0x235d 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x235e 2 0x96 0x96 0x96 0x96 0x96 0x96 +0x235f 1 0x96 0x96 0x96 0x96 diff --git a/mdc/thresholds/register_thresholds_98.db b/mdc/thresholds/register_thresholds_98.db new file mode 100644 index 0000000..6fdc885 --- /dev/null +++ b/mdc/thresholds/register_thresholds_98.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x98 0x98 0x98 0x98 +0x2001 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2002 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2003 1 0x98 0x98 0x98 0x98 +0x2004 1 0x98 0x98 0x98 0x98 +0x2005 1 0x98 0x98 0x98 0x98 +0x2006 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2007 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2008 1 0x98 0x98 0x98 0x98 +0x2009 1 0x98 0x98 0x98 0x98 +0x200a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x200b 1 0x98 0x98 0x98 0x98 +0x200c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x200d 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2010 1 0x98 0x98 0x98 0x98 +0x2011 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2012 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2013 1 0x98 0x98 0x98 0x98 +0x2014 1 0x98 0x98 0x98 0x98 +0x2015 1 0x98 0x98 0x98 0x98 +0x2016 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2017 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2018 1 0x98 0x98 0x98 0x98 +0x2019 1 0x98 0x98 0x98 0x98 +0x201a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x201b 1 0x98 0x98 0x98 0x98 +0x201c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x201d 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2020 1 0x98 0x98 0x98 0x98 +0x2021 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2022 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2023 1 0x98 0x98 0x98 0x98 +0x2024 1 0x98 0x98 0x98 0x98 +0x2025 1 0x98 0x98 0x98 0x98 +0x2026 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2027 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2028 1 0x98 0x98 0x98 0x98 +0x2029 1 0x98 0x98 0x98 0x98 +0x202a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x202b 1 0x98 0x98 0x98 0x98 +0x202c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x202d 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2030 1 0x98 0x98 0x98 0x98 +0x2031 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2032 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2033 1 0x98 0x98 0x98 0x98 +0x2034 1 0x98 0x98 0x98 0x98 +0x2035 1 0x98 0x98 0x98 0x98 +0x2036 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2037 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2038 1 0x98 0x98 0x98 0x98 +0x2039 1 0x98 0x98 0x98 0x98 +0x203a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x203b 1 0x98 0x98 0x98 0x98 +0x203c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x203d 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2040 1 0x98 0x98 0x98 0x98 +0x2041 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2042 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2043 1 0x98 0x98 0x98 0x98 +0x2044 1 0x98 0x98 0x98 0x98 +0x2045 1 0x98 0x98 0x98 0x98 +0x2046 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2047 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2048 1 0x98 0x98 0x98 0x98 +0x2049 1 0x98 0x98 0x98 0x98 +0x204a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x204b 1 0x98 0x98 0x98 0x98 +0x204c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x204d 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2050 1 0x98 0x98 0x98 0x98 +0x2051 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2052 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2053 1 0x98 0x98 0x98 0x98 +0x2054 1 0x98 0x98 0x98 0x98 +0x2055 1 0x98 0x98 0x98 0x98 +0x2056 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2057 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2058 1 0x98 0x98 0x98 0x98 +0x2059 1 0x98 0x98 0x98 0x98 +0x205a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x205b 1 0x98 0x98 0x98 0x98 +0x205c 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x205d 1 0x98 0x98 0x98 0x98 + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x98 0x98 0x98 0x98 +0x2101 1 0x98 0x98 0x98 0x98 +0x2102 1 0x98 0x98 0x98 0x98 +0x2103 1 0x98 0x98 0x98 0x98 +0x2104 1 0x98 0x98 0x98 0x98 +0x2105 1 0x98 0x98 0x98 0x98 +0x2106 1 0x98 0x98 0x98 0x98 +0x2107 1 0x98 0x98 0x98 0x98 +0x2108 1 0x98 0x98 0x98 0x98 +0x2109 1 0x98 0x98 0x98 0x98 +0x210a 1 0x98 0x98 0x98 0x98 +0x210b 1 0x98 0x98 0x98 0x98 +0x210c 1 0x98 0x98 0x98 0x98 +0x210d 1 0x98 0x98 0x98 0x98 +0x210e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x210f 2 0x98 0x98 0x98 0x98 0x98 0x98 +######################################################################## +0x2110 1 0x98 0x98 0x98 0x98 +0x2111 1 0x98 0x98 0x98 0x98 +0x2112 1 0x98 0x98 0x98 0x98 +0x2113 1 0x98 0x98 0x98 0x98 +0x2114 1 0x98 0x98 0x98 0x98 +0x2115 1 0x98 0x98 0x98 0x98 +0x2116 1 0x98 0x98 0x98 0x98 +0x2117 1 0x98 0x98 0x98 0x98 +0x2118 1 0x98 0x98 0x98 0x98 +0x2119 1 0x98 0x98 0x98 0x98 +0x211a 1 0x98 0x98 0x98 0x98 +0x211b 1 0x98 0x98 0x98 0x98 +0x211c 1 0x98 0x98 0x98 0x98 +0x211d 1 0x98 0x98 0x98 0x98 +0x211e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x211f 2 0x98 0x98 0x98 0x98 0x98 0x98 +######################################################################## +0x2120 1 0x98 0x98 0x98 0x98 +0x2121 1 0x98 0x98 0x98 0x98 +0x2122 1 0x98 0x98 0x98 0x98 +0x2123 1 0x98 0x98 0x98 0x98 +0x2124 1 0x98 0x98 0x98 0x98 +0x2125 1 0x98 0x98 0x98 0x98 +0x2126 1 0x98 0x98 0x98 0x98 +0x2127 1 0x98 0x98 0x98 0x98 +0x2128 1 0x98 0x98 0x98 0x98 +0x2129 1 0x98 0x98 0x98 0x98 +0x212a 1 0x98 0x98 0x98 0x98 +0x212b 1 0x98 0x98 0x98 0x98 +0x212c 1 0x98 0x98 0x98 0x98 +0x212d 1 0x98 0x98 0x98 0x98 +0x212e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x212f 2 0x98 0x98 0x98 0x98 0x98 0x98 +######################################################################## +0x2130 1 0x98 0x98 0x98 0x98 +0x2131 1 0x98 0x98 0x98 0x98 +0x2132 1 0x98 0x98 0x98 0x98 +0x2133 1 0x98 0x98 0x98 0x98 +0x2134 1 0x98 0x98 0x98 0x98 +0x2135 1 0x98 0x98 0x98 0x98 +0x2136 1 0x98 0x98 0x98 0x98 +0x2137 1 0x98 0x98 0x98 0x98 +0x2138 1 0x98 0x98 0x98 0x98 +0x2139 1 0x98 0x98 0x98 0x98 +0x213a 1 0x98 0x98 0x98 0x98 +0x213b 1 0x98 0x98 0x98 0x98 +0x213c 1 0x98 0x98 0x98 0x98 +0x213d 1 0x98 0x98 0x98 0x98 +0x213e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x213f 2 0x98 0x98 0x98 0x98 0x98 0x98 +######################################################################## +0x2140 1 0x98 0x98 0x98 0x98 +0x2141 1 0x98 0x98 0x98 0x98 +0x2142 1 0x98 0x98 0x98 0x98 +0x2143 1 0x98 0x98 0x98 0x98 +0x2144 1 0x98 0x98 0x98 0x98 +0x2145 1 0x98 0x98 0x98 0x98 +0x2146 1 0x98 0x98 0x98 0x98 +0x2147 1 0x98 0x98 0x98 0x98 +0x2148 1 0x98 0x98 0x98 0x98 +0x2149 1 0x98 0x98 0x98 0x98 +0x214a 1 0x98 0x98 0x98 0x98 +0x214b 1 0x98 0x98 0x98 0x98 +0x214c 1 0x98 0x98 0x98 0x98 +0x214d 1 0x98 0x98 0x98 0x98 +0x214e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x214f 2 0x98 0x98 0x98 0x98 0x98 0x98 +######################################################################## +0x2150 1 0x98 0x98 0x98 0x98 +0x2151 1 0x98 0x98 0x98 0x98 +0x2152 1 0x98 0x98 0x98 0x98 +0x2153 1 0x98 0x98 0x98 0x98 +0x2154 1 0x98 0x98 0x98 0x98 +0x2155 1 0x98 0x98 0x98 0x98 +0x2156 1 0x98 0x98 0x98 0x98 +0x2157 1 0x98 0x98 0x98 0x98 +0x2158 1 0x98 0x98 0x98 0x98 +0x2159 1 0x98 0x98 0x98 0x98 +0x215a 1 0x98 0x98 0x98 0x98 +0x215b 1 0x98 0x98 0x98 0x98 +0x215c 1 0x98 0x98 0x98 0x98 +0x215d 1 0x98 0x98 0x98 0x98 +0x215e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x215f 2 0x98 0x98 0x98 0x98 0x98 0x98 + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2201 1 0x98 0x98 0x98 0x98 +0x2202 1 0x98 0x98 0x98 0x98 +0x2203 1 0x98 0x98 0x98 0x98 +0x2204 1 0x98 0x98 0x98 0x98 +0x2205 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2206 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2207 1 0x98 0x98 0x98 0x98 +0x2208 1 0x98 0x98 0x98 0x98 +0x2209 1 0x98 0x98 0x98 0x98 +0x220a 1 0x98 0x98 0x98 0x98 +0x220b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x220c 1 0x98 0x98 0x98 0x98 +0x220d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x220e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x220f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2210 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2211 1 0x98 0x98 0x98 0x98 +0x2212 1 0x98 0x98 0x98 0x98 +0x2213 1 0x98 0x98 0x98 0x98 +0x2214 1 0x98 0x98 0x98 0x98 +0x2215 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2216 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2217 1 0x98 0x98 0x98 0x98 +0x2218 1 0x98 0x98 0x98 0x98 +0x2219 1 0x98 0x98 0x98 0x98 +0x221a 1 0x98 0x98 0x98 0x98 +0x221b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x221c 1 0x98 0x98 0x98 0x98 +0x221d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x221e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x221f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2220 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2221 1 0x98 0x98 0x98 0x98 +0x2222 1 0x98 0x98 0x98 0x98 +0x2223 1 0x98 0x98 0x98 0x98 +0x2224 1 0x98 0x98 0x98 0x98 +0x2225 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2226 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2227 1 0x98 0x98 0x98 0x98 +0x2228 1 0x98 0x98 0x98 0x98 +0x2229 1 0x98 0x98 0x98 0x98 +0x222a 1 0x98 0x98 0x98 0x98 +0x222b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x222c 1 0x98 0x98 0x98 0x98 +0x222d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x222e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x222f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2230 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2231 1 0x98 0x98 0x98 0x98 +0x2232 1 0x98 0x98 0x98 0x98 +0x2233 1 0x98 0x98 0x98 0x98 +0x2234 1 0x98 0x98 0x98 0x98 +0x2235 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2236 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2237 1 0x98 0x98 0x98 0x98 +0x2238 1 0x98 0x98 0x98 0x98 +0x2239 1 0x98 0x98 0x98 0x98 +0x223a 1 0x98 0x98 0x98 0x98 +0x223b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x223c 1 0x98 0x98 0x98 0x98 +0x223d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x223e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x223f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2240 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2241 1 0x98 0x98 0x98 0x98 +0x2242 1 0x98 0x98 0x98 0x98 +0x2243 1 0x98 0x98 0x98 0x98 +0x2244 1 0x98 0x98 0x98 0x98 +0x2245 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2246 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2247 1 0x98 0x98 0x98 0x98 +0x2248 1 0x98 0x98 0x98 0x98 +0x2249 1 0x98 0x98 0x98 0x98 +0x224a 1 0x98 0x98 0x98 0x98 +0x224b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x224c 1 0x98 0x98 0x98 0x98 +0x224d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x224e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x224f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2250 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2251 1 0x98 0x98 0x98 0x98 +0x2252 1 0x98 0x98 0x98 0x98 +0x2253 1 0x98 0x98 0x98 0x98 +0x2254 1 0x98 0x98 0x98 0x98 +0x2255 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2256 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2257 1 0x98 0x98 0x98 0x98 +0x2258 1 0x98 0x98 0x98 0x98 +0x2259 1 0x98 0x98 0x98 0x98 +0x225a 1 0x98 0x98 0x98 0x98 +0x225b 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x225c 1 0x98 0x98 0x98 0x98 +0x225d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x225e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x225f 1 0x98 0x98 0x98 0x98 + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x98 0x98 0x98 0x98 +0x2301 1 0x98 0x98 0x98 0x98 +0x2302 1 0x98 0x98 0x98 0x98 +0x2303 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2304 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2305 1 0x98 0x98 0x98 0x98 +0x2306 1 0x98 0x98 0x98 0x98 +0x2307 1 0x98 0x98 0x98 0x98 +0x2308 1 0x98 0x98 0x98 0x98 +0x2309 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x230a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x230b 1 0x98 0x98 0x98 0x98 +0x230c 1 0x98 0x98 0x98 0x98 +0x230d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x230e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x230f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2310 1 0x98 0x98 0x98 0x98 +0x2311 1 0x98 0x98 0x98 0x98 +0x2312 1 0x98 0x98 0x98 0x98 +0x2313 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2314 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2315 1 0x98 0x98 0x98 0x98 +0x2316 1 0x98 0x98 0x98 0x98 +0x2317 1 0x98 0x98 0x98 0x98 +0x2318 1 0x98 0x98 0x98 0x98 +0x2319 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x231a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x231b 1 0x98 0x98 0x98 0x98 +0x231c 1 0x98 0x98 0x98 0x98 +0x231d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x231e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x231f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2320 1 0x98 0x98 0x98 0x98 +0x2321 1 0x98 0x98 0x98 0x98 +0x2322 1 0x98 0x98 0x98 0x98 +0x2323 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2324 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2325 1 0x98 0x98 0x98 0x98 +0x2326 1 0x98 0x98 0x98 0x98 +0x2327 1 0x98 0x98 0x98 0x98 +0x2328 1 0x98 0x98 0x98 0x98 +0x2329 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x232a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x232b 1 0x98 0x98 0x98 0x98 +0x232c 1 0x98 0x98 0x98 0x98 +0x232d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x232e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x232f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2330 1 0x98 0x98 0x98 0x98 +0x2331 1 0x98 0x98 0x98 0x98 +0x2332 1 0x98 0x98 0x98 0x98 +0x2333 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2334 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2335 1 0x98 0x98 0x98 0x98 +0x2336 1 0x98 0x98 0x98 0x98 +0x2337 1 0x98 0x98 0x98 0x98 +0x2338 1 0x98 0x98 0x98 0x98 +0x2339 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x233a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x233b 1 0x98 0x98 0x98 0x98 +0x233c 1 0x98 0x98 0x98 0x98 +0x233d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x233e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x233f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2340 1 0x98 0x98 0x98 0x98 +0x2341 1 0x98 0x98 0x98 0x98 +0x2342 1 0x98 0x98 0x98 0x98 +0x2343 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2344 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2345 1 0x98 0x98 0x98 0x98 +0x2346 1 0x98 0x98 0x98 0x98 +0x2347 1 0x98 0x98 0x98 0x98 +0x2348 1 0x98 0x98 0x98 0x98 +0x2349 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x234a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x234b 1 0x98 0x98 0x98 0x98 +0x234c 1 0x98 0x98 0x98 0x98 +0x234d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x234e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x234f 1 0x98 0x98 0x98 0x98 +######################################################################## +0x2350 1 0x98 0x98 0x98 0x98 +0x2351 1 0x98 0x98 0x98 0x98 +0x2352 1 0x98 0x98 0x98 0x98 +0x2353 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2354 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x2355 1 0x98 0x98 0x98 0x98 +0x2356 1 0x98 0x98 0x98 0x98 +0x2357 1 0x98 0x98 0x98 0x98 +0x2358 1 0x98 0x98 0x98 0x98 +0x2359 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x235a 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x235b 1 0x98 0x98 0x98 0x98 +0x235c 1 0x98 0x98 0x98 0x98 +0x235d 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x235e 2 0x98 0x98 0x98 0x98 0x98 0x98 +0x235f 1 0x98 0x98 0x98 0x98 diff --git a/mdc/thresholds/register_thresholds_9a.db b/mdc/thresholds/register_thresholds_9a.db new file mode 100644 index 0000000..763e5c5 --- /dev/null +++ b/mdc/thresholds/register_thresholds_9a.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xA04B 0xA04D 0xA04F + # Type 2 boards: Write thresholds to register 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xA049 0xA04B 0xA04D 0xA04F + 2 0xA0CD 0xA0CF 0xA0D1 0xA0D3 0xA0D5 0xA0D7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0x9a 0x9a 0x9a 0x9a +0x2001 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2002 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2003 1 0x9a 0x9a 0x9a 0x9a +0x2004 1 0x9a 0x9a 0x9a 0x9a +0x2005 1 0x9a 0x9a 0x9a 0x9a +0x2006 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2007 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2008 1 0x9a 0x9a 0x9a 0x9a +0x2009 1 0x9a 0x9a 0x9a 0x9a +0x200a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x200b 1 0x9a 0x9a 0x9a 0x9a +0x200c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x200d 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2010 1 0x9a 0x9a 0x9a 0x9a +0x2011 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2012 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2013 1 0x9a 0x9a 0x9a 0x9a +0x2014 1 0x9a 0x9a 0x9a 0x9a +0x2015 1 0x9a 0x9a 0x9a 0x9a +0x2016 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2017 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2018 1 0x9a 0x9a 0x9a 0x9a +0x2019 1 0x9a 0x9a 0x9a 0x9a +0x201a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x201b 1 0x9a 0x9a 0x9a 0x9a +0x201c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x201d 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2020 1 0x9a 0x9a 0x9a 0x9a +0x2021 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2022 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2023 1 0x9a 0x9a 0x9a 0x9a +0x2024 1 0x9a 0x9a 0x9a 0x9a +0x2025 1 0x9a 0x9a 0x9a 0x9a +0x2026 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2027 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2028 1 0x9a 0x9a 0x9a 0x9a +0x2029 1 0x9a 0x9a 0x9a 0x9a +0x202a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x202b 1 0x9a 0x9a 0x9a 0x9a +0x202c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x202d 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2030 1 0x9a 0x9a 0x9a 0x9a +0x2031 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2032 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2033 1 0x9a 0x9a 0x9a 0x9a +0x2034 1 0x9a 0x9a 0x9a 0x9a +0x2035 1 0x9a 0x9a 0x9a 0x9a +0x2036 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2037 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2038 1 0x9a 0x9a 0x9a 0x9a +0x2039 1 0x9a 0x9a 0x9a 0x9a +0x203a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x203b 1 0x9a 0x9a 0x9a 0x9a +0x203c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x203d 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2040 1 0x9a 0x9a 0x9a 0x9a +0x2041 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2042 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2043 1 0x9a 0x9a 0x9a 0x9a +0x2044 1 0x9a 0x9a 0x9a 0x9a +0x2045 1 0x9a 0x9a 0x9a 0x9a +0x2046 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2047 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2048 1 0x9a 0x9a 0x9a 0x9a +0x2049 1 0x9a 0x9a 0x9a 0x9a +0x204a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x204b 1 0x9a 0x9a 0x9a 0x9a +0x204c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x204d 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2050 1 0x9a 0x9a 0x9a 0x9a +0x2051 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2052 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2053 1 0x9a 0x9a 0x9a 0x9a +0x2054 1 0x9a 0x9a 0x9a 0x9a +0x2055 1 0x9a 0x9a 0x9a 0x9a +0x2056 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2057 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2058 1 0x9a 0x9a 0x9a 0x9a +0x2059 1 0x9a 0x9a 0x9a 0x9a +0x205a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x205b 1 0x9a 0x9a 0x9a 0x9a +0x205c 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x205d 1 0x9a 0x9a 0x9a 0x9a + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0x9a 0x9a 0x9a 0x9a +0x2101 1 0x9a 0x9a 0x9a 0x9a +0x2102 1 0x9a 0x9a 0x9a 0x9a +0x2103 1 0x9a 0x9a 0x9a 0x9a +0x2104 1 0x9a 0x9a 0x9a 0x9a +0x2105 1 0x9a 0x9a 0x9a 0x9a +0x2106 1 0x9a 0x9a 0x9a 0x9a +0x2107 1 0x9a 0x9a 0x9a 0x9a +0x2108 1 0x9a 0x9a 0x9a 0x9a +0x2109 1 0x9a 0x9a 0x9a 0x9a +0x210a 1 0x9a 0x9a 0x9a 0x9a +0x210b 1 0x9a 0x9a 0x9a 0x9a +0x210c 1 0x9a 0x9a 0x9a 0x9a +0x210d 1 0x9a 0x9a 0x9a 0x9a +0x210e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x210f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2110 1 0x9a 0x9a 0x9a 0x9a +0x2111 1 0x9a 0x9a 0x9a 0x9a +0x2112 1 0x9a 0x9a 0x9a 0x9a +0x2113 1 0x9a 0x9a 0x9a 0x9a +0x2114 1 0x9a 0x9a 0x9a 0x9a +0x2115 1 0x9a 0x9a 0x9a 0x9a +0x2116 1 0x9a 0x9a 0x9a 0x9a +0x2117 1 0x9a 0x9a 0x9a 0x9a +0x2118 1 0x9a 0x9a 0x9a 0x9a +0x2119 1 0x9a 0x9a 0x9a 0x9a +0x211a 1 0x9a 0x9a 0x9a 0x9a +0x211b 1 0x9a 0x9a 0x9a 0x9a +0x211c 1 0x9a 0x9a 0x9a 0x9a +0x211d 1 0x9a 0x9a 0x9a 0x9a +0x211e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x211f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2120 1 0x9a 0x9a 0x9a 0x9a +0x2121 1 0x9a 0x9a 0x9a 0x9a +0x2122 1 0x9a 0x9a 0x9a 0x9a +0x2123 1 0x9a 0x9a 0x9a 0x9a +0x2124 1 0x9a 0x9a 0x9a 0x9a +0x2125 1 0x9a 0x9a 0x9a 0x9a +0x2126 1 0x9a 0x9a 0x9a 0x9a +0x2127 1 0x9a 0x9a 0x9a 0x9a +0x2128 1 0x9a 0x9a 0x9a 0x9a +0x2129 1 0x9a 0x9a 0x9a 0x9a +0x212a 1 0x9a 0x9a 0x9a 0x9a +0x212b 1 0x9a 0x9a 0x9a 0x9a +0x212c 1 0x9a 0x9a 0x9a 0x9a +0x212d 1 0x9a 0x9a 0x9a 0x9a +0x212e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x212f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2130 1 0x9a 0x9a 0x9a 0x9a +0x2131 1 0x9a 0x9a 0x9a 0x9a +0x2132 1 0x9a 0x9a 0x9a 0x9a +0x2133 1 0x9a 0x9a 0x9a 0x9a +0x2134 1 0x9a 0x9a 0x9a 0x9a +0x2135 1 0x9a 0x9a 0x9a 0x9a +0x2136 1 0x9a 0x9a 0x9a 0x9a +0x2137 1 0x9a 0x9a 0x9a 0x9a +0x2138 1 0x9a 0x9a 0x9a 0x9a +0x2139 1 0x9a 0x9a 0x9a 0x9a +0x213a 1 0x9a 0x9a 0x9a 0x9a +0x213b 1 0x9a 0x9a 0x9a 0x9a +0x213c 1 0x9a 0x9a 0x9a 0x9a +0x213d 1 0x9a 0x9a 0x9a 0x9a +0x213e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x213f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2140 1 0x9a 0x9a 0x9a 0x9a +0x2141 1 0x9a 0x9a 0x9a 0x9a +0x2142 1 0x9a 0x9a 0x9a 0x9a +0x2143 1 0x9a 0x9a 0x9a 0x9a +0x2144 1 0x9a 0x9a 0x9a 0x9a +0x2145 1 0x9a 0x9a 0x9a 0x9a +0x2146 1 0x9a 0x9a 0x9a 0x9a +0x2147 1 0x9a 0x9a 0x9a 0x9a +0x2148 1 0x9a 0x9a 0x9a 0x9a +0x2149 1 0x9a 0x9a 0x9a 0x9a +0x214a 1 0x9a 0x9a 0x9a 0x9a +0x214b 1 0x9a 0x9a 0x9a 0x9a +0x214c 1 0x9a 0x9a 0x9a 0x9a +0x214d 1 0x9a 0x9a 0x9a 0x9a +0x214e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x214f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2150 1 0x9a 0x9a 0x9a 0x9a +0x2151 1 0x9a 0x9a 0x9a 0x9a +0x2152 1 0x9a 0x9a 0x9a 0x9a +0x2153 1 0x9a 0x9a 0x9a 0x9a +0x2154 1 0x9a 0x9a 0x9a 0x9a +0x2155 1 0x9a 0x9a 0x9a 0x9a +0x2156 1 0x9a 0x9a 0x9a 0x9a +0x2157 1 0x9a 0x9a 0x9a 0x9a +0x2158 1 0x9a 0x9a 0x9a 0x9a +0x2159 1 0x9a 0x9a 0x9a 0x9a +0x215a 1 0x9a 0x9a 0x9a 0x9a +0x215b 1 0x9a 0x9a 0x9a 0x9a +0x215c 1 0x9a 0x9a 0x9a 0x9a +0x215d 1 0x9a 0x9a 0x9a 0x9a +0x215e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x215f 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2201 1 0x9a 0x9a 0x9a 0x9a +0x2202 1 0x9a 0x9a 0x9a 0x9a +0x2203 1 0x9a 0x9a 0x9a 0x9a +0x2204 1 0x9a 0x9a 0x9a 0x9a +0x2205 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2206 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2207 1 0x9a 0x9a 0x9a 0x9a +0x2208 1 0x9a 0x9a 0x9a 0x9a +0x2209 1 0x9a 0x9a 0x9a 0x9a +0x220a 1 0x9a 0x9a 0x9a 0x9a +0x220b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x220c 1 0x9a 0x9a 0x9a 0x9a +0x220d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x220e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x220f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2210 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2211 1 0x9a 0x9a 0x9a 0x9a +0x2212 1 0x9a 0x9a 0x9a 0x9a +0x2213 1 0x9a 0x9a 0x9a 0x9a +0x2214 1 0x9a 0x9a 0x9a 0x9a +0x2215 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2216 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2217 1 0x9a 0x9a 0x9a 0x9a +0x2218 1 0x9a 0x9a 0x9a 0x9a +0x2219 1 0x9a 0x9a 0x9a 0x9a +0x221a 1 0x9a 0x9a 0x9a 0x9a +0x221b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x221c 1 0x9a 0x9a 0x9a 0x9a +0x221d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x221e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x221f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2220 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2221 1 0x9a 0x9a 0x9a 0x9a +0x2222 1 0x9a 0x9a 0x9a 0x9a +0x2223 1 0x9a 0x9a 0x9a 0x9a +0x2224 1 0x9a 0x9a 0x9a 0x9a +0x2225 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2226 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2227 1 0x9a 0x9a 0x9a 0x9a +0x2228 1 0x9a 0x9a 0x9a 0x9a +0x2229 1 0x9a 0x9a 0x9a 0x9a +0x222a 1 0x9a 0x9a 0x9a 0x9a +0x222b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x222c 1 0x9a 0x9a 0x9a 0x9a +0x222d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x222e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x222f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2230 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2231 1 0x9a 0x9a 0x9a 0x9a +0x2232 1 0x9a 0x9a 0x9a 0x9a +0x2233 1 0x9a 0x9a 0x9a 0x9a +0x2234 1 0x9a 0x9a 0x9a 0x9a +0x2235 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2236 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2237 1 0x9a 0x9a 0x9a 0x9a +0x2238 1 0x9a 0x9a 0x9a 0x9a +0x2239 1 0x9a 0x9a 0x9a 0x9a +0x223a 1 0x9a 0x9a 0x9a 0x9a +0x223b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x223c 1 0x9a 0x9a 0x9a 0x9a +0x223d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x223e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x223f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2240 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2241 1 0x9a 0x9a 0x9a 0x9a +0x2242 1 0x9a 0x9a 0x9a 0x9a +0x2243 1 0x9a 0x9a 0x9a 0x9a +0x2244 1 0x9a 0x9a 0x9a 0x9a +0x2245 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2246 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2247 1 0x9a 0x9a 0x9a 0x9a +0x2248 1 0x9a 0x9a 0x9a 0x9a +0x2249 1 0x9a 0x9a 0x9a 0x9a +0x224a 1 0x9a 0x9a 0x9a 0x9a +0x224b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x224c 1 0x9a 0x9a 0x9a 0x9a +0x224d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x224e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x224f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2250 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2251 1 0x9a 0x9a 0x9a 0x9a +0x2252 1 0x9a 0x9a 0x9a 0x9a +0x2253 1 0x9a 0x9a 0x9a 0x9a +0x2254 1 0x9a 0x9a 0x9a 0x9a +0x2255 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2256 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2257 1 0x9a 0x9a 0x9a 0x9a +0x2258 1 0x9a 0x9a 0x9a 0x9a +0x2259 1 0x9a 0x9a 0x9a 0x9a +0x225a 1 0x9a 0x9a 0x9a 0x9a +0x225b 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x225c 1 0x9a 0x9a 0x9a 0x9a +0x225d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x225e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x225f 1 0x9a 0x9a 0x9a 0x9a + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0x9a 0x9a 0x9a 0x9a +0x2301 1 0x9a 0x9a 0x9a 0x9a +0x2302 1 0x9a 0x9a 0x9a 0x9a +0x2303 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2304 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2305 1 0x9a 0x9a 0x9a 0x9a +0x2306 1 0x9a 0x9a 0x9a 0x9a +0x2307 1 0x9a 0x9a 0x9a 0x9a +0x2308 1 0x9a 0x9a 0x9a 0x9a +0x2309 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x230a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x230b 1 0x9a 0x9a 0x9a 0x9a +0x230c 1 0x9a 0x9a 0x9a 0x9a +0x230d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x230e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x230f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2310 1 0x9a 0x9a 0x9a 0x9a +0x2311 1 0x9a 0x9a 0x9a 0x9a +0x2312 1 0x9a 0x9a 0x9a 0x9a +0x2313 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2314 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2315 1 0x9a 0x9a 0x9a 0x9a +0x2316 1 0x9a 0x9a 0x9a 0x9a +0x2317 1 0x9a 0x9a 0x9a 0x9a +0x2318 1 0x9a 0x9a 0x9a 0x9a +0x2319 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x231a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x231b 1 0x9a 0x9a 0x9a 0x9a +0x231c 1 0x9a 0x9a 0x9a 0x9a +0x231d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x231e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x231f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2320 1 0x9a 0x9a 0x9a 0x9a +0x2321 1 0x9a 0x9a 0x9a 0x9a +0x2322 1 0x9a 0x9a 0x9a 0x9a +0x2323 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2324 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2325 1 0x9a 0x9a 0x9a 0x9a +0x2326 1 0x9a 0x9a 0x9a 0x9a +0x2327 1 0x9a 0x9a 0x9a 0x9a +0x2328 1 0x9a 0x9a 0x9a 0x9a +0x2329 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x232a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x232b 1 0x9a 0x9a 0x9a 0x9a +0x232c 1 0x9a 0x9a 0x9a 0x9a +0x232d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x232e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x232f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2330 1 0x9a 0x9a 0x9a 0x9a +0x2331 1 0x9a 0x9a 0x9a 0x9a +0x2332 1 0x9a 0x9a 0x9a 0x9a +0x2333 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2334 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2335 1 0x9a 0x9a 0x9a 0x9a +0x2336 1 0x9a 0x9a 0x9a 0x9a +0x2337 1 0x9a 0x9a 0x9a 0x9a +0x2338 1 0x9a 0x9a 0x9a 0x9a +0x2339 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x233a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x233b 1 0x9a 0x9a 0x9a 0x9a +0x233c 1 0x9a 0x9a 0x9a 0x9a +0x233d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x233e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x233f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2340 1 0x9a 0x9a 0x9a 0x9a +0x2341 1 0x9a 0x9a 0x9a 0x9a +0x2342 1 0x9a 0x9a 0x9a 0x9a +0x2343 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2344 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2345 1 0x9a 0x9a 0x9a 0x9a +0x2346 1 0x9a 0x9a 0x9a 0x9a +0x2347 1 0x9a 0x9a 0x9a 0x9a +0x2348 1 0x9a 0x9a 0x9a 0x9a +0x2349 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x234a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x234b 1 0x9a 0x9a 0x9a 0x9a +0x234c 1 0x9a 0x9a 0x9a 0x9a +0x234d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x234e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x234f 1 0x9a 0x9a 0x9a 0x9a +######################################################################## +0x2350 1 0x9a 0x9a 0x9a 0x9a +0x2351 1 0x9a 0x9a 0x9a 0x9a +0x2352 1 0x9a 0x9a 0x9a 0x9a +0x2353 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2354 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x2355 1 0x9a 0x9a 0x9a 0x9a +0x2356 1 0x9a 0x9a 0x9a 0x9a +0x2357 1 0x9a 0x9a 0x9a 0x9a +0x2358 1 0x9a 0x9a 0x9a 0x9a +0x2359 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x235a 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x235b 1 0x9a 0x9a 0x9a 0x9a +0x235c 1 0x9a 0x9a 0x9a 0x9a +0x235d 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x235e 2 0x9a 0x9a 0x9a 0x9a 0x9a 0x9a +0x235f 1 0x9a 0x9a 0x9a 0x9a diff --git a/mdc/thresholds/register_thresholds_a5.db b/mdc/thresholds/register_thresholds_a5.db new file mode 100644 index 0000000..7060840 --- /dev/null +++ b/mdc/thresholds/register_thresholds_a5.db @@ -0,0 +1,422 @@ +#!Comment Text to write on stdout logfilecfrt +# Standard Thresholds (8bit each) for OEP +# Unused thresholds are empty +# Type 1 boards: Write thresholds to register 0xA049 0xae4B 0xae4D 0xae4F + # Type 2 boards: Write thresholds to register 0xaeCD 0xaeCF 0xaeD1 0xaeD3 0xaeD5 0xaeD7 +# I'm using the 0x prefix to make replacing settings automatically easier + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 +################################################################ + 1 0xae49 0xae4B 0xae4D 0xae4F + 2 0xA0CD 0xaeCF 0xaeD1 0xaeD3 0xaeD5 0xaeD7 + + +!Value table +#Plane 1 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2000 1 0xae 0xae 0xae 0xae +0x2001 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2002 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2003 1 0xae 0xae 0xae 0xae +0x2004 1 0xae 0xae 0xae 0xae +0x2005 1 0xae 0xae 0xae 0xae +0x2006 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2007 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2008 1 0xae 0xae 0xae 0xae +0x2009 1 0xae 0xae 0xae 0xae +0x200a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x200b 1 0xae 0xae 0xae 0xae +0x200c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x200d 1 0xae 0xae 0xae 0xae +######################################################################## +0x2010 1 0xae 0xae 0xae 0xae +0x2011 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2012 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2013 1 0xae 0xae 0xae 0xae +0x2014 1 0xae 0xae 0xae 0xae +0x2015 1 0xae 0xae 0xae 0xae +0x2016 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2017 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2018 1 0xae 0xae 0xae 0xae +0x2019 1 0xae 0xae 0xae 0xae +0x201a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x201b 1 0xae 0xae 0xae 0xae +0x201c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x201d 1 0xae 0xae 0xae 0xae +######################################################################## +0x2020 1 0xae 0xae 0xae 0xae +0x2021 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2022 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2023 1 0xae 0xae 0xae 0xae +0x2024 1 0xae 0xae 0xae 0xae +0x2025 1 0xae 0xae 0xae 0xae +0x2026 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2027 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2028 1 0xae 0xae 0xae 0xae +0x2029 1 0xae 0xae 0xae 0xae +0x202a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x202b 1 0xae 0xae 0xae 0xae +0x202c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x202d 1 0xae 0xae 0xae 0xae +######################################################################## +0x2030 1 0xae 0xae 0xae 0xae +0x2031 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2032 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2033 1 0xae 0xae 0xae 0xae +0x2034 1 0xae 0xae 0xae 0xae +0x2035 1 0xae 0xae 0xae 0xae +0x2036 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2037 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2038 1 0xae 0xae 0xae 0xae +0x2039 1 0xae 0xae 0xae 0xae +0x203a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x203b 1 0xae 0xae 0xae 0xae +0x203c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x203d 1 0xae 0xae 0xae 0xae +######################################################################## +0x2040 1 0xae 0xae 0xae 0xae +0x2041 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2042 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2043 1 0xae 0xae 0xae 0xae +0x2044 1 0xae 0xae 0xae 0xae +0x2045 1 0xae 0xae 0xae 0xae +0x2046 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2047 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2048 1 0xae 0xae 0xae 0xae +0x2049 1 0xae 0xae 0xae 0xae +0x204a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x204b 1 0xae 0xae 0xae 0xae +0x204c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x204d 1 0xae 0xae 0xae 0xae +######################################################################## +0x2050 1 0xae 0xae 0xae 0xae +0x2051 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2052 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2053 1 0xae 0xae 0xae 0xae +0x2054 1 0xae 0xae 0xae 0xae +0x2055 1 0xae 0xae 0xae 0xae +0x2056 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2057 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2058 1 0xae 0xae 0xae 0xae +0x2059 1 0xae 0xae 0xae 0xae +0x205a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x205b 1 0xae 0xae 0xae 0xae +0x205c 2 0xae 0xae 0xae 0xae 0xae 0xae +0x205d 1 0xae 0xae 0xae 0xae + +#Plane 2 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2100 1 0xae 0xae 0xae 0xae +0x2101 1 0xae 0xae 0xae 0xae +0x2102 1 0xae 0xae 0xae 0xae +0x2103 1 0xae 0xae 0xae 0xae +0x2104 1 0xae 0xae 0xae 0xae +0x2105 1 0xae 0xae 0xae 0xae +0x2106 1 0xae 0xae 0xae 0xae +0x2107 1 0xae 0xae 0xae 0xae +0x2108 1 0xae 0xae 0xae 0xae +0x2109 1 0xae 0xae 0xae 0xae +0x210a 1 0xae 0xae 0xae 0xae +0x210b 1 0xae 0xae 0xae 0xae +0x210c 1 0xae 0xae 0xae 0xae +0x210d 1 0xae 0xae 0xae 0xae +0x210e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x210f 2 0xae 0xae 0xae 0xae 0xae 0xae +######################################################################## +0x2110 1 0xae 0xae 0xae 0xae +0x2111 1 0xae 0xae 0xae 0xae +0x2112 1 0xae 0xae 0xae 0xae +0x2113 1 0xae 0xae 0xae 0xae +0x2114 1 0xae 0xae 0xae 0xae +0x2115 1 0xae 0xae 0xae 0xae +0x2116 1 0xae 0xae 0xae 0xae +0x2117 1 0xae 0xae 0xae 0xae +0x2118 1 0xae 0xae 0xae 0xae +0x2119 1 0xae 0xae 0xae 0xae +0x211a 1 0xae 0xae 0xae 0xae +0x211b 1 0xae 0xae 0xae 0xae +0x211c 1 0xae 0xae 0xae 0xae +0x211d 1 0xae 0xae 0xae 0xae +0x211e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x211f 2 0xae 0xae 0xae 0xae 0xae 0xae +######################################################################## +0x2120 1 0xae 0xae 0xae 0xae +0x2121 1 0xae 0xae 0xae 0xae +0x2122 1 0xae 0xae 0xae 0xae +0x2123 1 0xae 0xae 0xae 0xae +0x2124 1 0xae 0xae 0xae 0xae +0x2125 1 0xae 0xae 0xae 0xae +0x2126 1 0xae 0xae 0xae 0xae +0x2127 1 0xae 0xae 0xae 0xae +0x2128 1 0xae 0xae 0xae 0xae +0x2129 1 0xae 0xae 0xae 0xae +0x212a 1 0xae 0xae 0xae 0xae +0x212b 1 0xae 0xae 0xae 0xae +0x212c 1 0xae 0xae 0xae 0xae +0x212d 1 0xae 0xae 0xae 0xae +0x212e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x212f 2 0xae 0xae 0xae 0xae 0xae 0xae +######################################################################## +0x2130 1 0xae 0xae 0xae 0xae +0x2131 1 0xae 0xae 0xae 0xae +0x2132 1 0xae 0xae 0xae 0xae +0x2133 1 0xae 0xae 0xae 0xae +0x2134 1 0xae 0xae 0xae 0xae +0x2135 1 0xae 0xae 0xae 0xae +0x2136 1 0xae 0xae 0xae 0xae +0x2137 1 0xae 0xae 0xae 0xae +0x2138 1 0xae 0xae 0xae 0xae +0x2139 1 0xae 0xae 0xae 0xae +0x213a 1 0xae 0xae 0xae 0xae +0x213b 1 0xae 0xae 0xae 0xae +0x213c 1 0xae 0xae 0xae 0xae +0x213d 1 0xae 0xae 0xae 0xae +0x213e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x213f 2 0xae 0xae 0xae 0xae 0xae 0xae +######################################################################## +0x2140 1 0xae 0xae 0xae 0xae +0x2141 1 0xae 0xae 0xae 0xae +0x2142 1 0xae 0xae 0xae 0xae +0x2143 1 0xae 0xae 0xae 0xae +0x2144 1 0xae 0xae 0xae 0xae +0x2145 1 0xae 0xae 0xae 0xae +0x2146 1 0xae 0xae 0xae 0xae +0x2147 1 0xae 0xae 0xae 0xae +0x2148 1 0xae 0xae 0xae 0xae +0x2149 1 0xae 0xae 0xae 0xae +0x214a 1 0xae 0xae 0xae 0xae +0x214b 1 0xae 0xae 0xae 0xae +0x214c 1 0xae 0xae 0xae 0xae +0x214d 1 0xae 0xae 0xae 0xae +0x214e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x214f 2 0xae 0xae 0xae 0xae 0xae 0xae +######################################################################## +0x2150 1 0xae 0xae 0xae 0xae +0x2151 1 0xae 0xae 0xae 0xae +0x2152 1 0xae 0xae 0xae 0xae +0x2153 1 0xae 0xae 0xae 0xae +0x2154 1 0xae 0xae 0xae 0xae +0x2155 1 0xae 0xae 0xae 0xae +0x2156 1 0xae 0xae 0xae 0xae +0x2157 1 0xae 0xae 0xae 0xae +0x2158 1 0xae 0xae 0xae 0xae +0x2159 1 0xae 0xae 0xae 0xae +0x215a 1 0xae 0xae 0xae 0xae +0x215b 1 0xae 0xae 0xae 0xae +0x215c 1 0xae 0xae 0xae 0xae +0x215d 1 0xae 0xae 0xae 0xae +0x215e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x215f 2 0xae 0xae 0xae 0xae 0xae 0xae + +#Plane 3 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2200 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2201 1 0xae 0xae 0xae 0xae +0x2202 1 0xae 0xae 0xae 0xae +0x2203 1 0xae 0xae 0xae 0xae +0x2204 1 0xae 0xae 0xae 0xae +0x2205 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2206 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2207 1 0xae 0xae 0xae 0xae +0x2208 1 0xae 0xae 0xae 0xae +0x2209 1 0xae 0xae 0xae 0xae +0x220a 1 0xae 0xae 0xae 0xae +0x220b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x220c 1 0xae 0xae 0xae 0xae +0x220d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x220e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x220f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2210 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2211 1 0xae 0xae 0xae 0xae +0x2212 1 0xae 0xae 0xae 0xae +0x2213 1 0xae 0xae 0xae 0xae +0x2214 1 0xae 0xae 0xae 0xae +0x2215 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2216 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2217 1 0xae 0xae 0xae 0xae +0x2218 1 0xae 0xae 0xae 0xae +0x2219 1 0xae 0xae 0xae 0xae +0x221a 1 0xae 0xae 0xae 0xae +0x221b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x221c 1 0xae 0xae 0xae 0xae +0x221d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x221e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x221f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2220 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2221 1 0xae 0xae 0xae 0xae +0x2222 1 0xae 0xae 0xae 0xae +0x2223 1 0xae 0xae 0xae 0xae +0x2224 1 0xae 0xae 0xae 0xae +0x2225 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2226 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2227 1 0xae 0xae 0xae 0xae +0x2228 1 0xae 0xae 0xae 0xae +0x2229 1 0xae 0xae 0xae 0xae +0x222a 1 0xae 0xae 0xae 0xae +0x222b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x222c 1 0xae 0xae 0xae 0xae +0x222d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x222e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x222f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2230 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2231 1 0xae 0xae 0xae 0xae +0x2232 1 0xae 0xae 0xae 0xae +0x2233 1 0xae 0xae 0xae 0xae +0x2234 1 0xae 0xae 0xae 0xae +0x2235 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2236 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2237 1 0xae 0xae 0xae 0xae +0x2238 1 0xae 0xae 0xae 0xae +0x2239 1 0xae 0xae 0xae 0xae +0x223a 1 0xae 0xae 0xae 0xae +0x223b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x223c 1 0xae 0xae 0xae 0xae +0x223d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x223e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x223f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2240 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2241 1 0xae 0xae 0xae 0xae +0x2242 1 0xae 0xae 0xae 0xae +0x2243 1 0xae 0xae 0xae 0xae +0x2244 1 0xae 0xae 0xae 0xae +0x2245 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2246 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2247 1 0xae 0xae 0xae 0xae +0x2248 1 0xae 0xae 0xae 0xae +0x2249 1 0xae 0xae 0xae 0xae +0x224a 1 0xae 0xae 0xae 0xae +0x224b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x224c 1 0xae 0xae 0xae 0xae +0x224d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x224e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x224f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2250 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2251 1 0xae 0xae 0xae 0xae +0x2252 1 0xae 0xae 0xae 0xae +0x2253 1 0xae 0xae 0xae 0xae +0x2254 1 0xae 0xae 0xae 0xae +0x2255 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2256 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2257 1 0xae 0xae 0xae 0xae +0x2258 1 0xae 0xae 0xae 0xae +0x2259 1 0xae 0xae 0xae 0xae +0x225a 1 0xae 0xae 0xae 0xae +0x225b 2 0xae 0xae 0xae 0xae 0xae 0xae +0x225c 1 0xae 0xae 0xae 0xae +0x225d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x225e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x225f 1 0xae 0xae 0xae 0xae + +#Plane 4 +#OEP # Type # T0 # T1 # T2 # T3 # T4 # T5 +######################################################################## +0x2300 1 0xae 0xae 0xae 0xae +0x2301 1 0xae 0xae 0xae 0xae +0x2302 1 0xae 0xae 0xae 0xae +0x2303 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2304 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2305 1 0xae 0xae 0xae 0xae +0x2306 1 0xae 0xae 0xae 0xae +0x2307 1 0xae 0xae 0xae 0xae +0x2308 1 0xae 0xae 0xae 0xae +0x2309 2 0xae 0xae 0xae 0xae 0xae 0xae +0x230a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x230b 1 0xae 0xae 0xae 0xae +0x230c 1 0xae 0xae 0xae 0xae +0x230d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x230e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x230f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2310 1 0xae 0xae 0xae 0xae +0x2311 1 0xae 0xae 0xae 0xae +0x2312 1 0xae 0xae 0xae 0xae +0x2313 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2314 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2315 1 0xae 0xae 0xae 0xae +0x2316 1 0xae 0xae 0xae 0xae +0x2317 1 0xae 0xae 0xae 0xae +0x2318 1 0xae 0xae 0xae 0xae +0x2319 2 0xae 0xae 0xae 0xae 0xae 0xae +0x231a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x231b 1 0xae 0xae 0xae 0xae +0x231c 1 0xae 0xae 0xae 0xae +0x231d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x231e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x231f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2320 1 0xae 0xae 0xae 0xae +0x2321 1 0xae 0xae 0xae 0xae +0x2322 1 0xae 0xae 0xae 0xae +0x2323 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2324 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2325 1 0xae 0xae 0xae 0xae +0x2326 1 0xae 0xae 0xae 0xae +0x2327 1 0xae 0xae 0xae 0xae +0x2328 1 0xae 0xae 0xae 0xae +0x2329 2 0xae 0xae 0xae 0xae 0xae 0xae +0x232a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x232b 1 0xae 0xae 0xae 0xae +0x232c 1 0xae 0xae 0xae 0xae +0x232d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x232e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x232f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2330 1 0xae 0xae 0xae 0xae +0x2331 1 0xae 0xae 0xae 0xae +0x2332 1 0xae 0xae 0xae 0xae +0x2333 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2334 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2335 1 0xae 0xae 0xae 0xae +0x2336 1 0xae 0xae 0xae 0xae +0x2337 1 0xae 0xae 0xae 0xae +0x2338 1 0xae 0xae 0xae 0xae +0x2339 2 0xae 0xae 0xae 0xae 0xae 0xae +0x233a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x233b 1 0xae 0xae 0xae 0xae +0x233c 1 0xae 0xae 0xae 0xae +0x233d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x233e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x233f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2340 1 0xae 0xae 0xae 0xae +0x2341 1 0xae 0xae 0xae 0xae +0x2342 1 0xae 0xae 0xae 0xae +0x2343 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2344 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2345 1 0xae 0xae 0xae 0xae +0x2346 1 0xae 0xae 0xae 0xae +0x2347 1 0xae 0xae 0xae 0xae +0x2348 1 0xae 0xae 0xae 0xae +0x2349 2 0xae 0xae 0xae 0xae 0xae 0xae +0x234a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x234b 1 0xae 0xae 0xae 0xae +0x234c 1 0xae 0xae 0xae 0xae +0x234d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x234e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x234f 1 0xae 0xae 0xae 0xae +######################################################################## +0x2350 1 0xae 0xae 0xae 0xae +0x2351 1 0xae 0xae 0xae 0xae +0x2352 1 0xae 0xae 0xae 0xae +0x2353 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2354 2 0xae 0xae 0xae 0xae 0xae 0xae +0x2355 1 0xae 0xae 0xae 0xae +0x2356 1 0xae 0xae 0xae 0xae +0x2357 1 0xae 0xae 0xae 0xae +0x2358 1 0xae 0xae 0xae 0xae +0x2359 2 0xae 0xae 0xae 0xae 0xae 0xae +0x235a 2 0xae 0xae 0xae 0xae 0xae 0xae +0x235b 1 0xae 0xae 0xae 0xae +0x235c 1 0xae 0xae 0xae 0xae +0x235d 2 0xae 0xae 0xae 0xae 0xae 0xae +0x235e 2 0xae 0xae 0xae 0xae 0xae 0xae +0x235f 1 0xae 0xae 0xae 0xae diff --git a/mdc/thresholds/register_thresholds_jul14.db b/mdc/thresholds/register_thresholds_jul14.db index 5a87582..95ae3da 100644 --- a/mdc/thresholds/register_thresholds_jul14.db +++ b/mdc/thresholds/register_thresholds_jul14.db @@ -13,7 +13,7 @@ !Version table -1070 +1114 !Value table @@ -369,7 +369,7 @@ 0x2327 1 0x60 0x60 0x60 0x5e 0x2328 1 0x5c 0x5e 0x60 0x60 0x2329 2 0x60 0x60 0x5e 0x60 0x62 0x5e -0x232a 2 0x66 0x62 0x68 0x6a 0x5e 0x60 +0x232a 2 0x66 0x62 0x70 0x72 0x5e 0x60 0x232b 1 0x60 0x66 0x6e 0x66 0x232c 1 0x60 0x5a 0x5c 0x5e 0x232d 2 0x5c 0x60 0x60 0x60 0x5c 0x5e diff --git a/mdc/tools/LV_powercycle231x.sh b/mdc/tools/LV_powercycle231x.sh new file mode 100644 index 0000000..5e2a8c9 --- /dev/null +++ b/mdc/tools/LV_powercycle231x.sh @@ -0,0 +1,3 @@ +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 3'" +sleep 5 +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 1'" diff --git a/mdc/tools/LV_turn_off_all.sh b/mdc/tools/LV_turn_off_all.sh new file mode 100755 index 0000000..2c5719e --- /dev/null +++ b/mdc/tools/LV_turn_off_all.sh @@ -0,0 +1,5 @@ +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 1'" +sleep 2 +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 2'" +sleep 2 +command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3'" diff --git a/mdc/tools/turn_MDC_PS_on.sh b/mdc/tools/turn_MDC_PS_on.sh new file mode 100755 index 0000000..a7ae411 --- /dev/null +++ b/mdc/tools/turn_MDC_PS_on.sh @@ -0,0 +1,11 @@ + +#for item in $(echo 003 005 008 013 014 015); do +for item in $(echo 003 005 012 013 014 015); do +~/trbsoft/daqtools/web/htdocs/tools/vxi/vxi11_cmd hadps$item 'OUTPUT:STAT ON' & +echo -e -n "\npower status of hadps$item: " $(sleep 1 && ~/trbsoft/daqtools/web/htdocs/tools/vxi/vxi11_cmd hadps$item 'OUTPUT:STAT?')& + +done +sleep 2 +echo + + diff --git a/nettools/Perl2Epics.pm b/nettools/Perl2Epics.pm index 6ad4701..9289531 100644 --- a/nettools/Perl2Epics.pm +++ b/nettools/Perl2Epics.pm @@ -4,7 +4,7 @@ use strict; use Data::Dumper; # use Hmon; -use lib '/home/scs/EPICS/gcc-4.4/EPICS-3.14.12.2_linux-x86_64/base/' . '/lib/perl'; +use lib '/home/scs/EPICS/EPICS-3.14.12.4/base/' . '/lib/perl'; use CA; $ENV{EPICS_CA_AUTO_ADDR_LIST} = 'YES'; @@ -79,7 +79,7 @@ sub GetAll { my $ca = $EpicsStore->{$varname}->{ca}; my $r = $ca->is_connected() if(defined $ca); my $success = 1; - if(!$r && (!defined $errcnt->{$el} || $errcnt->{$el} < 20)) { + if(!$r && (!defined $errcnt->{$el} || $errcnt->{$el} < 2000)) { $success = Connect($el, $varname); $errcnt->{$el}++; } diff --git a/nettools/hadplot b/nettools/hadplot deleted file mode 100755 index d1e9277..0000000 --- a/nettools/hadplot +++ /dev/null @@ -1,1455 +0,0 @@ -#!/usr/bin/perl -w -use warnings; - -use FileHandle; -use Time::HiRes qw( gettimeofday usleep time ); -use Getopt::Long; -use Data::Dumper; -use POSIX qw/floor strftime/; - -use constant AXISISTIME => 1; -use constant AXISISNOTIME => 0; -use constant DIFFY => 1; -use constant DIFFX => 1; -use constant NODIFFY => 0; -use constant NODIFFX => 0; -use constant NODELAY => 0; -use constant NO => 0; -use constant YES => 1; -use constant NONEWLINE => 1; - -my $GPbuffer = ""; -my $buffercount = 0; - -my $windowtitle = ""; #Global var to store real name of GUI window - -my $PlotBuffer = {}; -my $PlotBufferCnt = 0; - -my @PlotBufArr = (); - -#my @color = ("#1155bb","#bb1111","#999900","#660000","#006633","#990066","#6633CC","#00CCCC"); -my @color = ("#2222dd","#880000","#00cc00","#ee00dd","#ffcc00","#00cc88","#6633CC","#00CCCC"); -our $write2file = ""; -our $plotendedbefore = 0; - - - -################################################# -# Variables... -################################################# -my $delay = 1000; -my $samples = 100; -my $downscale = 1; -# my $system = 0; -my $address = []; -my $register = []; -my $regoffset = []; -my $regwidth = []; -my $title = []; -my $timeref = []; -my $geom = "700x400"; -my $style = 0; -my $nametmp = ""; -my $regamount = []; -my $xscale = []; -my $yscale = []; -my $xtitle = ""; -my $ytitle = ""; -my $windowname = "No Name"; -my $xistime = AXISISNOTIME; -my $xoverflow = []; -my $yoverflow = []; -my $ydiff = 0; -my $outputcfg = ""; -my $name = "HadPlot"; -my $key ; -my $curvestyle= 'points'; #points, steps, histo or histostacked -my $xticks = 0; #show labels on x-axis -my $yticks = 1; #show labels on y-axis -my $plotoption= ""; #string with additional gnuplot commands -my $curveoption= []; #options for plot command -my $xgrid = 1; -my $ygrid = 1; -my $ymax; -my $ymin; -my $xmin; -my $xmax; - -GetOptions('d=i' => \$delay, - 'n=i' => \$samples, - 'o=i' => \$downscale, - 'a=s' => $address, - 'r=s' => $register, - 'w=i' => $regwidth, - 'p=i' => $regoffset, - 't=s' => $title, - 'm=i' => $regamount, - 'g=s' => \$geom, - 'z=i' => \$style, - 'output=s' => \$outputcfg, - 'windowname=s' => \$windowname, - 'xscale=f' => $xscale, - 'yscale=f' => $yscale, - 'xtitle=s' => \$xtitle, - 'ytitle=s' => \$ytitle, - 'xistime!' => \$xistime, - 'timeref=s' => $timeref, - 'xoverflow=f' => $xoverflow, - 'yoverflow=f' => $yoverflow, - 'ydiff!' => \$ydiff, - 'name=s' => \$name, - 'key!' => \$key, - 'xticks!' => \$xticks, - 'yticks!' => \$yticks, - 'xgrid!' => \$xgrid, - 'ygrid!' => \$ygrid, - 'ymax=i' => \$ymax, - 'ymin=i' => \$ymin, - 'xmax=i' => \$xmax, - 'xmin=i' => \$xmin, - 'curvestyle=s' => \$curvestyle, - 'curveoption=s'=> $curveoption, - 'plotoption=s' => \$plotoption - ); - -for(my $i=0;$i<16;$i++) { - $regoffset->[$i] = 0 unless defined $regoffset->[$i]; - $regwidth->[$i] = 32 unless defined $regwidth->[$i]; - $xoverflow->[$i] = 2**20 unless defined $xoverflow->[$i]; - $yoverflow->[$i] = 2**32 unless defined $yoverflow->[$i]; - $xscale->[$i] = 1 unless defined $xscale->[$i]; - $yscale->[$i] = 1 unless defined $yscale->[$i]; - $title->[$i] = "" unless defined $title->[$i]; - $curveoption->[$i] = "" unless defined $curveoption->[$i]; - } - -for(my $i=0;$i < scalar @{$address};$i++) { - if(!defined($title->[$i])) { - $title->[$i] = hex($address->[$i])." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1); - } - } - - -$delay *= 1000; -if($style == 1) {$curvestyle="points"; $xticks=1;} -if($style == 2) {$curvestyle="histo"; $xticks=0;} -if($style == 3) {$curvestyle="histo"; $xticks=1;} -if($style == 4) {$curvestyle="histostacked"; $xticks=0;} -if($style == 5) {$curvestyle="histostacked"; $xticks=1;} - - - -#Open Gnuplot -our $fh; -my $fn = "gnuplot -geometry $geom -bg 'ghost white'"; -$fh = new FileHandle ("|$fn") or die "error: no gnuplot"; -$fh->autoflush(1); - - -sub makeTimeString{ - return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) - } - -################################################# -# When exiting, close Gnuplot window -################################################# -sub finish { - print $fh "exit;\n"; - close $fh; - exit; -} - -$SIG{INT} = \&finish; -$SIG{PIPE} = \&finish; - - - -my $last_wakeup; - -sub max { - my $a = shift; - my $b = shift; - return $a > $b ? $a : $b; - } - -sub min { - my $a = shift; - my $b = shift; - return $a < $b ? $a : $b; - } - -sub usleep_total { - my $delay = shift; - if(defined $last_wakeup) { - my $time = time(); -# printf "%.0f\n",$delay-($time-$last_wakeup)*1E6; - usleep(max(0,$delay-($time-$last_wakeup)*1E6)); - } - else { - usleep($delay); - } - $last_wakeup = time(); - return $last_wakeup; - } - - -################################################# -# Write to gnuplot -################################################# -sub plot_write { - my ($str,$no) = @_; - if(defined($no) && $no) { - print $fh $str; -# print $str; - } - else { - print $fh $str."\n"; -# print $str."\n"; - } - } - -sub plot_add { - my ($x,$y) = @_; - $x = $x || $PlotBufferCnt; - $PlotBufArr[$PlotBufferCnt]->{x} = $x; - $PlotBufArr[$PlotBufferCnt]->{y} = $y; - - $PlotBufferCnt++; -# $PlotBuffer->{$x} = $y; -# print $x." ".$y."\n"; - } - -sub plot_end { - my ($single) = @_; - for(my $i = 0;$i{y}."\n"; - } - else { - print $fh $PlotBufArr[$i]->{x}." ".$PlotBufArr[$i]->{y}."\n"; - } - } -# foreach my $line (sort keys %{$PlotBuffer}) { -# if($single) { -# print $fh $PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$PlotBuffer->{$line}."\n"; -# } -# else { -# print $fh $line." ".$PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$line." ".$PlotBuffer->{$line}."\n"; -# } -# } - @PlotBufArr = (); - $PlotBuffer = {}; - $PlotBufferCnt = 0; - print $fh "e\n"; - $plotendedbefore = 1 unless $plotendedbefore; - } - - -sub plot_reset { - if($write2file eq ""){ - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - #print $?."\n"; - if($? != 0) { - usleep(1E5); - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - if($? != 0) { - finish(); - } - } - if ($plotendedbefore != 0) { - $plotendedbefore = 0; -# my $datestring = makeTimeString(); - print $fh makeTimeString(); - print $fh "replot\n"; - } - } - else { - if ($plotendedbefore != 0) { - system("mv $write2file.tmp $write2file"); - plot_write("set out \"$write2file.tmp\"\n"); - $plotendedbefore = 0; -# my $datestring = makeTimeString(); - print $fh makeTimeString(); - print $fh "replot\n"; - -# print "reset\n"; - } - } - } - -sub plot_finished { - my ($store) = @_; - if($write2file ne "") { - if(defined $store) { - if($store->{"initing"} != 2 and $store->{"iteration"} % $store->{"downscale"} == 0) { -# system("mv $write2file.tmp $write2file"); - } - } - else { - if($write2file ne "") { -# system("mv $write2file.tmp $write2file"); - } - } - } - } - -sub plot_init { - my ($xtics) = @_; - $windowtitle = $name ." - ".$windowname; - if ($outputcfg =~ m$PNG.([/\w]*).(\d+).(\d+)$) { - print "Writing PNG to file $1\n"; - $write2file = $1.".png"; - plot_write("set term png size $2,$3 font \"monospace,8\""); - plot_write("set out \"$write2file.tmp\""); - } - elsif ($outputcfg =~ m$SVG.([/\w]*).(\d+).(\d+)$) { - print "Writing SVG to file $1\n"; - $write2file = $1.".svg"; - plot_write("set term svg size ".($2*2).",".($3*2)." dynamic font \"monospace,18\" lw 1.5 \n"); - plot_write("set out \"$write2file.tmp\"\n"); - } - else { - plot_write("set term x11 title '$windowtitle'"); - } - plot_write("set grid"); - plot_write("set xlabel \"$xtitle\""); - plot_write("set ylabel \"$ytitle\""); - - plot_write(makeTimeString()); - - if(defined $xtics) { - plot_write("set xtics $xtics\n"); - } - if(defined $xmin && defined $xmax) { - plot_write("set xrange [$xmin:$xmax]"); - } - if(defined $ymin && defined $ymax) { - plot_write("set yrange [$ymin:$ymax]"); - } - elsif(defined $ymax) { - plot_write("set yrange [:$ymax]"); - } - elsif(defined $ymin) { - plot_write("set yrange [$ymin:]"); - } - if (!defined $key || $key == 0) { - plot_write("unset key"); - } - if($xgrid == 0) { - plot_write("set grid noxtics"); - } - if($ygrid == 0) { - plot_write("set grid noytics"); - } - if($plotoption ne "") { - plot_write($plotoption); - } - } - -sub plot_sleep { - my ($delay) = @_; - my $t = usleep_total($delay); - plot_reset(); - return $t; - } - -sub plot_end_sleep { - my ($delay,$single) = @_; - plot_end($single); - return plot_sleep($delay); - } - -sub plot_storage_end_sleep { - my ($store, $single) = @_; - my $delay = $store->{"delay"}; - my $t; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end($single); - $t = usleep_total($delay); - plot_reset(); - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_sleep { - my ($store,$noreset) = @_; - my $t; - my $delay = $store->{"delay"}; - #print $store->{"initing"}.$store->{"iteration"}.$store->{"downscale"}."\n"; - if($store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - $t = usleep_total($delay); - plot_storage_reset() unless $noreset; - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_reset { - my ($store) = @_; - if(defined $store->{"initing"} && $store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_reset(); - } - } - } - -sub plot_storage_end { - my ($store) = @_; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end(); - } - } - } - -################################################# -# Writes a new value pair to storage -################################################# -sub store_push { - my ($storage,$x,$y,$divtime) = @_; - my $xval = $x; - my $yval = $y; - my $curtime = time(); - - if ($storage->{"initing"} != 2) { - if (scalar(@{$storage->{"datax"}}) == $storage->{"size"}) { - my $tmp = shift(@{$storage->{"datax"}}); - my $tmpy = shift(@{$storage->{"datay"}}); - $storage->{"totalx"} -= $tmp; -# if($storage->{"initing"} == 0 && (($tmpy <= $storage->{"miny"}) || ($tmpy >= $storage->{"maxy"}))) { -# store_calc_range($storage); -# } - } - if($storage->{"diffx"}) { - if(defined($storage->{"xmax"}) && $x < $storage->{"lastx"}) { - $xval = ($x - $storage->{"lastx"} + $storage->{"xmax"}); - } - else { - $xval = ($x - $storage->{"lastx"}); - } - if(defined($storage->{"last_push"}) && $storage->{"last_push"} != 0) { - while (floor($xval/$storage->{"xmax"}) < floor(($curtime - $storage->{"last_push"})/($storage->{"xmax"}/1E6))){ - $xval += $storage->{"xmax"}; - } - } - } - if($storage->{"diffy"}) { - $yval = $y - $storage->{"lasty"}; - if(defined($storage->{"ymax"}) && $y < $storage->{"lasty"}) { - while($yval < 0) { - $yval += $storage->{"ymax"}; - } - } - if($divtime) { - $yval /= ($xval?$xval:1)/1000000; - } - } - - - if($storage->{"initing"} == 1) { - $storage->{"initing"} = 0; - for(my $i = $storage->{"size"}-1; $i>0; $i--) { - push(@{$storage->{"datax"}},$storage->{"delay"}); - push(@{$storage->{"datay"}},$yval); - $storage->{"totalx"} += $storage->{"delay"}; - } - } - - push(@{$storage->{"datax"}},$xval?$xval:0); - push(@{$storage->{"datay"}},$yval?$yval:0); - $storage->{"totalx"} += $xval?$xval:0; - } - else { - $storage->{"initing"} = 1; - } - - $storage->{"last_push"} = $curtime; - $storage->{"lasty"} = $y; - $storage->{"lastx"} = $x; - } - -################################################# -# Writes storage contents to stream -################################################# -sub store_print { - my $str = ""; - my ($storage) = @_; - if($storage->{"initing"} != 2) { - if($storage->{"iteration"} % $storage->{"downscale"} == 0) { - my $xcnt = - $storage->{"totalx"} /1000000.0; - for (my $i = 0; $i < $storage->{"size"}; $i++) { - my $xval = $storage->{"datax"}->[$i]; #${}[] - my $yval = $storage->{"datay"}->[$i]; - $xval = 0 unless defined($xval); - $yval = 0 unless defined($yval); - $xcnt += $xval/1000000.0; -# $str .= $xcnt." ".$yval."\n"; - $str .= sprintf "%.3f %.2f\n", $xcnt,$yval; - #plot_write($xcnt/1000000.0." ".$yval); - } - plot_write($str,1); -# print $str; - plot_end(1); - } - $storage->{"iteration"}++; - } - } - - -################################################# -# Initialize storage -################################################# -sub store_init { - my ($storage,$size,$diffx,$diffy,$delay,$downscale,$xmax,$ymax) = @_; - - $storage->{"datax"} = []; - $storage->{"datay"} = []; - $storage->{"size"} = $size; - $storage->{"diffx"} = $diffx; - $storage->{"diffy"} = $diffy; - $storage->{"delay"} = $delay; - $storage->{"downscale"} = $downscale; - $storage->{"initing"} = 2; - $storage->{"iteration"} = 0; - $storage->{"totalx"} = 0; - $storage->{"xmax"} = $xmax; - $storage->{"ymax"} = $ymax; - $storage->{"maxy"} = 0; - $storage->{"miny"} = 1E100; - $storage->{"last_push"} = 0; - $storage->{"last_sleep"} = 0; - } - -################################################# -# Help Message -################################################# -sub help { - print <[$i])) || ($title->[$i] eq "")) { -# $title->[$i] = hex($address->[$i])." ".$register->[$i]." ".$regoff->[$i]."..".($regoff->[$i]+$regwidth->[$i]-1); -# } - if (!(defined $regamount->[$i])) { - $regamount->[$i] = 1; - } - } - $ymin = $regoff->[0]; - $ymax = $regoff->[0]+$regwidth->[0]; - plot_init(256); -# if ($style == 0) { -# plot_write("plot",1); -# for(my $i = 0; $i[$i]\" ",1); -# plot_write(", ",1) unless $i == scalar(@{$address})-1; -# } -# plot_write(""); -# } -# elsif($style == 1) { - plot_write("set xtics rotate by 90 offset .7,-2 scale 0 "); - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 1 absolute"); - plot_write("unset key"); - plot_write('set format x "%x"'); - plot_write("plot ",1); - for(my $i = 0; $i[$i]\" ",1); #using 2:xticlabels(1) - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); -# } - while(1) { - for(my $i = 0; $i[$i] == 1) { - $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - } - else { - $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - } - my @out = qx($c); - my $addr = undef; - my $cnt = 0; - foreach my $s (@out) { - if($s =~ /^H:\s*0x(\w\w\w\w)/) { - $addr = $1; - } - if($s =~ /^0x(\w\w\w\w)\s*0x(\w{8})/) { - $addr = hex($1) if($regamount->[$i] == 1); - if ($regamount->[$i] == 1) { plot_add($addr,-1); } - else { plot_add("\"$addr.$1\"",-1); } - for(my $j = $regoff->[$i]; $j < $regoff->[$i] + $regwidth->[$i];$j++) { - if(hex($2) & (1<<$j)) { - if ($regamount->[$i] == 1) { plot_add("$addr",$j); } - else { plot_add("\"$addr.$1\"",$j); } - } - } - $cnt++; - } - } - plot_end(1); - } - plot_sleep($delay); - } - } - - - -################################################# -# Generic Register differences -################################################# -sub genreg { - my %oldvals; - - plot_init(undef); - - if($xticks) { - plot_write("set xtics rotate by 90 offset .7,-1.7 scale .7 "); - } - if($curvestyle eq "histo") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 2 absolute"); - } - elsif($curvestyle eq "histostacked") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set style histogram rowstacked"); - plot_write("set boxwidth 1 absolute"); - plot_write("set key outside") unless defined $key && $key==0; - plot_write("set autoscale xfix "); - } - - plot_write("plot",1); - for(my $i = 0; $i[$i]\" ",NONEWLINE); - } - elsif ($curvestyle eq "steps") { - plot_write("with histeps title \"$title->[$i]\" ",NONEWLINE); - } - else { - plot_write("with points pt 5 title \"$title->[$i]\" ",NONEWLINE); - } - plot_write(" ".$curveoption->[$i],NONEWLINE); - plot_write(", ",NONEWLINE) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - - while(1) { - for(my $i = 0; $i[$i]) || $regamount->[$i] == 1) { - $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - } - else { - $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - } - my @out = qx($c); - my $addr = undef; - foreach my $s (@out) { - if($s =~ /^H:\s*0x(\w\w\w\w)/) { - $addr = $1; - $cnt = -1; - } - if($s =~ /^0x(\w{4})\s*0x(\w{8})/) { - my $tmp = (hex($2)>>$regoffset->[$i])&(2**$regwidth->[$i]-1); - my $val = 0; - my $board = $1; - if(defined $addr) {$board = $addr;} - $cnt++; - my $reg = $1; - if($ydiff) { - if(defined $oldvals{$i}->{$board.$reg}) { - if ($oldvals{$i}->{$board.$reg} > $tmp) { - $val = $tmp - $oldvals{$i}->{$board.$reg} + 2**$regwidth->[$i]; - } - else { - $val = $tmp - $oldvals{$i}->{$board.$reg}; - } - } - $oldvals{$i}->{$board.$reg} = $tmp; - } - else { - $val = $tmp; - } - if($xticks) { - if (!(defined $regamount->[$i]) || $regamount->[$i] == 1) { - plot_add("\"$board\"",$val/($yscale->[$i]||1)); - } - else { - plot_add("\"$board.$reg\"",$val/($yscale->[$i]||1)); - } - } - else { - plot_add("",$val/($yscale->[$i]||1)); - } - } - } - plot_end(!$xticks); - } - plot_sleep($delay); - } - } - -################################################# -# Generic Histogram -################################################# -sub genhist { - my %storearr; - my %oldvals; -# $xtitle = "Time [s]" unless $xtitle ne ""; - plot_init(); - plot_write("set autoscale fix"); - plot_write("plot",1); - $diff = 0 unless defined($diff); - for(my $i = 0; $i[$i],$yoverflow->[$i]); - plot_write("'-' with lines title \"$title->[$i]\" ",1); - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - while(1) { - my $a, my $s, my $t; - my $val = 0 , my $time; - plot_storage_reset($storearr{0}); - for(my $i = 0; $i>($regoffset->[$i]))&(2**($regwidth->[$i])-1)); - $time = hex($t)*16; - } - } - store_push($storearr{$i},$time/$xscale->[$i],$val/($yscale->[$i]||1),AXISISTIME); - store_print($storearr{$i}); - } - plot_storage_sleep($storearr{0}); - plot_finished($storearr{0}); - } - } - -################################################# -# Deadtime histogram -################################################# -sub deadtimehist2 { - my %values, my %lastvalues, my %diffvalues; - my @keys = ("33","34","36","31","38","37","3b","35"); - my @keys2 = ("43","44","46","41","48","47","4b","45"); - my @names = ("MDC12","MDC34","TOF","RPC","RICH","SHW","Start","FW"); - my %storearr; - - if ($style != 0) { - for(my $i= 0; $i < scalar(@keys); $i++) { - $storearr{$keys[$i]} = {}; - store_init($storearr{$keys[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - for(my $i= 0; $i < scalar(@keys2); $i++) { - $storearr{$keys2[$i]} = {}; - store_init($storearr{$keys2[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - } - - plot_init(); - plot_write("set key left top Left"); - plot_write("set autoscale fix"); - plot_write("set yrange [-1:101]"); - - if ($style != 0) { - plot_write("plot ",1); - plot_write("\"-\" title \"MDC12\" with lines,",1); - plot_write("\"-\" title \"MDC34\" with lines,",1); - plot_write("\"-\" title \"TOF\" with lines,",1); - plot_write("\"-\" title \"RPC\" with lines,",1); - plot_write("\"-\" title \"RICH\" with lines,",1); - plot_write("\"-\" title \"SHW\" with lines,",1); - plot_write("\"-\" title \"Start\" with lines,",1); - plot_write("\"-\" title \"FW\" with lines"); - } - else { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set grid noxtics ytics"); - plot_write("set boxwidth 2 absolute"); - plot_write("set xtics ('MDC12' 0,'MDC34' 1,'TOF' 2, 'RPC' 3, 'RICH' 4, 'SHW' 5, 'Start' 6, 'FW' 7) offset 2,0 scale 0"); - plot_write("set style histogram title offset character 0, 0, 0"); - plot_write("set style data histograms"); - plot_write("plot \"-\" title 'incl. busy' lt rgb \"#1155bb\", \"-\" title 'excl. busy' lt rgb \"#bb1111\""); - } - my $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 31 0",$delay/1000); - if($style != 0) { - $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 12 0",$delay/1000); - } - open(FTRB, "$cmd|"); - - while(my $a = ) { - if($a =~ /^0x\w{2}(\w{2})\s*0x(\w{8})\s*0x(\w{4})/) { - $values{$1} = hex($2); - $values{"50"} = hex($3)*16; - } - if ($a eq "---\n") { - $diffvalues{"50"} = 1E6; - if (defined $lastvalues{"50"}) { - if ($values{"50"} > $lastvalues{"50"}) { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"}; - } - else { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} + 2**20; - } - } - #$diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} if defined $lastvalues{"50"}; - my $time = $diffvalues{"50"}; - foreach my $key (keys %values) { - next unless hex($key)<0x50; - $diffvalues{$key} = 0; - if (defined $lastvalues{$key}) { - if ($values{$key} >= $lastvalues{$key}) { - $diffvalues{$key} = $values{$key} - $lastvalues{$key}; - } - else { - $diffvalues{$key} = $values{$key} - $lastvalues{$key} + 2**32; - } - } - $diffvalues{$key} /= $time if $time; - #print $key." ".$values{$key}." ".$lastvalues{$key}." ".$diffvalues{$key}."\n"; - } - #print "=====\n"; - $diffvalues{"31"} = max($diffvalues{"31"},$diffvalues{"32"}); - $diffvalues{"38"} = max(max($diffvalues{"38"},$diffvalues{"39"}),$diffvalues{"3a"}); - if ($style == 0) { - $diffvalues{"41"} = max($diffvalues{"41"},$diffvalues{"42"}); - $diffvalues{"48"} = max(max($diffvalues{"48"},$diffvalues{"49"}),$diffvalues{"4a"}); - } - %lastvalues = %values; - if($style != 0) { - plot_storage_reset($storearr{$keys[0]}); - for(my $i= 0; $i < scalar(@keys); $i++) { - store_push($storearr{$keys[$i]},$time,$diffvalues{$keys[$i]},0); - store_print($storearr{$keys[$i]}); - } - plot_storage_sleep($storearr{$keys[0]},1); - plot_finished($storearr{$keys[0]}); - } - else { - plot_reset(); - for(my $i= 0; $i < scalar(@keys); $i++) { - plot_add("",$diffvalues{$keys[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - for(my $i= 0; $i < scalar(@keys2); $i++) { - plot_add("",$diffvalues{$keys2[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - plot_finished(); - } - } - } - } - - -################################################# -# Select Operation -################################################# - -if(!(defined $ARGV[0]) || $ARGV[0] =~ /help/) {help(); exit;} - -if($ARGV[0] =~ /oep5V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8010,0x8011]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5.8V input","5V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3.3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8012,0x8013]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["3.8V input","3.3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep1.2V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8014,0x8015]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["1.8V input","1.2V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8016,0x8017]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V input","-3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxp3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801e,0x801e]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V minimum","+3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxn3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801f,0x801f]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["-3V minimum","-3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmax5Vin/) { - $address = [0xfffd,0xfffd,0xfffd]; - $register = [0x8018,0x8018,0x8010]; - $regwidth = [12,12,12]; - $regoffset = [0,16,0]; - $yscale = [.5,.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5Vin minimum","5Vin maximum","5Vin"]; - genreg(); - } - -if($ARGV[0] =~ /oeptemp/) { - oeptemp(($delay)?$delay:5000000,[$name." - OEP Temperature"]); - } - - -if($ARGV[0] =~ /rpcdatarate/) { - $delay = 1000000 unless $delay; - $xticks = 1 ; - $xtitle = "Sender ((Sector mod 3)*4+TRB)"; - $ytitle = "Data Words /1024"; - $windowname = "Data Words sent by RPC"; - $curvestyle = "histo"; - $key = YES; - $ydiff = DIFFY; - $ymin = 0; - $yscale = [512,512]; - $address = [0x8401,0x8411]; - $register = [0x4001,0x4001]; - $regamount = [12,12]; - $title = ["Sector 0,1,2","Sector 3,4,5"]; - $regoffset = [0,0]; - $regwidth = [32,32]; - genreg(); - } - -#hadplot -a 2 -r 1 -p 0 -w 16 -d 5 -o 200 -n 1000 -yoverflow 65536 genhistdiff - -if($ARGV[0] =~ /eventratehighres/) { - $delay = 5000 ; #unless $delay; - $samples = 1000; # unless $samples; - $downscale = 200;# unless $downscale; -# $style = 0 unless $style; - $windowname = "Eventrate High Resolution"; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $title = ["Event rate"]; - $address = [0x2]; - $register = [0x1]; - $regoffset = [0]; - $regwidth = [16]; - $yoverflow = [65536]; - genhist(); - } - - -if($ARGV[0] =~ /eventrate/) { - $address = [0x2]; - $register = [0x1]; - $regwidth = [16]; - $regoffset = [0]; - $timeref = [0x2]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 10 unless $downscale; - $windowname = "Event rate history"; - $key = NO; - $ytitle = "Event rate [Hz]" if $ytitle eq ""; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**16] unless $yoverflow->[0] != 2**32; - genhist(); - } - -if($ARGV[0] =~ /datarate/) { - $address = [0xff7f]; - $register = [0x83f3]; - $regwidth = [32]; - $regoffset = [0]; - $timeref = [0x8000]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 5 unless $downscale; - $windowname = "Total data rate history"; - $xtitle = "Time [s]" unless defined $xtitle; - $ytitle = "Data rate [MiByte]" unless defined $ytitle; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**12]; - $yscale = [2**20]; - $key = NO; - genhist(); - } - -if($ARGV[0] =~ /busytime/) { - $delay = 100000 unless $delay; - $samples = 100 unless $samples; - $downscale = 5 unless $downscale; - $style = 1; - $windowname = "Busytime history"; - deadtimehist2(); - } - -if($ARGV[0] =~ /busy/) { - $delay = 100000 unless $delay; - $style = 0; - $windowname = "Busy time"; - deadtimehist2(); - } - -if($ARGV[0] =~ /oepspikehist/) { - $delay = 100000 unless $delay; - $samples = 1000 unless $samples; - $downscale = 10 unless $downscale; -# $style = 0 unless $style; - $windowname = "OEP CMS Spikes"; - $ydiff = DIFFY; - $title = ["OEP CMS Spikes"]; - $address = [0xfffd]; - $register = [7]; - $regoffset = [0]; - $regwidth = [16]; - genhist(); - } - -if($ARGV[0] =~ /oepretrhist/) { - $delay = 500000 unless $delay; - $samples = 600 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Retransmissions"; - $ydiff = DIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genhist(); - } - -if($ARGV[0] =~ /oeptokenmisshist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 4 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Token Missing"; - $ydiff = DIFFY; - $title = ["Missing Tokens"]; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genhist(); - } - - -if($ARGV[0] =~ /oeptrgerrhist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP CMS Errors"; - $ydiff = DIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genhist(); - } - - -if($ARGV[0] =~ /histdiff/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = DIFFY; - genhist(); - } - -if($ARGV[0] =~ /hist/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = NODIFFY; - genhist(); - } - -if($ARGV[0] =~ /oepworktime/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 0 unless $xticks; - $ymax = $delay*1.1/1000; - $yscale = [1000]; - $xtitle = "OEP"; - $ytitle = "Time [ms]"; - $windowname = "OEP Trigger Handling Times"; - $ydiff = DIFFY; - $title = ["Readout","Waiting","Initialization","Calibration","Idle"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [0x9113,0x9114,0x9111,0x9112,0x9110]; - $regoffset = [0,0,0,0,0]; - $regwidth = [32,32,32,32,32]; - genreg(); - } - -if($ARGV[0] =~ /gberate/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 1 unless $xticks; - $xtitle = "Sender"; - $ytitle = "Data Rate (kiB)" if $ytitle eq ""; - $windowname = "Gbe Data Rate"; - $key = NO; - $ydiff = DIFFY; - $xgrid = NO; - $address = [0xff7f]; - $register = [0x83f3]; - $regoffset = [10]; - $regwidth = [22]; - genreg(); - } - -if($ARGV[0] =~ /oepwords/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data Words sent by OEP"; - $yscale = [1]; - $key = NO; - $ydiff = DIFFY; - $address = [0xfffd]; - $register = [0x910B]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /mdcchan/) { - $delay = 1000000 unless $delay; - $xticks = 1; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data words per TDC channel"; - $yscale = [1]; - $key = NO; - $ydiff = NODIFFY; - if ($ARGV[0] =~ /diff/) { - $ydiff = DIFFY; - } - $address = [$address->[0]?$address->[0]:0xfffd]; - $register = [0xc088]; - $regamount = [96]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /regdiff/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = DIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /reg/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = NODIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /oeptrgerr/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "# of errors"; - $windowname = "OEP CMS Errors"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "OEP Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xfffd]; - $register = [0x7100]; - $regoffset = [0]; - $regwidth = [16]; - genreg(); - } - -if($ARGV[0] =~ /showerfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Shower Data Buffer Fill Level"; - $key = $key || NO; - $ydiff = NODIFFY; - $address = [0xfff7,0xfff7,0xfff7,0xfff7,0xfff7,0xfff7]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /filllevel/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Front-end Data Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xffff,0xffff,0xffff,0xffff,0xffff,0xffff]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepretr/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Retransmissions"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genreg(); - } - -if($ARGV[0] =~ /timecmslvl1/) { - $delay = 1000000 unless $delay; - $windowname = "Trigger Delay"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "Time between CMS and LVL1 [10ns]"; - $address = [0xfffd]; - $register = [2]; - $regoffset = [16]; - $regwidth = [11]; - genreg(); - } - -if($ARGV[0] =~ /oeptokenmiss/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Token Missing"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "# of missing token"; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genreg(); - } - -if($ARGV[0] =~ /slowcontrolrate/) { - $delay = 1000000 unless $delay; - $samples = 240 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $windowname = "Slow Control Data Rate"; - $ydiff = DIFFY; - $ytitle = "Slow Control Data / kByte/s"; - $address = [0x8000]; - $register = [0x4012]; - $regoffset = [0]; - $regwidth = [32]; - $yscale = [102.4]; - genhist(); - } - - - -if($ARGV[0] =~ /commonstatus/) { - bitmap(($delay)?$delay:1000000,[0xffff],[0],[1],[0],[20],["Common Status Bits"],0,$name." - Common Status Bit"); - } -if($ARGV[0] =~ /genbit/ || $ARGV[0] =~ /bitmap/) { - bitmap(($delay)?$delay:1000000,$address,$register,$regamount,$regoffset,$regwidth,$title,$style,$name." - ".$windowname); - } - diff --git a/nettools/hadplot b/nettools/hadplot new file mode 120000 index 0000000..9faf824 --- /dev/null +++ b/nettools/hadplot @@ -0,0 +1 @@ +../../daqtools/tools/hadplot \ No newline at end of file diff --git a/nettools/hadplotnew.pl b/nettools/hadplotnew.pl deleted file mode 100755 index 52f64ff..0000000 --- a/nettools/hadplotnew.pl +++ /dev/null @@ -1,1449 +0,0 @@ -#!/usr/bin/perl -w -use warnings; - -use FileHandle; -use Time::HiRes qw( gettimeofday usleep time ); -use Getopt::Long; -use Data::Dumper; -use POSIX qw/floor strftime/; -use HADES::TrbNet; - -use constant AXISISTIME => 1; -use constant AXISISNOTIME => 0; -use constant DIFFY => 1; -use constant DIFFX => 1; -use constant NODIFFY => 0; -use constant NODIFFX => 0; -use constant NODELAY => 0; -use constant NO => 0; -use constant YES => 1; -use constant NONEWLINE => 1; - -my $GPbuffer = ""; -my $buffercount = 0; - -my $windowtitle = ""; #Global var to store real name of GUI window - -my $PlotBuffer = {}; -my $PlotBufferCnt = 0; - -my @PlotBufArr = (); - -#my @color = ("#1155bb","#bb1111","#999900","#660000","#006633","#990066","#6633CC","#00CCCC"); -my @color = ("#2222dd","#880000","#00cc00","#ee00dd","#ffcc00","#00cc88","#6633CC","#00CCCC"); -our $write2file = ""; -our $plotendedbefore = 0; - -trb_init_ports() or die trb_strerror(); - -################################################# -# Variables... -################################################# -my $delay = 1000; -my $samples = 100; -my $downscale = 1; -# my $system = 0; -my $address = []; -my $register = []; -my $regoffset = []; -my $regwidth = []; -my $title = []; -my $timeref = []; -my $geom = "700x400"; -my $style = 0; -my $nametmp = ""; -my $regamount = []; -my $xscale = []; -my $yscale = []; -my $xtitle = ""; -my $ytitle = ""; -my $windowname = "No Name"; -my $xistime = AXISISNOTIME; -my $xoverflow = []; -my $yoverflow = []; -my $ydiff = 0; -my $outputcfg = ""; -my $name = "HadPlot"; -my $key ; -my $curvestyle= 'points'; #points, steps, histo or histostacked -my $xticks = 0; #show labels on x-axis -my $yticks = 1; #show labels on y-axis -my $plotoption= ""; #string with additional gnuplot commands -my $curveoption= []; #options for plot command -my $xgrid = 1; -my $ygrid = 1; -my $ymax; -my $ymin; -my $xmin; -my $xmax; - -GetOptions('d=f' => \$delay, - 'n=i' => \$samples, - 'o=i' => \$downscale, - 'a=s' => $address, - 'r=s' => $register, - 'w=i' => $regwidth, - 'p=i' => $regoffset, - 't=s' => $title, - 'm=i' => $regamount, - 'g=s' => \$geom, - 'z=i' => \$style, - 'output=s' => \$outputcfg, - 'windowname=s' => \$windowname, - 'xscale=f' => $xscale, - 'yscale=f' => $yscale, - 'xtitle=s' => \$xtitle, - 'ytitle=s' => \$ytitle, - 'xistime!' => \$xistime, - 'timeref=s' => $timeref, - 'xoverflow=f' => $xoverflow, - 'yoverflow=f' => $yoverflow, - 'ydiff!' => \$ydiff, - 'name=s' => \$name, - 'key!' => \$key, - 'xticks!' => \$xticks, - 'yticks!' => \$yticks, - 'xgrid!' => \$xgrid, - 'ygrid!' => \$ygrid, - 'ymax=i' => \$ymax, - 'ymin=i' => \$ymin, - 'xmax=i' => \$xmax, - 'xmin=i' => \$xmin, - 'curvestyle=s' => \$curvestyle, - 'curveoption=s'=> $curveoption, - 'plotoption=s' => \$plotoption - ); - -for(my $i=0;$i<16;$i++) { - $regoffset->[$i] = 0 unless defined $regoffset->[$i]; - $regwidth->[$i] = 32 unless defined $regwidth->[$i]; - $xoverflow->[$i] = 2**20 unless defined $xoverflow->[$i]; - $yoverflow->[$i] = 2**32 unless defined $yoverflow->[$i]; - $xscale->[$i] = 1 unless defined $xscale->[$i]; - $yscale->[$i] = 1 unless defined $yscale->[$i]; - $title->[$i] = "" unless defined $title->[$i]; - $curveoption->[$i] = "" unless defined $curveoption->[$i]; - } - -for(my $i=0;$i < scalar @{$address};$i++) { - if(!defined($title->[$i])) { - $title->[$i] = hex($address->[$i])." $register->[$i] $regoffset->[$i]..".($regoffset->[$i]+$regwidth->[$i]-1); - } - } - - -$delay *= 1000; -if($style == 1) {$curvestyle="points"; $xticks=1;} -if($style == 2) {$curvestyle="histo"; $xticks=0;} -if($style == 3) {$curvestyle="histo"; $xticks=1;} -if($style == 4) {$curvestyle="histostacked"; $xticks=0;} -if($style == 5) {$curvestyle="histostacked"; $xticks=1;} - -for(my $k = 0; $k < scalar @$address; $k++) { - $address->[$k] = hex($address->[$k]); - $register->[$k] = hex($register->[$k]); - } - -#Open Gnuplot -our $fh; -my $fn = "gnuplot -geometry $geom -bg 'ghost white'"; -$fh = new FileHandle ("|$fn") or die "error: no gnuplot"; -$fh->autoflush(1); - -sub makeTimeString{ - return strftime("set label 100 \"%H:%M:%S\" at screen 0.92,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) - } - -################################################# -# When exiting, close Gnuplot window -################################################# -sub finish { - print $fh "exit;\n"; - close $fh; - exit; -} - -$SIG{INT} = \&finish; -$SIG{PIPE} = \&finish; - - - -my $last_wakeup; - -sub max { - my $a = shift; - my $b = shift; - return $a > $b ? $a : $b; - } - -sub min { - my $a = shift; - my $b = shift; - return $a < $b ? $a : $b; - } - -sub usleep_total { - my $delay = shift; - if(defined $last_wakeup) { - my $time = time(); -# printf "%.0f\n",$delay-($time-$last_wakeup)*1E6; - usleep(max(0,$delay-($time-$last_wakeup)*1E6)); - } - else { - usleep($delay); - } - $last_wakeup = time(); - return $last_wakeup; - } - - -################################################# -# Write to gnuplot -################################################# -sub plot_write { - my ($str,$no) = @_; - if(defined($no) && $no) { - print $fh $str; -# print $str; - } - else { - print $fh $str."\n"; -# print $str."\n"; - } - } - -sub plot_add { - my ($x,$y) = @_; - $x = $x || $PlotBufferCnt; - $PlotBufArr[$PlotBufferCnt]->{x} = $x; - $PlotBufArr[$PlotBufferCnt]->{y} = $y; - - $PlotBufferCnt++; -# $PlotBuffer->{$x} = $y; -# print $x." ".$y."\n"; - } - -sub plot_end { - my ($single) = @_; - for(my $i = 0;$i{y}."\n"; - } - else { - print $fh $PlotBufArr[$i]->{x}." ".$PlotBufArr[$i]->{y}."\n"; - } - } -# foreach my $line (sort keys %{$PlotBuffer}) { -# if($single) { -# print $fh $PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$PlotBuffer->{$line}."\n"; -# } -# else { -# print $fh $line." ".$PlotBuffer->{$line}."\n"; -# # print "plot_end: ".$line." ".$PlotBuffer->{$line}."\n"; -# } -# } - @PlotBufArr = (); - $PlotBuffer = {}; - $PlotBufferCnt = 0; - print $fh "e\n"; - $plotendedbefore = 1 unless $plotendedbefore; - } - - -sub plot_reset { - if($write2file eq ""){ - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - #print $?."\n"; - if($? != 0) { - usleep(1E5); - system("xwininfo -name '$windowtitle' >/dev/null 2>/dev/null"); - if($? != 0) { - finish(); - } - } - if ($plotendedbefore != 0) { - $plotendedbefore = 0; - print $fh makeTimeString(); - print $fh "replot\n"; - } - } - else { - if ($plotendedbefore != 0) { - system("mv $write2file.tmp $write2file"); - plot_write("set out \"$write2file.tmp\"\n"); - $plotendedbefore = 0; - print $fh makeTimeString(); - print $fh "replot\n"; -# print "reset\n"; - } - } - } - -sub plot_finished { - my ($store) = @_; - if($write2file ne "") { - if(defined $store) { - if($store->{"initing"} != 2 and $store->{"iteration"} % $store->{"downscale"} == 0) { -# system("mv $write2file.tmp $write2file"); - } - } - else { - if($write2file ne "") { -# system("mv $write2file.tmp $write2file"); - } - } - } - } - -sub plot_init { - my ($xtics) = @_; - $windowtitle = $name ." - ".$windowname; - if ($outputcfg =~ m$PNG.([/\w]*).(\d+).(\d+)$) { - print "Writing PNG to file $1\n"; - $write2file = $1.".png"; - plot_write("set term png size $2,$3 font \"monospace,8\""); - plot_write("set out \"$write2file.tmp\""); - } - elsif ($outputcfg =~ m$SVG.([/\w]*).(\d+).(\d+)$) { - print "Writing SVG to file $1\n"; - $write2file = $1.".svg"; - plot_write("set term svg size ".($2*2).",".($3*2)." dynamic font \"monospace,18\" lw 1.5 \n"); - plot_write("set out \"$write2file.tmp\"\n"); - } - else { - plot_write("set term x11 title '$windowtitle'"); - } - plot_write("set grid"); - plot_write("set xlabel \"$xtitle\""); - plot_write("set ylabel \"$ytitle\""); - if(defined $xtics) { - plot_write("set xtics $xtics\n"); - } - if(defined $xmin && defined $xmax) { - plot_write("set xrange [$xmin:$xmax]"); - } - if(defined $ymin && defined $ymax) { - plot_write("set yrange [$ymin:$ymax]"); - } - elsif(defined $ymax) { - plot_write("set yrange [:$ymax]"); - } - elsif(defined $ymin) { - plot_write("set yrange [$ymin:]"); - } - if (!defined $key || $key == 0) { - plot_write("unset key"); - } - if($xgrid == 0) { - plot_write("set grid noxtics"); - } - if($ygrid == 0) { - plot_write("set grid noytics"); - } - if($plotoption ne "") { - plot_write($plotoption); - } - } - -sub plot_sleep { - my ($delay) = @_; - my $t = usleep_total($delay); - plot_reset(); - return $t; - } - -sub plot_end_sleep { - my ($delay,$single) = @_; - plot_end($single); - return plot_sleep($delay); - } - -sub plot_storage_end_sleep { - my ($store, $single) = @_; - my $delay = $store->{"delay"}; - my $t; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end($single); - $t = usleep_total($delay); - plot_reset(); - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_sleep { - my ($store,$noreset) = @_; - my $t; - my $delay = $store->{"delay"}; - #print $store->{"initing"}.$store->{"iteration"}.$store->{"downscale"}."\n"; - if($store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - $t = usleep_total($delay); - plot_storage_reset() unless $noreset; - } - else { - $t = usleep_total($delay); - } - } - return $t; - } - -sub plot_storage_reset { - my ($store) = @_; - if(defined $store->{"initing"} && $store->{"initing"} != 2) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_reset(); - } - } - } - -sub plot_storage_end { - my ($store) = @_; - if($store->{"initing"} == 0) { - if($store->{"iteration"} % $store->{"downscale"} == 0) { - plot_end(); - } - } - } - -################################################# -# Writes a new value pair to storage -################################################# -sub store_push { - my ($storage,$x,$y,$divtime) = @_; - my $xval = $x; - my $yval = $y; - my $curtime = time(); - - if ($storage->{"initing"} != 2) { - if (scalar(@{$storage->{"datax"}}) == $storage->{"size"}) { - my $tmp = shift(@{$storage->{"datax"}}); - my $tmpy = shift(@{$storage->{"datay"}}); - $storage->{"totalx"} -= $tmp; -# if($storage->{"initing"} == 0 && (($tmpy <= $storage->{"miny"}) || ($tmpy >= $storage->{"maxy"}))) { -# store_calc_range($storage); -# } - } - if($storage->{"diffx"}) { - if(defined($storage->{"xmax"}) && $x < $storage->{"lastx"}) { - $xval = ($x - $storage->{"lastx"} + $storage->{"xmax"}); - } - else { - $xval = ($x - $storage->{"lastx"}); - } - if(defined($storage->{"last_push"}) && $storage->{"last_push"} != 0) { - while (floor($xval/$storage->{"xmax"}) < floor(($curtime - $storage->{"last_push"})/($storage->{"xmax"}/1E6))){ - $xval += $storage->{"xmax"}; - } - } - } - if($storage->{"diffy"}) { - $yval = $y - $storage->{"lasty"}; - if(defined($storage->{"ymax"}) && $y < $storage->{"lasty"}) { - while($yval < 0) { - $yval += $storage->{"ymax"}; - } - } - if($divtime) { - $yval /= ($xval?$xval:1)/1000000; - } - } - - - if($storage->{"initing"} == 1) { - $storage->{"initing"} = 0; - for(my $i = $storage->{"size"}-1; $i>0; $i--) { - push(@{$storage->{"datax"}},$storage->{"delay"}); - push(@{$storage->{"datay"}},$yval); - $storage->{"totalx"} += $storage->{"delay"}; - } - } - - push(@{$storage->{"datax"}},$xval?$xval:0); - push(@{$storage->{"datay"}},$yval?$yval:0); - $storage->{"totalx"} += $xval?$xval:0; - } - else { - $storage->{"initing"} = 1; - } - - $storage->{"last_push"} = $curtime; - $storage->{"lasty"} = $y; - $storage->{"lastx"} = $x; - } - -################################################# -# Writes storage contents to stream -################################################# -sub store_print { - my $str = ""; - my ($storage) = @_; - if($storage->{"initing"} != 2) { - if($storage->{"iteration"} % $storage->{"downscale"} == 0) { - my $xcnt = - $storage->{"totalx"} /1000000.0; - for (my $i = 0; $i < $storage->{"size"}; $i++) { - my $xval = $storage->{"datax"}->[$i]; #${}[] - my $yval = $storage->{"datay"}->[$i]; - $xval = 0 unless defined($xval); - $yval = 0 unless defined($yval); - $xcnt += $xval/1000000.0; -# $str .= $xcnt." ".$yval."\n"; - $str .= sprintf "%.3f %.2f\n", $xcnt,$yval; - #plot_write($xcnt/1000000.0." ".$yval); - } - plot_write($str,1); -# print $str; - plot_end(1); - } - $storage->{"iteration"}++; - } - } - - -################################################# -# Initialize storage -################################################# -sub store_init { - my ($storage,$size,$diffx,$diffy,$delay,$downscale,$xmax,$ymax) = @_; - - $storage->{"datax"} = []; - $storage->{"datay"} = []; - $storage->{"size"} = $size; - $storage->{"diffx"} = $diffx; - $storage->{"diffy"} = $diffy; - $storage->{"delay"} = $delay; - $storage->{"downscale"} = $downscale; - $storage->{"initing"} = 2; - $storage->{"iteration"} = 0; - $storage->{"totalx"} = 0; - $storage->{"xmax"} = $xmax; - $storage->{"ymax"} = $ymax; - $storage->{"maxy"} = 0; - $storage->{"miny"} = 1E100; - $storage->{"last_push"} = 0; - $storage->{"last_sleep"} = 0; - } - -################################################# -# Help Message -################################################# -sub help { - print <[$i])) || ($title->[$i] eq "")) { -# $title->[$i] = hex($address->[$i])." ".$register->[$i]." ".$regoff->[$i]."..".($regoff->[$i]+$regwidth->[$i]-1); -# } - if (!(defined $regamount->[$i])) { - $regamount->[$i] = 1; - } - } - $ymin = $regoff->[0]; - $ymax = $regoff->[0]+$regwidth->[0]; - plot_init(256); -# if ($style == 0) { -# plot_write("plot",1); -# for(my $i = 0; $i[$i]\" ",1); -# plot_write(", ",1) unless $i == scalar(@{$address})-1; -# } -# plot_write(""); -# } -# elsif($style == 1) { - plot_write("set xtics rotate by 90 offset .7,-2 scale 0 "); - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 1 absolute"); - plot_write("unset key"); - plot_write('set format x "%x"'); - plot_write("plot ",1); - for(my $i = 0; $i[$i]\" ",1); #using 2:xticlabels(1) - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); -# } - while(1) { - for(my $i = 0; $i[$i] == 1) { - $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - } - else { - $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - } - my @out = qx($c); - my $addr = undef; - my $cnt = 0; - foreach my $s (@out) { - if($s =~ /^H:\s*0x(\w\w\w\w)/) { - $addr = $1; - } - if($s =~ /^0x(\w\w\w\w)\s*0x(\w{8})/) { - $addr = hex($1) if($regamount->[$i] == 1); - if ($regamount->[$i] == 1) { plot_add($addr,-1); } - else { plot_add("\"$addr.$1\"",-1); } - for(my $j = $regoff->[$i]; $j < $regoff->[$i] + $regwidth->[$i];$j++) { - if(hex($2) & (1<<$j)) { - if ($regamount->[$i] == 1) { plot_add("$addr",$j); } - else { plot_add("\"$addr.$1\"",$j); } - } - } - $cnt++; - } - } - plot_end(1); - } - plot_sleep($delay); - } - } - - - -################################################# -# Generic Register differences -################################################# -sub genreg { - my %oldvals; - - plot_init(undef); - - if($xticks) { - plot_write("set xtics rotate by 90 offset .7,-1.7 scale .7 "); - } - if($curvestyle eq "histo") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set boxwidth 2 absolute"); - } - elsif($curvestyle eq "histostacked") { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set style histogram rowstacked"); - plot_write("set boxwidth 1 absolute"); - plot_write("set key outside") unless defined $key && $key==0; - plot_write("set autoscale xfix "); - } - - plot_write("plot",1); - for(my $i = 0; $i[$i]\" ",NONEWLINE); - } - elsif ($curvestyle eq "steps") { - plot_write("with histeps title \"$title->[$i]\" ",NONEWLINE); - } - else { - plot_write("with points pt 5 title \"$title->[$i]\" ",NONEWLINE); - } - plot_write(" ".$curveoption->[$i],NONEWLINE); - plot_write(", ",NONEWLINE) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - - while(1) { - for(my $i = 0; $i[$i]) || $regamount->[$i] == 1) { -# $c = "trbcmd r $address->[$i] $register->[$i] | sort"; - $c = trb_register_read(($address->[$i]),($register->[$i])); - foreach my $s (keys $c) { - $c->{$s}=[$c->{$s}]; - } - } - else { -# $c = "trbcmd rm $address->[$i] $register->[$i] $regamount->[$i] 0"; - $c = trb_register_read_mem(($address->[$i]),($register->[$i]),0,$regamount->[$i]); -# print Dumper $c; - } -# my @out = qx($c); - foreach my $s (sort keys $c) { - for(my $r = 0; $r < scalar @{$c->{$s}};$r++) { - my $tmp = ($c->{$s}->[$r]>>$regoffset->[$i])&(2**$regwidth->[$i]-1); - my $val = $tmp; - my $board = sprintf("%04x",$s); - if($ydiff) { - if(defined $oldvals{$i}->{$board.($r+$register->[$i])}) { - if ($oldvals{$i}->{$board.($r+$register->[$i])} > $tmp) { - $val = $tmp - $oldvals{$i}->{$board.($r+$register->[$i])} + 2**$regwidth->[$i]; - } - else { - $val = $tmp - $oldvals{$i}->{$board.($r+$register->[$i])}; - } - } - $oldvals{$i}->{$board.($r+$register->[$i])} = $tmp; - } - - if($xticks) { - if (!(defined $regamount->[$i]) || $regamount->[$i] == 1) { - plot_add("\"$board\"",$val/$yscale->[$i]); - } - else { - plot_add("\"$board.($r+$register->[$i])\"",$val/$yscale->[$i]); - } - } - else { - plot_add("",$val/$yscale->[$i]); - } - } - } - plot_end(!$xticks); - } - plot_sleep($delay); - } - } - -################################################# -# Generic Histogram -################################################# -sub genhist { - my %storearr; - my %oldvals; -# $xtitle = "Time [s]" unless $xtitle ne ""; - plot_init(); - plot_write("set autoscale fix"); - plot_write("plot",1); - $diff = 0 unless defined($diff); - for(my $i = 0; $i[$i],$yoverflow->[$i]); - plot_write("'-' with lines title \"$title->[$i]\" ",1); - plot_write(", ",1) unless $i == scalar(@{$address})-1; - } - plot_write(""); - - while(1) { - my $a, my $s, my $t; - my $val = 0 , my $time; - plot_storage_reset($storearr{0}); - for(my $i = 0; $i[$i], $register->[$i]) or sleep 1 and print "Error\n" and next; - foreach my $o (sort keys $c) { -# if (($a,$s,$t) = $o =~ /^0x(\w{4})\s*0x(\w{8})\s*0x(\w{4})/) { - - $val += (($c->{$o}->{'value'}->[0]>>($regoffset->[$i]))&(2**($regwidth->[$i])-1)); - $time = $c->{$o}->{'time'}->[0]*16; -# } - } - store_push($storearr{$i},$time/$xscale->[$i],$val/$yscale->[$i],AXISISTIME); - store_print($storearr{$i}); - } - plot_storage_sleep($storearr{0}); - plot_finished($storearr{0}); - } - } - -################################################# -# Deadtime histogram -################################################# -sub deadtimehist2 { - my %values, my %lastvalues, my %diffvalues; - my @keys = ("33","34","36","31","38","37","3b","35"); - my @keys2 = ("43","44","46","41","48","47","4b","45"); - my @names = ("MDC12","MDC34","TOF","RPC","RICH","SHW","Start","FW"); - my %storearr; - - if ($style != 0) { - for(my $i= 0; $i < scalar(@keys); $i++) { - $storearr{$keys[$i]} = {}; - store_init($storearr{$keys[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - for(my $i= 0; $i < scalar(@keys2); $i++) { - $storearr{$keys2[$i]} = {}; - store_init($storearr{$keys2[$i]},$samples,0,0,$delay*.0,$downscale,2**32,2**32); - } - } - - plot_init(); - plot_write("set key left top Left"); - plot_write("set autoscale fix"); - plot_write("set yrange [-1:101]"); - - if ($style != 0) { - plot_write("plot ",1); - plot_write("\"-\" title \"MDC12\" with lines,",1); - plot_write("\"-\" title \"MDC34\" with lines,",1); - plot_write("\"-\" title \"TOF\" with lines,",1); - plot_write("\"-\" title \"RPC\" with lines,",1); - plot_write("\"-\" title \"RICH\" with lines,",1); - plot_write("\"-\" title \"SHW\" with lines,",1); - plot_write("\"-\" title \"Start\" with lines,",1); - plot_write("\"-\" title \"FW\" with lines"); - } - else { - plot_write("set style fill solid 1.00 border -1"); - plot_write("set grid noxtics ytics"); - plot_write("set boxwidth 2 absolute"); - plot_write("set xtics ('MDC12' 0,'MDC34' 1,'TOF' 2, 'RPC' 3, 'RICH' 4, 'SHW' 5, 'Start' 6, 'FW' 7) offset 2,0 scale 0"); - plot_write("set style histogram title offset character 0, 0, 0"); - plot_write("set style data histograms"); - plot_write("plot \"-\" title 'incl. busy' lt rgb \"#1155bb\", \"-\" title 'excl. busy' lt rgb \"#bb1111\""); - } - my $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 31 0",$delay/1000); - if($style != 0) { - $cmd = sprintf("trbcmd -n-1 -s%d rmt 0x8001 0x4031 12 0",$delay/1000); - } - open(FTRB, "$cmd|"); - - while(my $a = ) { - if($a =~ /^0x\w{2}(\w{2})\s*0x(\w{8})\s*0x(\w{4})/) { - $values{$1} = hex($2); - $values{"50"} = hex($3)*16; - } - if ($a eq "---\n") { - $diffvalues{"50"} = 1E6; - if (defined $lastvalues{"50"}) { - if ($values{"50"} > $lastvalues{"50"}) { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"}; - } - else { - $diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} + 2**20; - } - } - #$diffvalues{"50"} = $values{"50"} - $lastvalues{"50"} if defined $lastvalues{"50"}; - my $time = $diffvalues{"50"}; - foreach my $key (keys %values) { - next unless hex($key)<0x50; - $diffvalues{$key} = 0; - if (defined $lastvalues{$key}) { - if ($values{$key} >= $lastvalues{$key}) { - $diffvalues{$key} = $values{$key} - $lastvalues{$key}; - } - else { - $diffvalues{$key} = $values{$key} - $lastvalues{$key} + 2**32; - } - } - $diffvalues{$key} /= $time if $time; - #print $key." ".$values{$key}." ".$lastvalues{$key}." ".$diffvalues{$key}."\n"; - } - #print "=====\n"; - $diffvalues{"31"} = max($diffvalues{"31"},$diffvalues{"32"}); - $diffvalues{"38"} = max(max($diffvalues{"38"},$diffvalues{"39"}),$diffvalues{"3a"}); - if ($style == 0) { - $diffvalues{"41"} = max($diffvalues{"41"},$diffvalues{"42"}); - $diffvalues{"48"} = max(max($diffvalues{"48"},$diffvalues{"49"}),$diffvalues{"4a"}); - } - %lastvalues = %values; - if($style != 0) { - plot_storage_reset($storearr{$keys[0]}); - for(my $i= 0; $i < scalar(@keys); $i++) { - store_push($storearr{$keys[$i]},$time,$diffvalues{$keys[$i]},0); - store_print($storearr{$keys[$i]}); - } - plot_storage_sleep($storearr{$keys[0]},1); - plot_finished($storearr{$keys[0]}); - } - else { - plot_reset(); - for(my $i= 0; $i < scalar(@keys); $i++) { - plot_add("",$diffvalues{$keys[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - for(my $i= 0; $i < scalar(@keys2); $i++) { - plot_add("",$diffvalues{$keys2[$i]}); #"\"".$names[$i]."\"", - } - plot_end(1); - plot_finished(); - } - } - } - } - - -################################################# -# Select Operation -################################################# - -if(!(defined $ARGV[0]) || $ARGV[0] =~ /help/) {help(); exit;} - -if($ARGV[0] =~ /oep5V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8010,0x8011]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5.8V input","5V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3.3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8012,0x8013]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["3.8V input","3.3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep1.2V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8014,0x8015]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["1.8V input","1.2V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oep3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x8016,0x8017]; - $regwidth = [12,12]; - $regoffset = [0,0]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V input","-3V reg."]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxp3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801e,0x801e]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["+3V minimum","+3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmaxn3V/) { - $address = [0xfffd,0xfffd]; - $register = [0x801f,0x801f]; - $regwidth = [12,12]; - $regoffset = [0,16]; - $yscale = [1,1]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["-3V minimum","-3V maximum"]; - genreg(); - } - -if($ARGV[0] =~ /oepminmax5Vin/) { - $address = [0xfffd,0xfffd,0xfffd]; - $register = [0x8018,0x8018,0x8010]; - $regwidth = [12,12,12]; - $regoffset = [0,16,0]; - $yscale = [.5,.5,.5]; - $xtitle = "Board"; - $ytitle = "Voltage [mV]"; - $key = YES; - $windowname = "OEP Voltages"; - $title = ["5Vin minimum","5Vin maximum","5Vin"]; - genreg(); - } - -if($ARGV[0] =~ /oeptemp/) { - oeptemp(($delay)?$delay:5000000,[$name." - OEP Temperature"]); - } - - -if($ARGV[0] =~ /rpcdatarate/) { - $delay = 1000000 unless $delay; - $xticks = 1 ; - $xtitle = "Sender ((Sector mod 3)*4+TRB)"; - $ytitle = "Data Words /1024"; - $windowname = "Data Words sent by RPC"; - $curvestyle = "histo"; - $key = YES; - $ydiff = DIFFY; - $ymin = 0; - $yscale = [512,512]; - $address = [0x8401,0x8411]; - $register = [0x4001,0x4001]; - $regamount = [12,12]; - $title = ["Sector 0,1,2","Sector 3,4,5"]; - $regoffset = [0,0]; - $regwidth = [32,32]; - genreg(); - } - -#hadplot -a 2 -r 1 -p 0 -w 16 -d 5 -o 200 -n 1000 -yoverflow 65536 genhistdiff - - -if($ARGV[0] =~ /slowcontrolrate/) { - $delay = 1000000 unless $delay; - $samples = 240 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $windowname = "Slow Control Data Rate"; - $ydiff = DIFFY; - $ytitle = "Slow Control Data / kByte/s"; - $address = [0x8000]; - $register = [0x4012]; - $regoffset = [0]; - $regwidth = [32]; - $yscale = [102.4]; - genhist(); - } - -if($ARGV[0] =~ /eventratehighres/) { - $delay = 5000 ; #unless $delay; - $samples = 1000; # unless $samples; - $downscale = 200;# unless $downscale; -# $style = 0 unless $style; - $windowname = "Eventrate High Resolution"; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $title = ["Event rate"]; - $address = [0x2]; - $register = [0x1]; - $regoffset = [0]; - $regwidth = [16]; - $yoverflow = [65536]; - genhist(); - } - - -if($ARGV[0] =~ /eventrate/) { - $address = [0x2]; - $register = [0x1]; - $regwidth = [16]; - $regoffset = [0]; - $timeref = [0x2]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 10 unless $downscale; - $windowname = "Event rate history"; - $key = NO; - $ytitle = "Event rate [Hz]" if $ytitle eq ""; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**16] unless $yoverflow->[0] != 2**32; - genhist(); - } - -if($ARGV[0] =~ /datarate/) { - $address = [0xff7f]; - $register = [0x83f3]; - $regwidth = [32]; - $regoffset = [0]; - $timeref = [0x8000]; - $delay = 100000 unless $delay; - $samples = 500 unless $samples; - $downscale = 5 unless $downscale; - $windowname = "Total data rate history"; - $xtitle = "Time [s]" unless defined $xtitle; - $ytitle = "Data rate [MiByte]" unless defined $ytitle; - $xistime = AXISISTIME; - $ydiff = DIFFY; - $xoverflow = [2**20]; - $yoverflow = [2**12]; - $yscale = [2**20]; - $key = NO; - genhist(); - } - -if($ARGV[0] =~ /busytime/) { - $delay = 100000 unless $delay; - $samples = 100 unless $samples; - $downscale = 5 unless $downscale; - $style = 1; - $windowname = "Busytime history"; - deadtimehist2(); - } - -if($ARGV[0] =~ /busy/) { - $delay = 100000 unless $delay; - $style = 0; - $windowname = "Busy time"; - deadtimehist2(); - } - -if($ARGV[0] =~ /oepspikehist/) { - $delay = 100000 unless $delay; - $samples = 1000 unless $samples; - $downscale = 10 unless $downscale; -# $style = 0 unless $style; - $windowname = "OEP CMS Spikes"; - $ydiff = DIFFY; - $title = ["OEP CMS Spikes"]; - $address = [0xfffd]; - $register = [7]; - $regoffset = [0]; - $regwidth = [16]; - genhist(); - } - -if($ARGV[0] =~ /oepretrhist/) { - $delay = 500000 unless $delay; - $samples = 600 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Retransmissions"; - $ydiff = DIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genhist(); - } - -if($ARGV[0] =~ /oeptokenmisshist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 4 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP Token Missing"; - $ydiff = DIFFY; - $title = ["Missing Tokens"]; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genhist(); - } - - -if($ARGV[0] =~ /oeptrgerrhist/) { - $delay = 500000 unless $delay; - $samples = 2000 unless $samples; - $downscale = 2 unless $downscale; - $style = 0 unless $style; - $windowname = "OEP CMS Errors"; - $ydiff = DIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genhist(); - } - - -if($ARGV[0] =~ /histdiff/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = DIFFY; - genhist(); - } - -if($ARGV[0] =~ /hist/) { - $delay = 1000000 unless $delay; - $samples = 200 unless $samples; - $downscale = 1 unless $downscale; - $style = 0 unless $style; - $ydiff = NODIFFY; - genhist(); - } - -if($ARGV[0] =~ /oepworktime/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 0 unless $xticks; - $ymax = $delay*1.1/1000; - $yscale = [1000]; - $xtitle = "OEP"; - $ytitle = "Time [ms]"; - $windowname = "OEP Trigger Handling Times"; - $ydiff = DIFFY; - $title = ["Readout","Waiting","Initialization","Calibration","Idle"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [0x9113,0x9114,0x9111,0x9112,0x9110]; - $regoffset = [0,0,0,0,0]; - $regwidth = [32,32,32,32,32]; - genreg(); - } - -if($ARGV[0] =~ /gberate/) { - $delay = 1000000 unless $delay; - $curvestyle = "histostacked"; - $xticks = 1 unless $xticks; - $xtitle = "Sender"; - $ytitle = "Data Rate (kiB)" if $ytitle eq ""; - $windowname = "Gbe Data Rate"; - $key = NO; - $ydiff = DIFFY; - $xgrid = NO; - $address = [0xff7f]; - $register = [0x83f3]; - $regoffset = [10]; - $regwidth = [22]; - genreg(); - } - -if($ARGV[0] =~ /oepwords/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data Words sent by OEP"; - $yscale = [1]; - $key = NO; - $ydiff = DIFFY; - $address = [0xfffd]; - $register = [0x910B]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /mdcchan/) { - $delay = 1000000 unless $delay; - $xticks = 1; - $xtitle = "Sender"; - $ytitle = "Data Words"; - $windowname = "Data words per TDC channel"; - $yscale = [1]; - $key = NO; - $ydiff = NODIFFY; - if ($ARGV[0] =~ /diff/) { - $ydiff = DIFFY; - } - $address = [$address->[0]?$address->[0]:0xfffd]; - $register = [0xc088]; - $regamount = [96]; - $regoffset = [0]; - $regwidth = [32]; - genreg(); - } - - -if($ARGV[0] =~ /regdiff/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = DIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /reg/) { - $delay = 1000000 unless $delay; -# $xticks = 1 unless $xticks; - $ydiff = NODIFFY; -# $key = NO unless defined $key; - $windowname = "General Plot" unless $windowname; - genreg(); - } - -if($ARGV[0] =~ /oeptrgerr/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "# of errors"; - $windowname = "OEP CMS Errors"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Spikes","Spurious","Invalid","Multiple"]; - $address = [0xfffd,0xfffd,0xfffd,0xfffd]; - $register = [7,7,6,6]; - $regoffset = [0,16,0,16]; - $regwidth = [16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "OEP Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xfffd]; - $register = [0x7100]; - $regoffset = [0]; - $regwidth = [16]; - genreg(); - } - -if($ARGV[0] =~ /showerfill/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Shower Data Buffer Fill Level"; - $key = $key || NO; - $ydiff = NODIFFY; - $address = [0xfff7,0xfff7,0xfff7,0xfff7,0xfff7,0xfff7]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /filllevel/) { - $delay = 1000000 unless $delay; - $xticks = 1 unless defined $xticks; - $xtitle = "Board"; - $ytitle = "Words in Buffer"; - $windowname = "Front-end Data Buffer Fill Level"; - $key = NO; - $ydiff = NODIFFY; - $address = [0xffff,0xffff,0xffff,0xffff,0xffff,0xffff]; - $register = [0x7100,0x7101,0x7102,0x7103,0x7104,0x7105]; - $regoffset = [0,0,0,0,0,0]; - $regwidth = [16,16,16,16,16,16]; - genreg(); - } - -if($ARGV[0] =~ /oepretr/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Retransmissions"; - $key = YES; - $ydiff = NODIFFY; - $title = ["Retransmit Received","Retransmit Sent"]; - $address = [0xfffd,0xfffd]; - $register = [4,4]; - $regoffset = [16,24]; - $regwidth = [8,8]; - genreg(); - } - -if($ARGV[0] =~ /timecmslvl1/) { - $delay = 1000000 unless $delay; - $windowname = "Trigger Delay"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "Time between CMS and LVL1 [10ns]"; - $address = [0xfffd]; - $register = [2]; - $regoffset = [16]; - $regwidth = [11]; - genreg(); - } - -if($ARGV[0] =~ /oeptokenmiss/) { - $delay = 1000000 unless $delay; - $windowname = "OEP Token Missing"; - $key = NO; - $ydiff = NODIFFY; - $ytitle = "# of missing token"; - $address = [0xfffd]; - $register = [0x9101]; - $regoffset = [0]; - $regwidth = [24]; - genreg(); - } - - - - -if($ARGV[0] =~ /commonstatus/) { - bitmap(($delay)?$delay:1000000,[0xffff],[0],[1],[0],[20],["Common Status Bits"],0,$name." - Common Status Bit"); - } -if($ARGV[0] =~ /genbit/ || $ARGV[0] =~ /bitmap/) { - bitmap(($delay)?$delay:1000000,$address,$register,$regamount,$regoffset,$regwidth,$title,$style,$name." - ".$windowname); - } - diff --git a/nettools/hadplotnew.pl b/nettools/hadplotnew.pl new file mode 120000 index 0000000..9faf824 --- /dev/null +++ b/nettools/hadplotnew.pl @@ -0,0 +1 @@ +../../daqtools/tools/hadplot \ No newline at end of file diff --git a/nettools/nettrace.db b/nettools/nettrace.db index 93f3fc0..cb5966e 100644 --- a/nettools/nettrace.db +++ b/nettools/nettrace.db @@ -1,756 +1,756 @@ %hublist = ( - '4387' => { - '8' => 8738, - '1' => 8748, - '5' => 8741, - '3' => 8750, - '4' => 8751, - '7' => 8739, - '2' => 8749, - '6' => 8740 - }, - '4146' => { - '1' => 8215, - '4' => 8218, - '2' => 8216, - '7' => 8221, - '3' => 8217, - '5' => 8219, - '6' => 8220 - }, - '4436' => { - '8' => 9055, - '1' => 9048, - '5' => 9052, - '3' => 9050, - '2' => 9049, - '4' => 9051, - '7' => 9054, - '6' => 9053 + '4368' => { + '1' => 4370, + '3' => 4372, + '2' => 4371, + '0' => 4369 }, - '32768' => { - '6' => 33024, - '0' => 32769, - '3' => 32772, - '1' => 32770, - '4' => 3, - '7' => 33040, - '2' => 32771 + '34304' => { + '2' => 34305 }, - '4384' => { - '0' => 4385, - '3' => 4388, - '1' => 4386, - '2' => 4387 - }, - '4402' => { - '6' => 9010, - '7' => 9009, - '4' => 9012, - '2' => 9014, - '3' => 9013, - '5' => 9011, - '1' => 9015, - '8' => 9008 + '4144' => { + '3' => 4148, + '1' => 4146, + '0' => 4145, + '2' => 4147 }, - '34560' => { - '2' => 34561 + '33569' => { + '3' => 12354, + '10' => 12372, + '5' => 12356, + '7' => 12369, + '6' => 12368, + '9' => 12371, + '8' => 12370, + '1' => 12352, + '4' => 12355, + '2' => 12353 }, - '4130' => { - '5' => 8204, - '6' => 8205, - '3' => 8202, - '4' => 8203, - '7' => 8198, - '2' => 8201, - '1' => 8200 + '4132' => { + '2' => 8281, + '6' => 8285, + '4' => 8283, + '1' => 8280, + '5' => 8284, + '3' => 8282 }, - '33809' => { - '1' => 18482, - '8' => 18467, - '3' => 18480, - '5' => 18464, - '7' => 18466, - '4' => 18483, - '2' => 18481, - '6' => 18465 - }, - '33825' => { - '6' => 18497, - '4' => 18515, - '7' => 18498, - '2' => 18513, - '3' => 18514, - '5' => 18496, - '8' => 18499, - '1' => 18512 - }, - '32770' => { - '3' => 34560, - '2' => 34816, - '1' => 34304 + '34305' => { + '2' => 19472, + '6' => 19536, + '7' => 19505, + '4' => 19504, + '1' => 19456, + '5' => 19520, + '3' => 19488 }, - '4385' => { - '8' => 9000, - '1' => 9007, - '5' => 9003, - '3' => 9005, - '2' => 9006, - '7' => 9001, - '4' => 9004, - '6' => 9002 + '4372' => { + '8' => 8720, + '1' => 8727, + '4' => 8724, + '2' => 8726, + '3' => 8725, + '5' => 8723, + '7' => 8721, + '6' => 8722 }, - '33024' => { - '2' => 33025 - }, '4434' => { + '5' => 8796, + '3' => 8794, '6' => 8797, '7' => 8798, - '4' => 8795, - '2' => 8793, - '3' => 8794, - '5' => 8796, '1' => 8792, - '8' => 8799 + '8' => 8799, + '2' => 8793, + '4' => 8795 }, - '33792' => { - '2' => 33793 + '32770' => { + '2' => 34816, + '3' => 34560, + '1' => 34304 }, - '4370' => { - '2' => 8982, - '7' => 8977, - '4' => 8981, - '6' => 8978, - '8' => 8976, - '1' => 8983, - '3' => 8980, - '5' => 8979 - }, - '33536' => { - '2' => 33537 + '33568' => { + '2' => 33569 }, - '4433' => { - '1' => 8784, - '4' => 8787, - '2' => 8785, - '7' => 8790, - '3' => 8786, - '6' => 8789, - '5' => 8788 + '35088' => { + '1' => 14353, + '2' => 14352, + '0' => 14384 + }, + '33553' => { + '7' => 12337, + '6' => 12336, + '3' => 12322, + '10' => 12340, + '5' => 12324, + '4' => 12323, + '2' => 12321, + '8' => 12338, + '9' => 12339, + '1' => 12320 + }, + '32771' => { + '2' => 35088, + '3' => 34944, + '1' => 35072 + }, + '4176' => { + '3' => 4180, + '1' => 4178, + '0' => 4177, + '2' => 4179 }, + '33040' => { + '2' => 33041 + }, '32769' => { - '4' => 33568, - '2' => 33792, + '5' => 33552, '1' => 33808, + '3' => 33824, '6' => 33536, - '5' => 33552, - '3' => 33824 + '2' => 33792, + '4' => 33568 }, - '4356' => { - '5' => 8972, - '3' => 8970, - '8' => 8975, - '1' => 8968, - '6' => 8973, - '4' => 8971, - '7' => 8974, - '2' => 8969 - }, - '4115' => { - '6' => 8469, - '2' => 8465, - '7' => 8454, - '4' => 8467, - '5' => 8468, - '3' => 8466, - '8' => 8455, - '1' => 8464 - }, - '4161' => { - '3' => 8242, - '5' => 8244, - '1' => 8240, - '8' => 8247, - '6' => 8245, - '4' => 8243, - '7' => 8246, - '2' => 8241 + '33041' => { + '6' => 4432, + '2' => 4368, + '4' => 4400, + '5' => 4416, + '1' => 4352, + '3' => 4384 + }, + '4370' => { + '4' => 8981, + '2' => 8982, + '8' => 8976, + '1' => 8983, + '7' => 8977, + '6' => 8978, + '3' => 8980, + '5' => 8979 }, - '4147' => { - '6' => 8229, - '5' => 8228, - '3' => 8225, - '8' => 8231, - '7' => 8230, - '4' => 8227, - '2' => 8224 + '4160' => { + '3' => 4164, + '1' => 4162, + '0' => 4161, + '2' => 4163 }, - '12864' => { - '0' => 12865, - '1' => 12866 - }, - '34561' => { - '3' => 17440, - '1' => 17408, - '2' => 17424, - '4' => 34960 - }, '4432' => { '3' => 4436, - '0' => 4433, '1' => 4434, + '0' => 4433, '2' => 4435 }, - '4148' => { - '1' => 8233, - '2' => 8232, - '7' => 8237, - '4' => 8235, - '3' => 8234, - '5' => 8236, - '6' => 8226 - }, - '4435' => { - '2' => 9041, - '7' => 9046, - '4' => 9043, - '6' => 9045, - '1' => 9040, - '8' => 9047, - '3' => 9042, - '5' => 9044 - }, - '4163' => { - '5' => 8500, - '3' => 8498, - '1' => 8496, - '8' => 8503, - '6' => 8501, - '2' => 8497, - '4' => 8499, - '7' => 8502 - }, - '32772' => { - '3' => 12832, - '6' => 12880, - '5' => 12864, - '4' => 12848, - '2' => 12816, - '1' => 12800 - }, - '4386' => { - '1' => 8999, - '8' => 8992, - '3' => 8997, - '5' => 8995, - '2' => 8998, - '4' => 8996, - '7' => 8993, - '6' => 8994 - }, - '4098' => { - '4' => 8268, - '2' => 8262, - '1' => 8264, - '5' => 8267, - '3' => 8269, - '6' => 8266 - }, - '4160' => { - '1' => 4162, - '2' => 4163, - '0' => 4161, - '3' => 4164 - }, - '4179' => { - '4' => 8531, - '7' => 8470, - '2' => 8529, - '6' => 8533, - '8' => 8471, - '1' => 8528, - '3' => 8530, - '5' => 8532 - }, - '12800' => { - '1' => 12802, - '0' => 12801 - }, - '12832' => { - '1' => 12834, - '0' => 12833 - }, - '4164' => { - '5' => 8508, - '3' => 8506, - '1' => 8504, - '8' => 8511, - '6' => 8509, - '4' => 8507, - '2' => 8505, - '7' => 8510 + '4131' => { + '6' => 8277, + '7' => 8278, + '5' => 8276, + '3' => 8274, + '2' => 8273, + '4' => 8275, + '1' => 8272, + '8' => 8279 }, '4355' => { - '3' => 8962, - '5' => 8964, + '4' => 8963, + '2' => 8961, '8' => 8967, '1' => 8960, + '7' => 8966, '6' => 8965, - '2' => 8961, - '4' => 8963, - '7' => 8966 - }, - '4176' => { - '0' => 4177, - '3' => 4180, - '1' => 4178, - '2' => 4179 - }, - '4162' => { - '5' => 8252, - '3' => 8250, - '6' => 8253, - '2' => 8249, - '4' => 8251, - '8' => 8472, - '1' => 8248 - }, - '4132' => { - '3' => 8282, - '5' => 8284, - '6' => 8285, - '4' => 8283, - '2' => 8281, - '1' => 8280 + '3' => 8962, + '5' => 8964 }, - '4114' => { - '6' => 8541, - '2' => 8537, - '7' => 8542, - '4' => 8539, - '5' => 8540, - '3' => 8538, - '1' => 8536, - '8' => 8543 + '4113' => { + '5' => 8452, + '3' => 8450, + '6' => 8453, + '7' => 8534, + '1' => 8448, + '8' => 8535, + '2' => 8449, + '4' => 8451 }, - '4372' => { - '5' => 8723, - '3' => 8725, - '8' => 8720, - '1' => 8727, - '6' => 8722, - '7' => 8721, - '4' => 8724, - '2' => 8726 + '4385' => { + '8' => 9000, + '1' => 9007, + '4' => 9004, + '2' => 9006, + '3' => 9005, + '5' => 9003, + '7' => 9001, + '6' => 9002 }, - '4131' => { - '2' => 8273, - '7' => 8278, - '4' => 8275, - '6' => 8277, - '1' => 8272, - '8' => 8279, - '5' => 8276, - '3' => 8274 + '4386' => { + '2' => 8998, + '4' => 8996, + '1' => 8999, + '8' => 8992, + '6' => 8994, + '7' => 8993, + '5' => 8995, + '3' => 8997 }, + '32772' => { + '2' => 12816, + '6' => 12880, + '4' => 12848, + '5' => 12864, + '1' => 12800, + '3' => 12832 + }, '4097' => { '3' => 8257, '5' => 8256, + '7' => 8260, + '6' => 8263, '8' => 8265, '1' => 8258, - '6' => 8263, '4' => 8261, - '7' => 8260, '2' => 8259 }, - '33568' => { - '2' => 33569 - }, - '4416' => { - '3' => 4420, - '0' => 4417, - '2' => 4419, - '1' => 4418 - }, - '33824' => { - '2' => 33825 - }, - '33537' => { - '10' => 12308, - '6' => 12304, - '7' => 12305, - '2' => 12289, - '4' => 12291, - '3' => 12290, - '5' => 12292, - '9' => 12307, - '1' => 12288, - '8' => 12306 + '33793' => { + '3' => 18433, + '5' => 18448, + '7' => 18450, + '6' => 18449, + '8' => 18451, + '1' => 18434, + '4' => 18435, + '2' => 18432 }, - '33040' => { - '2' => 33041 + '33809' => { + '3' => 18480, + '5' => 18464, + '7' => 18466, + '6' => 18465, + '8' => 18467, + '1' => 18482, + '4' => 18483, + '2' => 18481 }, - '4128' => { - '3' => 4132, - '0' => 4129, - '2' => 4131, - '1' => 4130 + '4098' => { + '2' => 8262, + '6' => 8266, + '4' => 8268, + '5' => 8267, + '1' => 8264, + '3' => 8269 }, - '34960' => { - '3' => 20499, - '0' => 20496, - '2' => 20498, - '1' => 20497 - }, - '35088' => { - '0' => 14384, - '2' => 14352, - '1' => 14353 + '4400' => { + '3' => 4404, + '1' => 4402, + '0' => 4401, + '2' => 4403 + }, + '4145' => { + '4' => 8210, + '7' => 8213, + '2' => 8208, + '8' => 8214, + '3' => 8209, + '5' => 8211, + '1' => 8212 + }, + '32768' => { + '2' => 32771, + '6' => 33024, + '0' => 32769, + '7' => 33040, + '4' => 3, + '1' => 32770, + '3' => 32772 }, + '4096' => { + '3' => 4100, + '1' => 4098, + '0' => 4097, + '2' => 4099 + }, '4116' => { - '6' => 8461, + '1' => 8456, + '8' => 8463, '2' => 8457, - '7' => 8462, '4' => 8459, '5' => 8460, '3' => 8458, - '1' => 8456, - '8' => 8463 - }, - '32771' => { - '3' => 34944, - '1' => 35072, - '2' => 35088 - }, - '34305' => { - '1' => 19456, - '4' => 19504, - '2' => 19472, - '7' => 19505, - '5' => 19520, - '6' => 19536, - '3' => 19488 - }, - '35072' => { - '2' => 14337, - '1' => 14336 - }, - '12816' => { - '1' => 12818, - '0' => 12817 - }, - '4178' => { - '3' => 8522, - '5' => 8524, - '1' => 8520, - '8' => 8527, - '6' => 8525, - '2' => 8521, - '7' => 8526, - '4' => 8523 + '6' => 8461, + '7' => 8462 }, - '12848' => { - '1' => 12850, - '0' => 12849 - }, - '4145' => { - '5' => 8211, - '3' => 8209, - '1' => 8212, - '8' => 8214, - '7' => 8213, - '4' => 8210, - '2' => 8208 + '4388' => { + '4' => 8746, + '2' => 8736, + '8' => 8742, + '1' => 8737, + '7' => 8743, + '6' => 8744, + '3' => 8747, + '5' => 8745 }, '12880' => { '0' => 12881, '1' => 12882 }, - '4113' => { - '8' => 8535, - '1' => 8448, - '5' => 8452, - '3' => 8450, - '4' => 8451, - '7' => 8534, - '2' => 8449, - '6' => 8453 + '4436' => { + '6' => 9053, + '7' => 9054, + '5' => 9052, + '3' => 9050, + '2' => 9049, + '4' => 9051, + '1' => 9048, + '8' => 9055 }, - '33808' => { - '2' => 33809 + '4112' => { + '3' => 4116, + '1' => 4114, + '0' => 4113, + '2' => 4115 + }, + '12864' => { + '1' => 12866, + '0' => 12865 }, - '4403' => { - '1' => 8767, - '8' => 8760, - '5' => 8763, - '3' => 8765, - '7' => 8761, - '4' => 8764, - '2' => 8766, - '6' => 8762 + '33537' => { + '2' => 12289, + '4' => 12291, + '1' => 12288, + '8' => 12306, + '9' => 12307, + '6' => 12304, + '7' => 12305, + '5' => 12292, + '10' => 12308, + '3' => 12290 + }, + '4420' => { + '3' => 8778, + '5' => 8780, + '7' => 8782, + '6' => 8781, + '8' => 8783, + '1' => 8776, + '4' => 8779, + '2' => 8777 + }, + '4129' => { + '5' => 8196, + '1' => 8192, + '3' => 8194, + '8' => 8199, + '6' => 8197, + '2' => 8193, + '4' => 8195 }, '4352' => { + '3' => 4356, '1' => 4354, - '2' => 4355, '0' => 4353, - '3' => 4356 + '2' => 4355 }, - '4404' => { - '6' => 8754, - '2' => 8758, - '7' => 8752, - '4' => 8756, - '3' => 8757, - '5' => 8755, - '8' => 8753, - '1' => 8759 + '4164' => { + '5' => 8508, + '3' => 8506, + '6' => 8509, + '7' => 8510, + '1' => 8504, + '8' => 8511, + '2' => 8505, + '4' => 8507 }, - '33025' => { - '6' => 4176, - '3' => 4128, - '5' => 4160, - '1' => 4096, - '4' => 4144, - '2' => 4112 - }, - '33553' => { - '10' => 12340, - '6' => 12336, - '4' => 12323, - '7' => 12337, - '2' => 12321, - '5' => 12324, - '9' => 12339, - '3' => 12322, - '1' => 12320, - '8' => 12338 + '33824' => { + '2' => 33825 }, - '4369' => { - '5' => 8987, - '3' => 8989, - '1' => 8991, - '8' => 8984, - '6' => 8986, - '2' => 8990, - '7' => 8985, - '4' => 8988 + '4416' => { + '3' => 4420, + '1' => 4418, + '0' => 4417, + '2' => 4419 }, - '4144' => { - '1' => 4146, - '2' => 4147, - '0' => 4145, - '3' => 4148 + '33536' => { + '2' => 33537 + }, + '12848' => { + '0' => 12849, + '1' => 12850 + }, + '4401' => { + '1' => 9023, + '8' => 9016, + '2' => 9022, + '4' => 9020, + '5' => 9019, + '3' => 9021, + '6' => 9018, + '7' => 9017 }, - '4099' => { - '8' => 8487, - '1' => 8480, - '5' => 8484, - '3' => 8482, - '4' => 8483, - '2' => 8481, - '7' => 8486, - '6' => 8485 + '4354' => { + '1' => 8712, + '8' => 8719, + '2' => 8713, + '4' => 8715, + '5' => 8717, + '3' => 8714, + '6' => 8716, + '7' => 8718 }, - '33793' => { - '5' => 18448, - '3' => 18433, - '1' => 18434, - '8' => 18451, - '6' => 18449, - '4' => 18435, - '7' => 18450, - '2' => 18432 - }, - '4100' => { - '5' => 8492, - '3' => 8490, - '8' => 8495, - '1' => 8488, - '6' => 8493, - '2' => 8489, - '7' => 8494, - '4' => 8491 + '4115' => { + '5' => 8468, + '3' => 8466, + '6' => 8469, + '7' => 8454, + '1' => 8464, + '8' => 8455, + '2' => 8465, + '4' => 8467 }, - '33041' => { - '4' => 4400, - '2' => 4368, - '1' => 4352, - '6' => 4432, - '5' => 4416, - '3' => 4384 - }, - '4129' => { - '5' => 8196, - '6' => 8197, - '3' => 8194, - '1' => 8192, - '4' => 8195, - '2' => 8193, - '8' => 8199 + '4146' => { + '4' => 8218, + '7' => 8221, + '6' => 8220, + '2' => 8216, + '3' => 8217, + '5' => 8219, + '1' => 8215 }, '4353' => { - '6' => 8709, '2' => 8705, '4' => 8707, + '1' => 8704, + '8' => 8711, + '6' => 8709, '7' => 8710, '5' => 8708, - '3' => 8706, - '1' => 8704, - '8' => 8711 + '3' => 8706 + }, + '4384' => { + '2' => 4387, + '0' => 4385, + '1' => 4386, + '3' => 4388 + }, + '4433' => { + '5' => 8788, + '1' => 8784, + '3' => 8786, + '2' => 8785, + '6' => 8789, + '4' => 8787, + '7' => 8790 + }, + '34560' => { + '2' => 34561 + }, + '4404' => { + '1' => 8759, + '8' => 8753, + '2' => 8758, + '4' => 8756, + '5' => 8755, + '3' => 8757, + '6' => 8754, + '7' => 8752 + }, + '4371' => { + '4' => 8732, + '2' => 8734, + '8' => 8728, + '1' => 8735, + '7' => 8729, + '6' => 8730, + '3' => 8733, + '5' => 8731 }, '4180' => { - '3' => 8474, - '5' => 8476, - '6' => 8477, '4' => 8475, '7' => 8478, + '6' => 8477, '2' => 8473, - '8' => 8479 - }, - '4418' => { - '6' => 9037, - '7' => 9038, - '4' => 9035, - '2' => 9033, - '3' => 9034, - '5' => 9036, - '8' => 9039, - '1' => 9032 - }, - '4400' => { - '2' => 4403, - '1' => 4402, - '0' => 4401, - '3' => 4404 - }, - '33552' => { - '2' => 33553 - }, - '4420' => { - '3' => 8778, - '5' => 8780, - '1' => 8776, - '8' => 8783, - '6' => 8781, - '4' => 8779, - '7' => 8782, - '2' => 8777 + '3' => 8474, + '8' => 8479, + '5' => 8476 }, '34944' => { '2' => 20482, - '1' => 20481, '0' => 20480, + '1' => 20481, '3' => 20483 }, - '4096' => { - '2' => 4099, - '1' => 4098, - '3' => 4100, - '0' => 4097 + '33825' => { + '3' => 18514, + '5' => 18496, + '7' => 18498, + '6' => 18497, + '8' => 18499, + '1' => 18512, + '4' => 18515, + '2' => 18513 + }, + '33552' => { + '2' => 33553 + }, + '12832' => { + '1' => 12834, + '0' => 12833 + }, + '33025' => { + '3' => 4128, + '5' => 4160, + '1' => 4096, + '4' => 4144, + '2' => 4112, + '6' => 4176 + }, + '35072' => { + '2' => 14337, + '1' => 14336 + }, + '34960' => { + '1' => 20497, + '3' => 20499, + '2' => 20498, + '0' => 20496 + }, + '4356' => { + '1' => 8968, + '8' => 8975, + '2' => 8969, + '4' => 8971, + '5' => 8972, + '3' => 8970, + '6' => 8973, + '7' => 8974 }, - '34304' => { - '2' => 34305 + '12816' => { + '0' => 12817, + '1' => 12818 }, - '4368' => { - '0' => 4369, - '3' => 4372, - '1' => 4370, - '2' => 4371 + '34561' => { + '2' => 17424, + '4' => 34960, + '1' => 17408, + '3' => 17440 + }, + '4161' => { + '5' => 8244, + '3' => 8242, + '6' => 8245, + '7' => 8246, + '1' => 8240, + '8' => 8247, + '2' => 8241, + '4' => 8243 }, - '4388' => { - '8' => 8742, - '1' => 8737, - '5' => 8745, - '3' => 8747, - '4' => 8746, - '2' => 8736, - '7' => 8743, - '6' => 8744 + '4435' => { + '3' => 9042, + '5' => 9044, + '7' => 9046, + '6' => 9045, + '8' => 9047, + '1' => 9040, + '4' => 9043, + '2' => 9041 }, - '4401' => { - '1' => 9023, - '8' => 9016, - '3' => 9021, - '5' => 9019, - '2' => 9022, - '4' => 9020, - '7' => 9017, - '6' => 9018 + '33024' => { + '2' => 33025 + }, + '4369' => { + '7' => 8985, + '6' => 8986, + '3' => 8989, + '5' => 8987, + '4' => 8988, + '2' => 8990, + '8' => 8984, + '1' => 8991 + }, + '4162' => { + '4' => 8251, + '2' => 8249, + '6' => 8253, + '3' => 8250, + '8' => 8472, + '5' => 8252, + '1' => 8248 + }, + '4179' => { + '4' => 8531, + '2' => 8529, + '8' => 8471, + '1' => 8528, + '7' => 8470, + '6' => 8533, + '3' => 8530, + '5' => 8532 + }, + '4178' => { + '5' => 8524, + '3' => 8522, + '6' => 8525, + '7' => 8526, + '1' => 8520, + '8' => 8527, + '2' => 8521, + '4' => 8523 + }, + '33792' => { + '2' => 33793 + }, + '4147' => { + '7' => 8230, + '4' => 8227, + '6' => 8229, + '2' => 8224, + '3' => 8225, + '8' => 8231, + '5' => 8228 + }, + '4128' => { + '2' => 4131, + '0' => 4129, + '1' => 4130, + '3' => 4132 }, '34816' => { '2' => 34817 }, - '4371' => { - '6' => 8730, - '2' => 8734, - '7' => 8729, - '4' => 8732, - '3' => 8733, - '5' => 8731, - '1' => 8735, - '8' => 8728 + '4099' => { + '5' => 8484, + '3' => 8482, + '6' => 8485, + '7' => 8486, + '1' => 8480, + '8' => 8487, + '2' => 8481, + '4' => 8483 }, - '33569' => { - '4' => 12355, - '2' => 12353, - '7' => 12369, - '10' => 12372, - '6' => 12368, - '1' => 12352, - '8' => 12370, - '5' => 12356, - '9' => 12371, - '3' => 12354 + '34817' => { + '2' => 16384, + '1' => 2 }, - '4112' => { - '2' => 4115, - '1' => 4114, - '3' => 4116, - '0' => 4113 + '33808' => { + '2' => 33809 + }, + '4402' => { + '5' => 9011, + '3' => 9013, + '6' => 9010, + '7' => 9009, + '1' => 9015, + '8' => 9008, + '2' => 9014, + '4' => 9012 }, - '4417' => { - '8' => 9031, - '1' => 9024, - '5' => 9028, - '3' => 9026, - '2' => 9025, - '7' => 9030, - '4' => 9027, - '6' => 9029 + '4130' => { + '7' => 8198, + '4' => 8203, + '2' => 8201, + '6' => 8205, + '3' => 8202, + '1' => 8200, + '5' => 8204 }, - '4354' => { - '4' => 8715, - '2' => 8713, - '7' => 8718, - '6' => 8716, - '1' => 8712, - '8' => 8719, - '3' => 8714, - '5' => 8717 + '4163' => { + '8' => 8503, + '1' => 8496, + '4' => 8499, + '2' => 8497, + '3' => 8498, + '5' => 8500, + '7' => 8502, + '6' => 8501 }, - '4177' => { - '6' => 8517, - '4' => 8515, - '2' => 8513, - '7' => 8518, - '5' => 8516, - '3' => 8514, - '1' => 8512, - '8' => 8519 + '4403' => { + '4' => 8764, + '2' => 8766, + '8' => 8760, + '1' => 8767, + '7' => 8761, + '6' => 8762, + '3' => 8765, + '5' => 8763 }, '4419' => { '2' => 8769, - '7' => 8774, '4' => 8771, - '6' => 8773, - '8' => 8775, '1' => 8768, + '8' => 8775, + '6' => 8773, + '7' => 8774, '5' => 8772, '3' => 8770 }, - '34817' => { - '2' => 16384, - '1' => 2 - } + '4177' => { + '7' => 8518, + '6' => 8517, + '3' => 8514, + '5' => 8516, + '4' => 8515, + '2' => 8513, + '8' => 8519, + '1' => 8512 + }, + '4417' => { + '2' => 9025, + '4' => 9027, + '1' => 9024, + '8' => 9031, + '6' => 9029, + '7' => 9030, + '5' => 9028, + '3' => 9026 + }, + '4100' => { + '7' => 8494, + '6' => 8493, + '3' => 8490, + '5' => 8492, + '4' => 8491, + '2' => 8489, + '8' => 8495, + '1' => 8488 + }, + '4387' => { + '7' => 8739, + '6' => 8740, + '3' => 8750, + '5' => 8741, + '4' => 8751, + '2' => 8749, + '8' => 8738, + '1' => 8748 + }, + '4418' => { + '1' => 9032, + '8' => 9039, + '2' => 9033, + '4' => 9035, + '5' => 9036, + '3' => 9034, + '6' => 9037, + '7' => 9038 + }, + '12800' => { + '0' => 12801, + '1' => 12802 + }, + '4148' => { + '2' => 8232, + '6' => 8226, + '7' => 8237, + '4' => 8235, + '5' => 8236, + '8' => 8233, + '3' => 8234 + }, + '4114' => { + '8' => 8543, + '1' => 8536, + '4' => 8539, + '2' => 8537, + '3' => 8538, + '5' => 8540, + '7' => 8542, + '6' => 8541 + } ); diff --git a/nettools/rebootoep_x11.sh b/nettools/rebootoep_x11.sh index 3bf6c7b..ae3265a 100755 --- a/nettools/rebootoep_x11.sh +++ b/nettools/rebootoep_x11.sh @@ -1,4 +1,4 @@ -export DAQOPSERVER=hades31 +export DAQOPSERVER=hadesp31 #export myvar=$(doyoureallywant.pl "to reboot the MDC-OEPs") #if [ $myvar == "256" ]; then exit; fi diff --git a/nettools/restart_trbnetd b/nettools/restart_trbnetd index e5ff4c3..a9c44b5 100755 --- a/nettools/restart_trbnetd +++ b/nettools/restart_trbnetd @@ -1,4 +1,4 @@ #!/bin/bash #export DAQOPSERVER=etraxp023 #command_client.pl -e $DAQOPSERVER -c "killall trbnetd; trbnetd" -ssh hades31 "killall -9 trbnetd; trbnetd" +ssh hadesp31 "killall -9 trbnetd; trbnetd" diff --git a/oracle/postgres2ora.pl b/oracle/postgres2ora.pl index ff4ab7b..3f134e3 100755 --- a/oracle/postgres2ora.pl +++ b/oracle/postgres2ora.pl @@ -283,7 +283,8 @@ for my $i (0 .. $#channelList) #-------- Finish and disconnect &finishAndDisconnect(); -print "The End.\n" if ($opt_verb); +print "Import of postgres2ora finished successfully.\n"; +#if ($opt_verb); exit(0); ################### END OF MAIN #################### @@ -581,7 +582,7 @@ $success &&= $orasth_store_paras->execute($ch_id, $ch_name, $ch_smplid, $ch_smpl print "ERROR during store parameters!"; } - print "success is: $success"; + # print "success is: $success"; my $result = ($success ? $oradbh->commit : $oradbh->rollback); diff --git a/oracle/runinfo2ora.pl b/oracle/runinfo2ora.pl index 3b5239f..a2d0e92 100755 --- a/oracle/runinfo2ora.pl +++ b/oracle/runinfo2ora.pl @@ -234,10 +234,11 @@ sub checkPrefix() # rp COMMON RPC # fw COMMON FOREWARD WALL # pt COMMON PIONTRACKER +# tc ?? #no prefixes are excluded from @prefixList # my @prefixList = qw/be co ri ru sh tr ve st to md rp te pu fw/; - my @prefixList = qw/be co ri ru sh tr ve st to md rp fw pt/; + my @prefixList = qw/be co ri ru sh tr ve st to md rp fw pt tc/; my $pref; foreach $pref (@prefixList) { diff --git a/oracle/runinfo2orastart_parallel.sh b/oracle/runinfo2orastart_parallel.sh index a16b7fb..a5fe821 100755 --- a/oracle/runinfo2orastart_parallel.sh +++ b/oracle/runinfo2orastart_parallel.sh @@ -5,39 +5,39 @@ # for icinga restart handler, we need to kill old processes first: #echo "killing old processes:" /bin/pidof -x runinfo2ora.pl -/bin/pidof -x runinfo2ora.pl | /usr/bin/xargs /bin/kill -9 +/bin/pidof -x runinfo2ora.pl | /usr/bin/xargs /bin/kill '-s 9' # need to specify oracle environment for remote icinga restart: export ORACLE_HOME=/usr/lib/oracle/12.1/client64 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_5/eb_runinfo2ora_1.txt > /home/hadaq/log/runinfo2ora_1_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb05/eb_runinfo2ora_1.txt > /home/hadaq/log/runinfo2ora_1_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_2/eb_runinfo2ora_2.txt > /home/hadaq/log/runinfo2ora_2_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb02/eb_runinfo2ora_2.txt > /home/hadaq/log/runinfo2ora_2_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_3/eb_runinfo2ora_3.txt > /home/hadaq/log/runinfo2ora_3_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb03/eb_runinfo2ora_3.txt > /home/hadaq/log/runinfo2ora_3_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_4/eb_runinfo2ora_4.txt > /home/hadaq/log/runinfo2ora_4_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb04/eb_runinfo2ora_4.txt > /home/hadaq/log/runinfo2ora_4_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_5/eb_runinfo2ora_5.txt > /home/hadaq/log/runinfo2ora_5_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb05/eb_runinfo2ora_5.txt > /home/hadaq/log/runinfo2ora_5_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_2/eb_runinfo2ora_6.txt > /home/hadaq/log/runinfo2ora_6_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb02/eb_runinfo2ora_6.txt > /home/hadaq/log/runinfo2ora_6_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_3/eb_runinfo2ora_7.txt > /home/hadaq/log/runinfo2ora_7_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb03/eb_runinfo2ora_7.txt > /home/hadaq/log/runinfo2ora_7_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_4/eb_runinfo2ora_8.txt > /home/hadaq/log/runinfo2ora_8_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb04/eb_runinfo2ora_8.txt > /home/hadaq/log/runinfo2ora_8_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_5/eb_runinfo2ora_9.txt > /home/hadaq/log/runinfo2ora_9_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb05/eb_runinfo2ora_9.txt > /home/hadaq/log/runinfo2ora_9_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_2/eb_runinfo2ora_10.txt > /home/hadaq/log/runinfo2ora_10_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb02/eb_runinfo2ora_10.txt > /home/hadaq/log/runinfo2ora_10_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_3/eb_runinfo2ora_11.txt > /home/hadaq/log/runinfo2ora_11_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb03/eb_runinfo2ora_11.txt > /home/hadaq/log/runinfo2ora_11_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_4/eb_runinfo2ora_12.txt > /home/hadaq/log/runinfo2ora_12_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb04/eb_runinfo2ora_12.txt > /home/hadaq/log/runinfo2ora_12_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_5/eb_runinfo2ora_13.txt > /home/hadaq/log/runinfo2ora_13_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb05/eb_runinfo2ora_13.txt > /home/hadaq/log/runinfo2ora_13_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_2/eb_runinfo2ora_14.txt > /home/hadaq/log/runinfo2ora_14_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb02/eb_runinfo2ora_14.txt > /home/hadaq/log/runinfo2ora_14_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_3/eb_runinfo2ora_15.txt > /home/hadaq/log/runinfo2ora_15_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb03/eb_runinfo2ora_15.txt > /home/hadaq/log/runinfo2ora_15_log.txt 2>&1 & sleep 1 -/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/oper_4/eb_runinfo2ora_16.txt > /home/hadaq/log/runinfo2ora_16_log.txt 2>&1 & +/home/hadaq/trbsoft/daq/oracle/runinfo2ora.pl -f /home/hadaq/oper/lxhadeb04/eb_runinfo2ora_16.txt > /home/hadaq/log/runinfo2ora_16_log.txt 2>&1 & diff --git a/pion/config/nxyter/setup.sh b/pion/config/nxyter/setup.sh index 72381ed..8d20119 100755 --- a/pion/config/nxyter/setup.sh +++ b/pion/config/nxyter/setup.sh @@ -33,6 +33,7 @@ trbcmd setbit $board 0x8419 0x80000000 # Disable WaitForData CTS_DELAY=0 ADC_OFF=0 + case $board in 0x3800) CTS_DELAY=210 @@ -62,7 +63,10 @@ esac trbcmd loadbit $board 0x8403 0x0000ffff $CTS_DELAY trbcmd loadbit $board 0x8403 0xffff0000 $((CTS_DELAY << 16)) if [ $ADC_OFF -eq 1 ] ; then - trbcmd w $board 0x8504 0x80000000 + trbcmd w $board 0x8504 0x80000000 # Disable ADC + trbcmd setbit $board 0x8166 0x04 # Without ADC no Calibraton Trigger is needed, turn it of +else + trbcmd clearbit $board 0x8166 0x04 fi # Turn on SEU @@ -74,11 +78,11 @@ trbcmd w $board 0xd500 1 # TS Cut Level2 140 220 [ns] trbcmd w $board 0x8420 0x007d0064 -# HistRange -trbcmd w $board 0x8421 2 +# HistRange 500ns +trbcmd w $board 0x8421 0 # 500ns -# Turn off Status Trigger, enable Physics and Calibration Trigger -trbcmd w $board 0x8166 0x02 +# Turn off Status Trigger +trbcmd setbit $board 0x8166 0x02 #Enable Testpulse trbcmd w $board 0x8253 1 diff --git a/rich/peds/current b/rich/peds/current index a435422..fc93efb 120000 --- a/rich/peds/current +++ b/rich/peds/current @@ -1 +1 @@ -ri1423218530601 \ No newline at end of file +ri1425016265401 \ No newline at end of file diff --git a/rich/register_thresholds.db b/rich/register_thresholds.db index f3ca1cf..02f38ee 120000 --- a/rich/register_thresholds.db +++ b/rich/register_thresholds.db @@ -1 +1 @@ -/home/hadaq/trbsoft/daq/rich/peds/ri1423218530601/register_thresholds.db \ No newline at end of file +/home/hadaq/trbsoft/daq/rich/peds/ri1425016265401/register_thresholds.db \ No newline at end of file diff --git a/shower/reload.sh b/shower/reload.sh index 5330bc5..7525c87 100755 --- a/shower/reload.sh +++ b/shower/reload.sh @@ -1,5 +1,3 @@ -`/home/hadaq/bin/stoptrigger.sh` -`perl /home/hadaq/bin/showerpeds.pl -f showerpeds.dat write` +`showerpeds.pl -f showerpeds.dat write` -`/home/hadaq/bin/starttrigger.sh` diff --git a/shower/showerpeds.dat b/shower/showerpeds.dat index 0ffd801..76d8082 120000 --- a/shower/showerpeds.dat +++ b/shower/showerpeds.dat @@ -1 +1 @@ -sh1422509152202.hld.update23.08.2014ver4.txt \ No newline at end of file +sh1425018162001.hld_v48.txt \ No newline at end of file diff --git a/start/ThreshNinoStart.db b/start/ThreshNinoStart.db index 33ed768..8720654 100644 --- a/start/ThreshNinoStart.db +++ b/start/ThreshNinoStart.db @@ -7,7 +7,7 @@ 5000 1 2 0 5 3 0x7000 5000 1 2 0 6 3 0x7000 5000 1 2 0 7 3 0x2000 - 5000 1 2 1 0 3 0x0000 # ch. 4 + 5000 1 2 1 0 3 0x7000 # ch. 4 5000 1 2 1 1 3 0x7000 # ch. 3 5000 1 2 1 2 3 0x7000 # ch. 2 5000 1 2 1 3 3 0x7000 # ch. 1 @@ -26,7 +26,7 @@ 5000 2 2 0 7 3 0x9000 5000 2 2 1 0 3 0x7000 ### ch. 4 5000 2 2 1 1 3 0x7000 ### ch. 3 - 5000 2 2 1 2 3 0x8000 ### ch. 2 + 5000 2 2 1 2 3 0x9000 ### ch. 2 5000 2 2 1 3 3 0x7000 ### ch. 1 5000 2 2 1 4 3 0x7000 ### ch. 5 5000 2 2 1 5 3 0x7000 ### ch. 6 @@ -63,7 +63,7 @@ 5001 2 2 0 7 3 0x9000 5001 2 2 1 0 3 0x9000 ### ch. 4 5001 2 2 1 1 3 0x9000 ### ch. 3 - 5001 2 2 1 2 3 0x9000 ### ch. 2 + 5001 2 2 1 2 3 0xa000 ### ch. 2 5001 2 2 1 3 3 0x9000 ### ch. 1 5001 2 2 1 4 3 0x9000 ### ch. 5 5001 2 2 1 5 3 0x9000 ### ch. 6 @@ -83,7 +83,7 @@ 5002 1 2 0 7 3 0xa000 5002 1 2 1 0 3 0x6000 ### ch. 4 5002 1 2 1 1 3 0x6000 ### ch. 3 - 5002 1 2 1 2 3 0x6000 ### ch. 2 + 5002 1 2 1 2 3 0x7000 ### ch. 2 5002 1 2 1 3 3 0x6000 ### ch. 1 5002 1 2 1 4 3 0x6000 ### ch. 5 5002 1 2 1 5 3 0x6000 ### ch. 6 @@ -100,17 +100,17 @@ 5002 2 2 0 7 3 0x9000 5002 2 2 1 0 3 0x8000 ### ch. 4 5002 2 2 1 1 3 0x8000 ### ch. 3 - 5002 2 2 1 2 3 0x8000 ### ch. 2 + 5002 2 2 1 2 3 0x9500 ### ch. 2 5002 2 2 1 3 3 0x8000 ### ch. 1 5002 2 2 1 4 3 0x8000 ### ch. 5 5002 2 2 1 5 3 0x8000 ### ch. 6 5002 2 2 1 6 3 0x8000 ### ch. 7 - 5002 2 2 1 7 3 0x8000 ### ch. 8 + 5002 2 2 1 7 3 0x9000 ### ch. 8 ######6 ####### Next TDC ####### # Board Chain ChainLen DAC Channel Command Value - 5003 1 2 0 0 3 0x6000 # ---Glob. Thres #7 + 5003 1 2 0 0 3 0x7000 # ---Glob. Thres #7 5003 1 2 0 1 3 0x6000 # 5003 1 2 0 2 3 0x7000 # --- Str. 9-10ns, 7-20ns, 6 - 30ns, 5-70ns 5003 1 2 0 3 3 0x7000 # @@ -118,8 +118,8 @@ 5003 1 2 0 5 3 0x7000 5003 1 2 0 6 3 0x7000 5003 1 2 0 7 3 0x7000 - 5003 1 2 1 0 3 0x6000 ### ch. 4 - 5003 1 2 1 1 3 0x6000 ### ch. 3 + 5003 1 2 1 0 3 0x7000 ### ch. 4 + 5003 1 2 1 1 3 0x8000 ### ch. 3 5003 1 2 1 2 3 0x6000 ### ch. 2 5003 1 2 1 3 3 0x6000 ### ch. 1 5003 1 2 1 4 3 0x6000 ### ch. 5 @@ -137,10 +137,10 @@ 5003 2 2 0 7 3 0xf000 5003 2 2 1 0 3 0x7000 ### ch. 4 5003 2 2 1 1 3 0x7000 ### ch. 3 - 5003 2 2 1 2 3 0x7000 ### ch. 2 + 5003 2 2 1 2 3 0x8000 ### ch. 2 5003 2 2 1 3 3 0x7000 ### ch. 1 5003 2 2 1 4 3 0x7000 ### ch. 5 5003 2 2 1 5 3 0x7000 ### ch. 6 - 5003 2 2 1 6 3 0x6000 ### ch. 7 + 5003 2 2 1 6 3 0x7000 ### ch. 7 5003 2 2 1 7 3 0x7000 ### ch. 8 # EndOF diff --git a/start/howto_hodo b/start/howto_hodo new file mode 100644 index 0000000..497739b --- /dev/null +++ b/start/howto_hodo @@ -0,0 +1,41 @@ +#HOWTO-HODO + +#TRB3 Board: fe48 +#4 Padiwa-AMPS: 5010-5013 + +#start vncserver +ssh hadaq@hadesdaq01 +LANG=en_US.UTF8 LC_CTYPE=en_US.UTF8 vncserver:2 + + +#Thresholds + +#Thresholds saved in +~/trbsoft/daq/start +ThreshPadiwaVeto.db + +#load thresholds +/home/hadaq/trbsoft/daqtools/tools/dac_program.pl ThreshPadiwaVeto.db + +#startup-script +~/trbsoft/daq/start + +#load startup_script +~/trbsoft/daq/start +bash startup.script + +#invert slow inputs +/home/hadaq/trbsoft/daqtools/tools/padiwa.pl 0x5010 0 invert 0xaaaa + +#Monitoring in webbrowser +hades33:1234 +hades33.gsi.de/mon + +#load new TRB3 design +trbflash info 0xfe48 +trbflash program 0xfe48 ***.bit +trbcmd reload 0xfe48 + +#padiwa.pl +~/trbsoft/daqtools/padiwa.pl + diff --git a/start/startup.script b/start/startup.script index 106cdbc..a074c72 100644 --- a/start/startup.script +++ b/start/startup.script @@ -1,4 +1,6 @@ + + #Set all addresses !ifndef RESTART set_addresses serials_start.db addresses_start.db #addresses for Start/Veto TRB @@ -28,14 +30,14 @@ trbcmd w 0xfe4e 0xc804 0x00000080 #Hodoscope inputs -# trbcmd w 0x5010 0xc802 0xffffffff # disable channel 0-31 -# trbcmd w 0x5010 0xc803 0x00000000 # disable channel 32-63 -# trbcmd w 0x5011 0xc802 0x00000000 # disable channel 0-31 -# trbcmd w 0x5011 0xc803 0x00000000 # disable channel 32-63 -# trbcmd w 0x5012 0xc802 0x000000c0 # disable channel 0-31 -# trbcmd w 0x5012 0xc803 0x00000000 # disable channel 32-63 -# trbcmd w 0x5013 0xc802 0xffffffff # disable channel 0-31 -# trbcmd w 0x5013 0xc803 0x00000000 # disable channel 32-63 + trbcmd w 0x5010 0xc802 0xffffffff # disable channel 0-31 + trbcmd w 0x5010 0xc803 0x00000000 # disable channel 32-63 + trbcmd w 0x5011 0xc802 0xffffffff # disable channel 0-31 + trbcmd w 0x5011 0xc803 0x00000000 # disable channel 32-63 + trbcmd w 0x5012 0xc802 0xffffffff # disable channel 0-31 + trbcmd w 0x5012 0xc803 0x00000000 # disable channel 32-63 + trbcmd w 0x5013 0xc802 0xffffffff # disable channel 0-31 + trbcmd w 0x5013 0xc803 0x00000000 # disable channel 32-63 #Start inputs # trbcmd w 0x5000 0xc802 0xfffcfcfc # disable channel 0-31 @@ -59,7 +61,8 @@ trbcmd w 0xfe4e 0xc804 0x00000080 trbcmd w 0x5000 0xcf00 0xfeee trbcmd w 0x5001 0xcf00 0x0000 trbcmd w 0x5002 0xcf00 0xfeee -trbcmd w 0x5003 0xcf00 0x7e1e +#trbcmd w 0x5003 0xcf00 0x7e1c #second input channel in 5003 shows permanent high +trbcmd w 0x5003 0xcf00 0x7e1e trbcmd w 0x8880 0xcf00 0x1101 #Forward to CTS via central FPGA #Connected to second Start input on CTS diff --git a/utils/hldlast b/utils/hldlast index 80e9498..dd5b9e3 100755 --- a/utils/hldlast +++ b/utils/hldlast @@ -1,14 +1,23 @@ #!/bin/bash -#Whoever made these changes should have checked if they work! -#[ "$2" ] && num=$2 || num=5 -#echo "Shows last $num hld files:" +STORAGE_LIST="lxhadeb02 lxhadeb03 lxhadeb04 lxhadeb05" -echo lxhadeb05 -ssh lxhadeb05 "ls -rtlh /data*/data/*.hld | tail -n$1" -echo lxhadeb02 -ssh lxhadeb02 "ls -rtlh /data*/data/*.hld | tail -n$1" -echo lxhadeb03 -ssh lxhadeb03 "ls -rtlh /data*/data/*.hld | tail -n$1" -echo lxhadeb04 -ssh lxhadeb04 "ls -rtlh /data*/data/*.hld | tail -n$1" +if [ -z "$1" ] ; then + num=1 +else + if [ "$1" == "-h" ]; then + echo "Usage: hldlast [NumEvts]" + echo " NumEvts: Number of Events to look for in the past (default: 1)" + echo; + exit 0; + else + num=$1 + fi +fi + +for storage in $STORAGE_LIST +do + echo "${storage}:" + ssh $storage "ls -rtlh /data*/data/*.hld | tail -n $num" + echo +done -- 2.43.0