From 8f3424555ecad30adf04ae8806867a2153f80f65 Mon Sep 17 00:00:00 2001 From: "Hadaq@styx" Date: Thu, 10 Oct 2013 17:07:04 +0200 Subject: [PATCH] new versions of xml-db and cosy files --- users/cosy_test/config/nxyter/setup.sh | 2 +- users/cosy_test/evtbuilder_start.sh | 2 +- web/htdocs/scripts/getdata.js | 27 ++++ xml-db/database/Nxyter.xml | 176 +++++++++++++++++++++++++ xml-db/database/TrbNet.xml | 81 +++++++++++- xml-db/get.pl | 4 +- xml-db/schema/TrbNetCommon.xsd | 3 + 7 files changed, 290 insertions(+), 5 deletions(-) create mode 100644 web/htdocs/scripts/getdata.js create mode 100644 xml-db/database/Nxyter.xml diff --git a/users/cosy_test/config/nxyter/setup.sh b/users/cosy_test/config/nxyter/setup.sh index 1187066..6e7ce33 100755 --- a/users/cosy_test/config/nxyter/setup.sh +++ b/users/cosy_test/config/nxyter/setup.sh @@ -34,7 +34,7 @@ trbcmd w 0x3800 0x8102 0x01 # reset counters, flush FIFO echo "clear data fifo" -trbcmd rm 0x3800 0x8600 4000 1 > /dev/null +trbcmd rm 0x3800 0x8600 4000 2>/dev/null # Set readout Mode trbcmd w 0x3800 0x8180 0x00 # normal mode diff --git a/users/cosy_test/evtbuilder_start.sh b/users/cosy_test/evtbuilder_start.sh index 7cf25ec..d21af62 100755 --- a/users/cosy_test/evtbuilder_start.sh +++ b/users/cosy_test/evtbuilder_start.sh @@ -39,7 +39,7 @@ while getopts "d:s:p:th" opt; do done sdopts="--resdownscale 20 --resnumevents 2000 --respath ${sdest} --ressizelimit 80" -extraopts="" +extraopts="--online" [ ${sden} -eq 1 ] && extraopts="$sdopts" ./evtbuilder_stop.sh diff --git a/web/htdocs/scripts/getdata.js b/web/htdocs/scripts/getdata.js new file mode 100644 index 0000000..7a33b4c --- /dev/null +++ b/web/htdocs/scripts/getdata.js @@ -0,0 +1,27 @@ +function getdata(command,dId,async) { + //async==true : do what you can when you can do it :D + //async==false : do the task after you finished the previous task! + + // super duper debug line! +// alert("caller is " + arguments.callee.caller.toString()); + + var xmlhttp = null; + //var cb = null; + xmlhttp=new XMLHttpRequest(); + //cb = callback; + var destId = dId; + + xmlhttp.onreadystatechange = function() { + if(xmlhttp.readyState == 4 && xmlhttp.status==200) { + //if(cb) + if(document.getElementById(destId)){ + document.getElementById(destId).innerHTML = xmlhttp.responseText; + } + //cb(xmlhttp.responseText); + //document.getElementById(destId).innerHTML = xmlhttp.responseText; + } + } + + xmlhttp.open("GET",command,async); + xmlhttp.send(null); + } \ No newline at end of file diff --git a/xml-db/database/Nxyter.xml b/xml-db/database/Nxyter.xml new file mode 100644 index 0000000..a7fdd61 --- /dev/null +++ b/xml-db/database/Nxyter.xml @@ -0,0 +1,176 @@ + + + Registers for the Nxyter Readout + + + + + Number of invalid frames + + + + Number of hit overflows + + + + Number of hit overflows + + + + Number of hit overflows + + + + Trigger Rate + + + + Number of Hits on nxyter + + + + + + + + Rate of test pulses + + + + Delay of the testpulse after Trigger + + + + Enable test pulse + + + + + + + + Readout mode selection + + Ref + Valid + Window + Ref + Valid + Raw + Time + Valid + Raw + Raw + Valid + + + + Delay of the trigger window + + + + Width of the trigger window + + + + CTS Trigger Delay + + + + Maximal read-out time + + + + Maximal read-out time + + + + Internal reference timestamp of current event + + + + Lower timestamp limit of data selection window + + + + Upper timestamp limit of data selection window + + + + Data Fifo data delay + + + + Data channel read-out finished + + + + + + + + + + + + Current Timestamp Value read from Fifo + + + + + Status of the timestamp Fifo + + Timestamp Fifo full + + + Timestamp Fifo Empty + + + Timestamp Fifo Almost Empty + + + Synchronized to Nxyter Frame + + + + + Number of Resyncs + + + + + Number of Parity Errors + + + + + Number of Parity Errors (add 4 ns until bugfix is done) + + + + + Number of ADC Resets + + + + + Debug Multiplexer selection + + Normal Debug + ADC Nxyter + ADC Testchannel + ADC Reset Handler + + + + + Current ADC Fifo value + + + + + + + diff --git a/xml-db/database/TrbNet.xml b/xml-db/database/TrbNet.xml index 6c77701..14256e5 100644 --- a/xml-db/database/TrbNet.xml +++ b/xml-db/database/TrbNet.xml @@ -10,11 +10,90 @@ Common Status Register 0 - + Board temperature + + + Event counters for LVL1 and Data channel + + Lvl1 event counter + + + Number of last read-out event + + + + + Lvl1 status information + + Status of the LVL1 trigger handler state machine + Idle + Timing found + LVL1 received + tmg and lvl1 dont match + Done + + + Last reference time was too short + + + Missing reference time + + + Spurious reference time + + + Wrong polarity of reference time + + + Reference time to LVL1 too long delay + + + Internal and received trigger number match + + + Multiple reference time pulses + + + LVL1 data valid + + + Found reference time + + + Delay between reference time and LVL1 + + + + + Trigger input statistics + + Number of edges on trigger input + + + Length of last reference time signal + + + + Statistics on retransmits and resets + + Number of received network resets + + + Number of retransmit requests received + + + Number of retransmit requests sent + + + + + + + Compilation Time diff --git a/xml-db/get.pl b/xml-db/get.pl index 89bf027..9bbf374 100755 --- a/xml-db/get.pl +++ b/xml-db/get.pl @@ -115,7 +115,7 @@ sub FormatPretty { when ("integer") {$ret .= sprintf("$cl>%i",$value);} when ("unsigned") {$ret .= sprintf("$cl>%u",$value);} when ("signed") {$ret .= sprintf("$cl>%d",$value);} - when ("binary"|"bitmask") {$ret .= sprintf("%b",$value);} + when ("binary"|"bitmask") {$ret .= sprintf("%0".$obj->{bits}."b",$value);} when ("time") {$ret .= time2str('>%Y-%m-%d %H:%M',$value);} when ("hex") {$ret .= sprintf("$cl>%8x",$value);} when ("enum") { my $t = sprintf(">%x",$value); @@ -137,7 +137,7 @@ sub FormatPretty { when ("unsigned") {$ret = sprintf("%u",$value);} when ("signed") {$ret = sprintf("%d",$value);} when ("binary") {$ret = sprintf("%b",$value);} - when ("bitmask") {$ret = sprintf("%b",$value);} + when ("bitmask") {$ret = sprintf("%0".$obj->{bits}."b",$value);} when ("time") {$ret = time2str('%Y-%m-%d %H:%M',$value);} when ("hex") {$ret = sprintf("%8x",$value);} when ("enum") { my $t = sprintf("%x",$value); diff --git a/xml-db/schema/TrbNetCommon.xsd b/xml-db/schema/TrbNetCommon.xsd index d776494..f84ff20 100644 --- a/xml-db/schema/TrbNetCommon.xsd +++ b/xml-db/schema/TrbNetCommon.xsd @@ -58,6 +58,7 @@ + @@ -93,6 +94,7 @@ --> + -- 2.43.0