From 6c47b4ac1ba10f57fc1d336efccddf699d5b8b41 Mon Sep 17 00:00:00 2001 From: Michael Traxler Date: Wed, 22 Oct 2014 22:47:53 +0200 Subject: [PATCH] first version of CBM RICH config files --- users/cern_cbmrich/EventBuilder.xml | 97 ++ users/cern_cbmrich/README | 77 ++ users/cern_cbmrich/README_setup.txt | 18 + users/cern_cbmrich/addresses_trb3.db | 115 ++ users/cern_cbmrich/check_ping.pl | 70 ++ users/cern_cbmrich/dmon_config.pl | 21 + users/cern_cbmrich/go4/first.C | 81 ++ users/cern_cbmrich/go4/online4.hotstart | 134 +++ .../prepare_padiwas_invert_leds.pl | 48 + users/cern_cbmrich/register_config_tdc.db | 97 ++ users/cern_cbmrich/register_configgbe.db | 40 + users/cern_cbmrich/register_configgbe_ip.db | 57 + .../run_thresh_on_system_single.pl | 18 + users/cern_cbmrich/start_display.sh | 12 + users/cern_cbmrich/start_readout.pl | 63 + users/cern_cbmrich/startup.sh | 143 +++ users/cern_cbmrich/thresh/dummythresholds.thr | 1024 +++++++++++++++++ .../thresh/thresholds_2310_full_offset0.thr | 1024 +++++++++++++++++ .../thresh/thresholds_2310_single_offset0.thr | 1024 +++++++++++++++++ 19 files changed, 4163 insertions(+) create mode 100644 users/cern_cbmrich/EventBuilder.xml create mode 100644 users/cern_cbmrich/README create mode 100644 users/cern_cbmrich/README_setup.txt create mode 100644 users/cern_cbmrich/addresses_trb3.db create mode 100755 users/cern_cbmrich/check_ping.pl create mode 100644 users/cern_cbmrich/dmon_config.pl create mode 100644 users/cern_cbmrich/go4/first.C create mode 100644 users/cern_cbmrich/go4/online4.hotstart create mode 100755 users/cern_cbmrich/prepare_padiwas_invert_leds.pl create mode 100644 users/cern_cbmrich/register_config_tdc.db create mode 100644 users/cern_cbmrich/register_configgbe.db create mode 100644 users/cern_cbmrich/register_configgbe_ip.db create mode 100755 users/cern_cbmrich/run_thresh_on_system_single.pl create mode 100755 users/cern_cbmrich/start_display.sh create mode 100755 users/cern_cbmrich/start_readout.pl create mode 100755 users/cern_cbmrich/startup.sh create mode 100644 users/cern_cbmrich/thresh/dummythresholds.thr create mode 100644 users/cern_cbmrich/thresh/thresholds_2310_full_offset0.thr create mode 100644 users/cern_cbmrich/thresh/thresholds_2310_single_offset0.thr diff --git a/users/cern_cbmrich/EventBuilder.xml b/users/cern_cbmrich/EventBuilder.xml new file mode 100644 index 0000000..2b5bf1d --- /dev/null +++ b/users/cern_cbmrich/EventBuilder.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/users/cern_cbmrich/README b/users/cern_cbmrich/README new file mode 100644 index 0000000..aa2ed72 --- /dev/null +++ b/users/cern_cbmrich/README @@ -0,0 +1,77 @@ +#to start deamon +TRB3_SERVER=trb056 ~/trbsoft/trbnettools/binlocal/trbnetd -i 56 + +#set environment +export DAQOPSERVER=localhost:56 + +# write the environment settings in the shell rc file +export TRB3_SERVER=trb056 +export DAQOPSERVER=localhost:56 + + +# to see the list of the endpoints +trbcmd i 0xffff +0xf3c0 0x000000046f1cde28 0x05 # central FPGA +0xf305 0x4d0000046f1c6328 0x00 # pripheral FPGA +0xf305 0x820000046f1c6928 0x01 +0xf305 0x1f0000046f1cba28 0x02 +0xf305 0xbb0000046f1b5e28 0x03 + +# user script is in trbsoft/daqtools/users/gsi_dirc/ +cd ~/trbsoft/daqtools/users/gsi_dirc/ + +# the network addresses of the trb3 can be changed in +# daqtools/base/addresses_trb3.db + +# to configure the trb3 run +./startup.sh + +# to start the cts +cd ~/trbsoft/daqtools/web + +# make sure the environment settings are correct (DAQOPSERVER and TRB3_SERVER) +./cts_gui --noopenxterm + +# to monitor the cts open a webserver and go to the address "localhost:1234" +# and check the DAQOPSERVER label at the bottom of the page. This should be +# the same as the trb3 number. + +# to start data taking +daq_evtbuild -m 1 -d file -o /tmp +daq_netmem -m 1 -i UDP:127.0.0.1:50000 + + +### Padiwa + +##Thresholds can be set via webserver and scripts + +#script for single endpoint +./thresholds_automatic.pl -h + +usage: thresholds_automatic.pl --endpoint= +#--chain= [--offset=] + [--help] [--mode=<"padiwa"|"cbmrich">] [--32channel] + +example: + +thresholds_automatic.pl --endpoint=0x303 --chain=0 --offset=0x10 --32channel +or in short +thresholds_automatic.pl -e 0x303 -o 0x10 -c 0 + +currently only mode "padiwa" is implemented. + +polarity: tells what the status of bit 32 is, when the thresholds are set to 0 +32channel: when set the tool assums a TDC with 32 channels, leading and +trailing channels use two channels + + +# script for many endpoints +./run_thresh_on_system.pl -h + +usage: +run_threshold_on_system.pl |options] + +example: +run_threshold_on_system.pl --endpoints=0x301-0x308,0x310..0x315,0x380 +--chains=0..3 --offset=4 --polarity=0 +will run for endpoints 0x301-0x308 and 0x310-0x315 and 0x380 for all chains (0..3) diff --git a/users/cern_cbmrich/README_setup.txt b/users/cern_cbmrich/README_setup.txt new file mode 100644 index 0000000..11cd0c2 --- /dev/null +++ b/users/cern_cbmrich/README_setup.txt @@ -0,0 +1,18 @@ +PMT1 PADIWA 1-4 TRB #105 +PMT2 PADIWA 5-8 TRB #89 +PMT3 PADIWA 9-12 TRB #57 +PMT4 PADIWA 14-16 TRB #99 +PMT5 PADIWA 17-20 TRB #73 +PMT6 PADIWA 21-24 TRB #102 +PMT7 PADIWA 25-28 TRB #83 +PMT8 PADIWA 29-32 TRB #78 +PMT9 PADIWA 33-36 TRB #104 +PMT10 PADIWA 37-40 TRB #74 +PMT11 PADIWA 41-44 TRB #72 +PMT12 PADIWA 45-48 TRB #47 +PMT13 PADIWA 49-52 TRB #59 +PMT14 PADIWA 53-56 TRB #84 +PMT15 PADIWA 57-60 TRB #97 +PMT16 PADIWA 61-63 TRB #29 +Beam Lemo inputs TRB #101 + diff --git a/users/cern_cbmrich/addresses_trb3.db b/users/cern_cbmrich/addresses_trb3.db new file mode 100644 index 0000000..cda8608 --- /dev/null +++ b/users/cern_cbmrich/addresses_trb3.db @@ -0,0 +1,115 @@ +0x0010 105 0 +0x0011 105 1 +0x0012 105 2 +0x0013 105 3 +0x8015 105 5 + +0x0020 89 0 +0x0021 89 1 +0x0022 89 2 +0x0023 89 3 +0x8025 89 5 + +0x0030 101 0 +0x0031 101 1 +0x0032 101 2 +0x0033 101 3 +0x8035 101 5 + +0x0040 99 0 +0x0041 99 1 +0x0042 99 2 +0x0043 99 3 +0x8045 99 5 + +0x0050 73 0 +0x0051 73 1 +0x0052 73 2 +0x0053 73 3 +0x8055 73 5 + +0x0060 102 0 +0x0061 102 1 +0x0062 102 2 +0x0063 102 3 +0x8065 102 5 + +0x0070 83 0 +0x0071 83 1 +0x0072 83 2 +0x0073 83 3 +0x8075 83 5 + +0x0080 78 0 +0x0081 78 1 +0x0082 78 2 +0x0083 78 3 +0x8085 78 5 + +0x0090 104 0 +0x0091 104 1 +0x0092 104 2 +0x0093 104 3 +0x8095 104 5 + +0x00a0 74 0 +0x00a1 74 1 +0x00a2 74 2 +0x00a3 74 3 +0x80a5 74 5 + +0x00b0 72 0 +0x00b1 72 1 +0x00b2 72 2 +0x00b3 72 3 +0x80b5 72 5 + +0x00c0 47 0 +0x00c1 47 1 +0x00c2 47 2 +0x00c3 47 3 +0x80c5 47 5 + +0x00d0 59 0 +0x00d1 59 1 +0x00d2 59 2 +0x00d3 59 3 +0x80d5 59 5 + +0x00e0 84 0 +0x00e1 84 1 +0x00e2 84 2 +0x00e3 84 3 +0x80e5 84 5 + +0x00f0 97 0 +0x00f1 97 1 +0x00f2 97 2 +0x00f3 97 3 +0x80f5 97 5 + +0x0100 29 0 +0x0101 29 1 +0x0102 29 2 +0x0103 29 3 +0x8105 29 5 + +0x0110 57 0 +0x0111 57 1 +0x0112 57 2 +0x0113 57 3 +0x8115 57 5 + +0x0120 0 0 +0x0121 0 1 +0x0122 0 2 +0x0123 0 3 +0x8125 0 5 + + +#CTS +0x7000 56 0 +0x7001 56 1 +0x7002 56 2 +0x7003 56 3 +0x7005 56 5 diff --git a/users/cern_cbmrich/check_ping.pl b/users/cern_cbmrich/check_ping.pl new file mode 100755 index 0000000..0ad54d2 --- /dev/null +++ b/users/cern_cbmrich/check_ping.pl @@ -0,0 +1,70 @@ +#!/usr/bin/perl + +use warnings; +use strict; +use Parallel::ForkManager; +use Net::Ping; + + +my $map = { + 0 => { trb => 105, sys => "PMT 1-4 "}, + 1 => { trb => 89, sys => "PMT 5-8 "}, + 2 => { trb => 57, sys => "PMT 9-12 "}, + 3 => { trb => 99, sys => "PMT 13-16"}, + 4 => { trb => 73, sys => "PMT 17-20"}, + 5 => { trb => 102, sys => "PMT 21-24"}, + 6 => { trb => 83, sys => "PMT 25-28"}, + 7 => { trb => 78, sys => "PMT 29-32"}, + 8 => { trb => 104, sys => "PMT 33-36"}, + 9 => { trb => 74, sys => "PMT 37-40"}, +10 => { trb => 72, sys => "PMT 41-44"}, +11 => { trb => 47, sys => "PMT 45-48"}, +12 => { trb => 59, sys => "PMT 49-52"}, +13 => { trb => 84, sys => "PMT 53-56"}, +14 => { trb => 97, sys => "PMT 57-60"}, +15 => { trb => 29, sys => "PMT 61-64"}, +16 => { trb => 101, sys => "Lemo Inp."}, +-1 => { trb => 56, sys => "CTS "}, +}; + + +my $MAX_PROCESSES=50; +my $pm = Parallel::ForkManager->new($MAX_PROCESSES); + +#my $p = Net::Ping->new(); + +foreach my $ct (keys $map) { + #my $num = sprintf "%3.3d", $ct; + my $trbnum= $map->{$ct}->{trb}; + my $num = sprintf "%3.3d", $trbnum; + my $host= "trb" . $num; + my $system = $map->{$ct}->{sys}; + #print "192.168.0.$ct $host.gsi.de $host\n"; + #my $r = $p->ping($host,1); + my $c= "ping -W1 -c1 $host"; + + my $pid = $pm->start and next; + + + #my $p = Net::Ping->new("udp", 1); + #my $r = $p->ping("192.168.0.56"); + #$p->close(); + #print "result: $r\n"; + + my $r = qx($c); + my $sysnum = sprintf "0x80%s", $ct < 10 ? "0$ct" : $ct; + $sysnum = "0x7999" if $ct == -1; + #printf "$sysnum, system: %-8s, trb: $host ", $system; + printf "$sysnum $host %-8s ", $system; + if (grep /64 bytes/, $r) { + print "is alive.\n"; + } + else { + print "is not alive.\n"; + } + + $pm->finish; # Terminates the child process +} + +$pm->wait_all_children; +#$p->close(); diff --git a/users/cern_cbmrich/dmon_config.pl b/users/cern_cbmrich/dmon_config.pl new file mode 100644 index 0000000..98da2a5 --- /dev/null +++ b/users/cern_cbmrich/dmon_config.pl @@ -0,0 +1,21 @@ +#This a an example configuration file. Copy this file to your user directory and give +#start.pl a link to this file as first argument. + +#Scripts to start & order of icons in the Overview +activeScripts => [['time','-','-','-','daqop'], + ['numfee','temperature','reftime','-','-'], + ['trgrate','datarate','deadtime','-','-'], + ['-','-','-','-','-'], + ['-','-','-','-','-'],], + +#Names to be shown in left column of Overview (max 4 letters!) +qaNames => ['sys','main','rate','-','-','-'], + +#Expected number of FPGAs in system +NumberOfFpga => 90, + +#The address of the CTS +CtsAddress => 0x7999, + +#Addresses of all TDCs. Either single or broadcast addresses +TdcAddress => [0xfe48,0xfe4e,0x7999], diff --git a/users/cern_cbmrich/go4/first.C b/users/cern_cbmrich/go4/first.C new file mode 100644 index 0000000..c4b2f81 --- /dev/null +++ b/users/cern_cbmrich/go4/first.C @@ -0,0 +1,81 @@ + +void first() +{ + + base::ProcMgr::instance()->SetRawAnalysis(true); + + // this limits used for liner calibrations when nothing else is available + hadaq::TdcMessage::SetFineLimits(31, 421); + + // default channel numbers and edges mask + hadaq::TrbProcessor::SetDefaults(33, 0x1); + + hadaq::HldProcessor* hld = new hadaq::HldProcessor(); + + // About time calibration - there are two possibilities + // 1) automatic calibration after N hits in every enabled channel. + // Just use SetAutoCalibrations method for this + // 2) generate calibration on base of provided data and than use it later statically for analysis + // Than one makes special run with SetWriteCalibrations() enabled. + // Later one reuse such calibrations enabling only LoadCalibrations() call + + hadaq::TrbProcessor* trb3_1 = new hadaq::TrbProcessor(0x8000, hld); + trb3_1->SetHistFilling(4); + trb3_1->SetCrossProcess(true); + trb3_1->CreateTDC(0xC000, 0xC001, 0xC002, 0xC003); + // enable automatic calibration, specify required number of hits in each channel + trb3_1->SetAutoCalibrations(100000); + // calculate and write static calibration at the end of the run + //trb3_1->SetWriteCalibrations("run1"); + // load static calibration at the beginning of the run + //trb3_1->LoadCalibrations("run1"); + + hadaq::TrbProcessor* trb3_2 = new hadaq::TrbProcessor(0x8001, hld); + trb3_2->SetHistFilling(4); + trb3_2->SetCrossProcess(true); + trb3_2->CreateTDC(0xC010, 0xC011, 0xC012, 0xC013); + trb3_2->SetAutoCalibrations(100000); + //trb3_2->SetWriteCalibrations("run1"); + //trb3_2->LoadCalibrations("run1"); + + // this is array with available TDCs ids + int tdcmap[8] = { 0xC000, 0xC001, 0xC002, 0xC003, 0xC010, 0xC011, 0xC012, 0xC013 }; + + // TDC subevent header id + + for (int cnt=0;cnt<8;cnt++) { + + hadaq::TdcProcessor* tdc = hld->FindTDC(tdcmap[cnt]); + if (tdc==0) continue; + + // specify reference channel + tdc->SetRefChannel(3, 1, 0xffff, 20000, -10., 10., true); + // continue; + + //tdc->SetRefChannel(4, 2, 0xffff, 20000, -10., 10., true); +// tdc->SetRefChannel(6, 4, 0xc010, 20000, -20., 20., true); +// tdc->SetRefChannel(7, 5, 0xc010, 20000, -20., 20., true); +// tdc->SetRefChannel(8, 0, 0xc010, 20000, -90., 80., true); +// tdc->SetRefChannel(9, 0, 0xc010, 20000, -200., 200., true); + +// continue; + if (cnt > 0) { + // specify reference channel from other TDC + tdc->SetRefChannel(0, 0, 0xc000, 20000, -30., 30., true); + tdc->SetRefChannel(5, 5, 0xc000, 20000, -20., 20., true); + //tdc->SetRefChannel(6, 6, 0xc000, 20000, -20., 20., true); + tdc->SetRefChannel(7, 7, 0xc000, 20000, -20., 20., true); + } + + // for old FPGA code one should have epoch for each hit, no longer necessary + // tdc->SetEveryEpoch(true); + + // When enabled, time of last hit will be used for reference calculations + // tdc->SetUseLastHit(true); + + } + +} + + + diff --git a/users/cern_cbmrich/go4/online4.hotstart b/users/cern_cbmrich/go4/online4.hotstart new file mode 100644 index 0000000..b7071f1 --- /dev/null +++ b/users/cern_cbmrich/go4/online4.hotstart @@ -0,0 +1,134 @@ +// Automatically generated startup script +// Do not change it! + +go4->SetMainWindowState(4,"000000ff00000000fd0000000200000000000001b100000407fc0200000001fb0000001600420072006f00770073006500720044006f0063006b0100000055000004070000007900ffffff00000003000003d5000000d5fc0100000001fc00000000000003d50000000000fffffffa000000020200000003fb00000016004c006f00670049006e0066006f0044006f0063006b0000000000ffffffff0000005200fffffffb0000001a004d006200730056006900650077006500720044006f0063006b0000000000ffffffff0000006400fffffffb0000001e0044004100420043004d006f006e00690074006f00720044006f0063006b0000000279000000ce0000000000000000000005c90000040700000004000000040000000800000008fc0000000800000002000000050000001600460069006c00650054006f006f006c0042006100720100000000ffffffff0000000000000000000000160047006f00340054006f006f006c007300420061007201000000e7ffffffff00000000000000000000001e0041006e0061006c00790073006900730054006f006f006c004200610072010000022bffffffff00000000000000000000001a0044006900760069006400650050006100640044006f0063006b0000000395000000e40000000000000000000000240048006900730044007200610077004f007000740069006f006e00730044006f0063006b0100000350000004300000000000000000000000020000000000000002000000020000002400420072006f0077007300650072004f007000740069006f006e00730044006f0063006b01000000000000010200000000000000000000001e0044007200610077004f007000740069006f006e00730044006f0063006b01000001020000037e00000000000000000000000200000001000000180047006f0034005300740079006c00650044006f0063006b0000000000000004b10000000000000000000000020000000100000020005300630061006c0065004f007000740069006f006e00730044006f0063006b0000000000000004b10000000000000000000000030000000000000003000000010000001e0043006f006d006d0061006e0064004c0069006e00650044006f0063006b0000000000000004b1000000000000000000000003000000010000001c00540072006500650056006900650077006500720044006f0063006b0000000000000004b10000000000000000"); +go4->SetMainWindowGeometry(4,"01d9d0cb0001000000000000000000000000077f0000049500000000000000140000077f0000039e000000000200"); + +go4->LaunchAnalysis("MyAnalysis", ".", "libGo4UserAnalysis", "localhost", Go4_sh, Go4_qt, Go4_lib); +go4->WaitAnalysis(300); + +// configuration of analysis +go4->AnalysisAutoSave("Go4AutoSave.root", 500, 5, kFALSE, kFALSE); +go4->AnalysisConfigName("Go4AnalysisPrefs.root"); + +// step Analysis +go4->ConfigStep("Analysis", kTRUE, kTRUE, kFALSE); +go4->StepMbsStreamSource("Analysis", "localhost:6790", 1); +go4->StepFileStore("Analysis", "NoOutputDefined", kTRUE, 32000, 99, 5); + +go4->SubmitAnalysisConfig(20); + +go4->SetAnalysisConfigMode(-1); +go4->SetAnalysisTerminalMode(0); + +go4->StartAnalysis(); + +// this is possibility to get extra histograms from analysis +// which are create shortly after analysis is started +go4->Wait(1); +go4->RefreshNamesList(); + +TGo4Picture *pic1 = new TGo4Picture("pic1", "temporary object to setup viewpanel"); +pic1->SetCrosshair(false); +pic1->SetRangeX(-10.755, -3.667); +pic1->SetRangeY(0, 163.8); +pic1->SetLineAtt(1, 1, 1, -1); +pic1->SetFillAtt(10, 1001, -1); +pic1->SetHisStats(true); +pic1->SetStatsAttr(0.78, 0.775, 0.98, 0.935, 11111111, "6.4g", 0, "5.4g"); +pic1->SetHisTitle(true); +pic1->SetTitleAttr(0.15, 0.932561, 0.85, 0.995); +pic1->SetTitleTime(true); +pic1->SetTitleDate(true); +pic1->SetTitleItem(true); +pic1->SetAutoScale(true); +pic1->SetPadAtt(0, 2, 0, 0, 30, 30, 0, 0); +pic1->SetXAxisAttTime(0, "%H:%M:%S%F1995-01-01 00:00:00s0", -1); +pic1->AddObjName("Analysis/Histograms/TDC_c010/Ch7/TDC_c010_Ch7_RisingRef", "HIST"); +pic1->SetLineAtt(602, 1, 1, 0); +pic1->SetFillAtt(0, 1001, 0); +pic1->SetMarkerAtt(1, 1, 1, 0); +pic1->SetAxisAtt(0, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic1->SetAxisAtt(1, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic1->SetAxisAtt(2, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 0, 0); +go4->StartViewPanel(116, 310, 825, 670, Go4_normal, pic1); +delete pic1; + +TGo4Picture *pic2 = new TGo4Picture("pic2", "temporary object to setup viewpanel"); +pic2->SetCrosshair(false); +pic2->SetRangeX(-19.999, 19.999); +pic2->SetLineAtt(1, 1, 1, -1); +pic2->SetFillAtt(10, 1001, -1); +pic2->SetHisStats(true); +pic2->SetStatsAttr(0.78, 0.775, 0.98, 0.935, 11111111, "6.4g", 0, "5.4g"); +pic2->SetHisTitle(true); +pic2->SetTitleAttr(0.15, 0.932561, 0.85, 0.995); +pic2->SetTitleTime(true); +pic2->SetTitleDate(true); +pic2->SetTitleItem(true); +pic2->SetAutoScale(true); +pic2->SetPadAtt(0, 2, 0, 0, 30, 30, 0, 0); +pic2->SetXAxisAttTime(0, "%H:%M:%S%F1995-01-01 00:00:00s0", -1); +pic2->AddObjName("Analysis/Histograms/TDC_c010/Ch0/TDC_c010_Ch0_RisingRef", "HIST"); +pic2->SetLineAtt(602, 1, 1, 0); +pic2->SetFillAtt(0, 1001, 0); +pic2->SetMarkerAtt(1, 1, 1, 0); +pic2->SetAxisAtt(0, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic2->SetAxisAtt(1, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 0, 0); +pic2->SetAxisAtt(2, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 0, 0); +go4->StartViewPanel(25, 28, 825, 669, Go4_normal, pic2); +delete pic2; + +TGo4Picture *pic3 = new TGo4Picture("pic3", "temporary object to setup viewpanel"); +pic3->SetCrosshair(false); +pic3->SetRangeX(-0.615, -0.095); +pic3->SetRangeY(0, 11243.4); +pic3->SetLineAtt(1, 1, 1, -1); +pic3->SetFillAtt(10, 1001, -1); +pic3->SetHisStats(true); +pic3->SetStatsAttr(0.78, 0.775, 0.98, 0.935, 11111111, "6.4g", 0, "5.4g"); +pic3->SetHisTitle(true); +pic3->SetTitleAttr(0.15, 0.932561, 0.85, 0.995); +pic3->SetTitleTime(true); +pic3->SetTitleDate(true); +pic3->SetTitleItem(true); +pic3->SetAutoScale(true); +pic3->SetPadAtt(0, 2, 0, 0, 30, 30, 0, 0); +pic3->SetXAxisAttTime(0, "%H:%M:%S%F1995-01-01 00:00:00s0", -1); +pic3->AddObjName("Analysis/Histograms/TDC_c010/Ch3/TDC_c010_Ch3_RisingRef", "HIST"); +pic3->SetLineAtt(602, 1, 1, 0); +pic3->SetFillAtt(0, 1001, 0); +pic3->SetMarkerAtt(1, 1, 1, 0); +pic3->SetAxisAtt(0, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic3->SetAxisAtt(1, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic3->SetAxisAtt(2, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 0, 0); +go4->StartViewPanel(150, 150, 825, 669, Go4_normal, pic3); +delete pic3; + +TGo4Picture *pic4 = new TGo4Picture("pic4", "temporary object to setup viewpanel"); +pic4->SetCrosshair(false); +pic4->SetRangeX(-0.025, 0.255); +pic4->SetRangeY(0, 81610.2); +pic4->SetLineAtt(1, 1, 1, -1); +pic4->SetFillAtt(10, 1001, -1); +pic4->SetHisStats(true); +pic4->SetStatsAttr(0.78, 0.775, 0.98, 0.935, 11111111, "6.4g", 0, "5.4g"); +pic4->SetHisTitle(true); +pic4->SetTitleAttr(0.15, 0.932561, 0.85, 0.995); +pic4->SetTitleTime(true); +pic4->SetTitleDate(true); +pic4->SetTitleItem(true); +pic4->SetAutoScale(true); +pic4->SetPadAtt(0, 2, 0, 0, 30, 30, 0, 0); +pic4->SetXAxisAttTime(0, "%H:%M:%S%F1995-01-01 00:00:00s0", -1); +pic4->AddObjName("Analysis/Histograms/TDC_c000/Ch4/TDC_c000_Ch4_RisingRef", "HIST"); +pic4->SetLineAtt(602, 1, 1, 0); +pic4->SetFillAtt(0, 1001, 0); +pic4->SetMarkerAtt(1, 1, 1, 0); +pic4->SetAxisAtt(0, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic4->SetAxisAtt(1, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 2048, 0); +pic4->SetAxisAtt(2, 1, 1, 42, 0.005, 0.035, 510, 0.03, 1, 42, 1, 0.035, kFALSE, "+", 0, 0); +go4->StartViewPanel(546, 334, 825, 669, Go4_normal, pic4); +delete pic4; + +go4->StartMonitoring(2); diff --git a/users/cern_cbmrich/prepare_padiwas_invert_leds.pl b/users/cern_cbmrich/prepare_padiwas_invert_leds.pl new file mode 100755 index 0000000..0ab3d36 --- /dev/null +++ b/users/cern_cbmrich/prepare_padiwas_invert_leds.pl @@ -0,0 +1,48 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use Parallel::ForkManager; + +my $arg=$ARGV[0]; + +unless ($arg) { + print "usage: +./prepare_padiwas_invert_leds.pl <\"list of hex TRBNet addresses, space separated\"> +"; +exit; +} + +my @padiwas = split /\s+/, $arg; + +my $MAX_PROCESSES = 100; +my $pm = Parallel::ForkManager->new($MAX_PROCESSES); + +print "padiwas: inverting padiwa outputs: "; + +foreach (@padiwas) { + my $pid = $pm->start and next; + print "$_ "; + my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 invert 0xffff >/dev/null"; + qx($c); die "could not execute command $c" if $?; + $pm->finish; # Terminates the child process +}; +$pm->wait_all_children; +print "\n"; + +print "padiwas: turn off all leds: "; + +foreach (@padiwas) { + my $pid = $pm->start and next; + print "$_ "; + my $c="/home/hadaq/trbsoft/daqtools/padiwa.pl $_ 0 led 0x10 >/dev/null"; + qx($c); die "could not execute command $c" if $?; + $pm->finish; # Terminates the child process +}; + +$pm->wait_all_children; + +print "\n"; + + diff --git a/users/cern_cbmrich/register_config_tdc.db b/users/cern_cbmrich/register_config_tdc.db new file mode 100644 index 0000000..dee538b --- /dev/null +++ b/users/cern_cbmrich/register_config_tdc.db @@ -0,0 +1,97 @@ +!Register table +# Type # lower 32 channels # upper 32 channels # +###################################################################### + 0 0xc802 0xc803 + + +# (MCP# * 100 ) + 10 + 0...3 + +!Value table +# Hub # Type # lower 32 channels # upper 32 channels # +################################################################# + 0x0010 0 0xffffffff 0x00000000 + 0x0011 0 0xffffffff 0x00000000 + 0x0012 0 0xffffffff 0x00000000 + 0x0013 0 0xffffffff 0x00000000 + + 0x0020 0 0xffffffff 0x00000000 + 0x0021 0 0xffffffff 0x00000000 + 0x0022 0 0xffffffff 0x00000000 + 0x0023 0 0xffffffff 0x00000000 + + 0x0030 0 0xffffffff 0x00000000 + 0x0031 0 0xffffffff 0x00000000 + 0x0032 0 0xffffffff 0x00000000 + 0x0033 0 0xffffffff 0x00000000 + + 0x0040 0 0xffffffff 0x00000000 + 0x0041 0 0xffffffff 0x00000000 + 0x0042 0 0xffffffff 0x00000000 + 0x0043 0 0xffffffff 0x00000000 + + 0x0050 0 0xffffffff 0x00000000 + 0x0051 0 0xffffffff 0x00000000 + 0x0052 0 0xffffffff 0x00000000 + 0x0053 0 0xffffffff 0x00000000 + + 0x0060 0 0xffffffff 0x00000000 + 0x0061 0 0xffffffff 0x00000000 + 0x0062 0 0xffffffff 0x00000000 + 0x0063 0 0xffffffff 0x00000000 + + 0x0070 0 0xffffffff 0x00000000 + 0x0071 0 0xffffffff 0x00000000 + 0x0072 0 0xffffffff 0x00000000 + 0x0073 0 0xffffffff 0x00000000 + + 0x0080 0 0xffffffff 0x00000000 + 0x0081 0 0xffffffff 0x00000000 + 0x0082 0 0xffffffff 0x00000000 + 0x0083 0 0xffffffff 0x00000000 + + 0x0090 0 0xffffffff 0x00000000 + 0x0091 0 0xffffffff 0x00000000 + 0x0092 0 0xffffffff 0x00000000 + 0x0093 0 0xffffffff 0x00000000 + + 0x00a0 0 0xffffffff 0x00000000 + 0x00a1 0 0xffffffff 0x00000000 + 0x00a2 0 0xffffffff 0x00000000 + 0x00a3 0 0xffffffff 0x00000000 + + 0x00b0 0 0xffffffff 0x00000000 + 0x00b1 0 0xffffffff 0x00000000 + 0x00b2 0 0xffffffff 0x00000000 + 0x00b3 0 0xffffffff 0x00000000 + + 0x00c0 0 0xffffffff 0x00000000 + 0x00c1 0 0xffffffff 0x00000000 + 0x00c2 0 0xffffffff 0x00000000 + 0x00c3 0 0xffffffff 0x00000000 + + 0x00d0 0 0xffffffff 0x00000000 + 0x00d1 0 0xffffffff 0x00000000 + 0x00d2 0 0xffffffff 0x00000000 + 0x00d3 0 0xffffffff 0x00000000 + + 0x00e0 0 0xffffffff 0x00000000 + 0x00e1 0 0xffffffff 0x00000000 + 0x00e2 0 0xffffffff 0x00000000 + 0x00e3 0 0xffffffff 0x00000000 + + 0x00f0 0 0xffffffff 0x00000000 + 0x00f1 0 0xffffffff 0x00000000 + 0x00f2 0 0xffffffff 0x00000000 + 0x00f3 0 0xffffffff 0x00000000 + + 0x0100 0 0xffffffff 0x00000000 + 0x0101 0 0xffffffff 0x00000000 + 0x0102 0 0xffffffff 0x00000000 + 0x0103 0 0x00000000 0x00000000 + +#for now: disable TDC for beam counter + + 0x0110 0 0x00000000 0x00000000 + 0x0111 0 0x00000000 0x00000000 + 0x0112 0 0x00000000 0x00000000 + 0x0113 0 0x00000000 0x00000000 diff --git a/users/cern_cbmrich/register_configgbe.db b/users/cern_cbmrich/register_configgbe.db new file mode 100644 index 0000000..a7b7d2c --- /dev/null +++ b/users/cern_cbmrich/register_configgbe.db @@ -0,0 +1,40 @@ + + + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # +###################################################################################################### + 0 0x8300 0x8301 0x8302 0x8303 0x8304 0x8305 0x8307 0x8309 0x830a 0x830b + + +!Value table +# SubEvtId SubEvtDec QueDec PackSize FrameSize UseGbE MultiQueue Enable RX Add.Slw.Head TType_inserted +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # +################################################################################################################################################### + 0x7005 0 0x7005 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x1 + 0x8015 0 0x8015 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8025 0 0x8025 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8035 0 0x8035 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8045 0 0x8045 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8055 0 0x8055 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8065 0 0x8065 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8075 0 0x8075 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8085 0 0x8085 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8095 0 0x8095 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80a5 0 0x80a5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80b5 0 0x80b5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80c5 0 0x80c5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80d5 0 0x80d5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80e5 0 0x80e5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x80f5 0 0x80f5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8105 0 0x8105 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 + 0x8115 0 0x8115 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8125 0 0x8125 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8135 0 0x8135 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8145 0 0x8145 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8155 0 0x8155 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8165 0 0x8165 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8175 0 0x8175 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8185 0 0x8185 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x8195 0 0x8195 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 +#0x81a5 0 0x81a5 0x00020001 0x00030064 0xFDE8 0x578 1 0 1 1 0x0 \ No newline at end of file diff --git a/users/cern_cbmrich/register_configgbe_ip.db b/users/cern_cbmrich/register_configgbe_ip.db new file mode 100644 index 0000000..f1ac6a2 --- /dev/null +++ b/users/cern_cbmrich/register_configgbe_ip.db @@ -0,0 +1,57 @@ +########################################################################################### +#Eventbuilders: +# EB 0: dircdac002 eth0 ports 50000 - 50099 + +!Register table +# Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +########################################################################################### +#new memory locations + 0 0x8100 0x8101 0x8102 0x8103 0x8104 0x8105 0x8106 0x8107 0x8108 + 1 0x8110 0x8111 0x8112 0x8113 0x8114 0x8115 0x8116 0x8117 0x8118 + 2 0x8120 0x8121 0x8122 0x8123 0x8124 0x8125 0x8126 0x8127 0x8128 + 3 0x8130 0x8131 0x8132 0x8133 0x8134 0x8135 0x8136 0x8137 0x8138 + 4 0x8140 0x8141 0x8142 0x8143 0x8144 0x8145 0x8146 0x8147 0x8148 + 5 0x8150 0x8151 0x8152 0x8153 0x8154 0x8155 0x8156 0x8157 0x8158 + 6 0x8160 0x8161 0x8162 0x8163 0x8164 0x8165 0x8166 0x8167 0x8168 + 7 0x8170 0x8171 0x8172 0x8173 0x8174 0x8175 0x8176 0x8177 0x8178 + 8 0x8180 0x8181 0x8182 0x8183 0x8184 0x8185 0x8186 0x8187 0x8188 + 9 0x8190 0x8191 0x8192 0x8193 0x8194 0x8195 0x8196 0x8197 0x8198 + 10 0x81A0 0x81A1 0x81A2 0x81A3 0x81A4 0x81A5 0x81A6 0x81A7 0x81A8 + 11 0x81B0 0x81B1 0x81B2 0x81B3 0x81B4 0x81B5 0x81B6 0x81B7 0x81B8 + 12 0x81C0 0x81C1 0x81C2 0x81C3 0x81C4 0x81C5 0x81C6 0x81C7 0x81C8 + 13 0x81D0 0x81D1 0x81D2 0x81D3 0x81D4 0x81D5 0x81D6 0x81D7 0x81D8 + 14 0x81E0 0x81E1 0x81E2 0x81E3 0x81E4 0x81E5 0x81E6 0x81E7 0x81E8 + 15 0x81F0 0x81F1 0x81F2 0x81F3 0x81F4 0x81F5 0x81F6 0x81F7 0x81F8 + +!Value table +# Dest MAC Dest MAC Dest IP Dest Port Src MAC Src MAC Src IP Src Port Packet Size +# Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # +######################################################################################################################################## + + 0x7005 0 0x785a2602 0x001b 0xc0a80002 0xc350 0xdead8000 0x001b 0xc0a80000 0xc350 0x0578 + 0x8015 0 0x785a2602 0x001b 0xc0a80002 0xc351 0xdead8001 0x001b 0xc0a80001 0xc351 0x0578 + 0x8025 0 0x785a2602 0x001b 0xc0a80002 0xc352 0xdead8002 0x001b 0xc0a80002 0xc352 0x0578 + 0x8035 0 0x785a2602 0x001b 0xc0a80002 0xc353 0xdead8003 0x001b 0xc0a80003 0xc353 0x0578 + 0x8045 0 0x785a2602 0x001b 0xc0a80002 0xc354 0xdead8004 0x001b 0xc0a80004 0xc354 0x0578 + 0x8055 0 0x785a2602 0x001b 0xc0a80002 0xc355 0xdead8005 0x001b 0xc0a80005 0xc355 0x0578 + 0x8065 0 0x785a2602 0x001b 0xc0a80002 0xc356 0xdead8006 0x001b 0xc0a80006 0xc356 0x0578 + 0x8075 0 0x785a2602 0x001b 0xc0a80002 0xc357 0xdead8007 0x001b 0xc0a80007 0xc357 0x0578 + 0x8085 0 0x785a2602 0x001b 0xc0a80002 0xc358 0xdead8008 0x001b 0xc0a80008 0xc358 0x0578 + 0x8095 0 0x785a2602 0x001b 0xc0a80002 0xc359 0xdead8009 0x001b 0xc0a80009 0xc359 0x0578 + 0x80a5 0 0x785a2602 0x001b 0xc0a80002 0xc35a 0xdead8010 0x001b 0xc0a80010 0xc35a 0x0578 + 0x80b5 0 0x785a2602 0x001b 0xc0a80002 0xc35b 0xdead8011 0x001b 0xc0a80011 0xc35b 0x0578 + 0x80c5 0 0x785a2602 0x001b 0xc0a80002 0xc35c 0xdead8012 0x001b 0xc0a80012 0xc35c 0x0578 + 0x80d5 0 0x785a2602 0x001b 0xc0a80002 0xc35d 0xdead8013 0x001b 0xc0a80013 0xc35d 0x0578 + 0x80e5 0 0x785a2602 0x001b 0xc0a80002 0xc35e 0xdead8014 0x001b 0xc0a80014 0xc35e 0x0578 + 0x80f5 0 0x785a2602 0x001b 0xc0a80002 0xc35f 0xdead8015 0x001b 0xc0a80015 0xc35f 0x0578 + 0x8105 0 0x785a2602 0x001b 0xc0a80002 0xc360 0xdead8016 0x001b 0xc0a80016 0xc360 0x0578 + 0x8115 0 0x785a2602 0x001b 0xc0a80002 0xc361 0xdead8017 0x001b 0xc0a80017 0xc361 0x0578 +#0x8125 0 0x785a2602 0x001b 0xc0a80002 0xc362 0xdead8018 0x001b 0xc0a80018 0xc362 0x0578 +#0x8135 0 0x785a2602 0x001b 0xc0a80002 0xc363 0xdead8019 0x001b 0xc0a80019 0xc363 0x0578 +#0x8145 0 0x785a2602 0x001b 0xc0a80002 0xc364 0xdead8020 0x001b 0xc0a80020 0xc364 0x0578 +#0x8155 0 0x785a2602 0x001b 0xc0a80002 0xc365 0xdead8021 0x001b 0xc0a80021 0xc365 0x0578 +#0x8165 0 0x785a2602 0x001b 0xc0a80002 0xc366 0xdead8022 0x001b 0xc0a80022 0xc366 0x0578 +#0x8175 0 0x785a2602 0x001b 0xc0a80002 0xc367 0xdead8023 0x001b 0xc0a80023 0xc367 0x0578 +#0x8185 0 0x785a2602 0x001b 0xc0a80002 0xc368 0xdead8024 0x001b 0xc0a80024 0xc368 0x0578 +#0x8195 0 0x785a2602 0x001b 0xc0a80002 0xc369 0xdead8025 0x001b 0xc0a80025 0xc369 0x0578 +#0x81a5 0 0x785a2602 0x001b 0xc0a80002 0xc36a 0xdead8026 0x001b 0xc0a80026 0xc36a 0x0578 diff --git a/users/cern_cbmrich/run_thresh_on_system_single.pl b/users/cern_cbmrich/run_thresh_on_system_single.pl new file mode 100755 index 0000000..dd2309a --- /dev/null +++ b/users/cern_cbmrich/run_thresh_on_system_single.pl @@ -0,0 +1,18 @@ +rm padiwa_threshold_dump.log +rm padiwa_threshold.log +rm padiwa_threshold_result.log +echo setting all thresholds to nirvana + +for i in 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 +do + for j in 0 1 2 3 + do + endpoint="0"$i$j + echo $endpoint + ./write_thresholds.pl dummythresholds.thr -o 5 + ./thresholds_automatic.pl --endpoint=0x$endpoint --chain=0 --offset=0 --32channel --polarity 0 + ./read_threshold.pl --endpoint=0x$endpoint --chain=0 --offset=0 --32channel + done +done +exit + diff --git a/users/cern_cbmrich/start_display.sh b/users/cern_cbmrich/start_display.sh new file mode 100755 index 0000000..421ba47 --- /dev/null +++ b/users/cern_cbmrich/start_display.sh @@ -0,0 +1,12 @@ +cd ~/trbsoft/daq/evtbuild/ +./mon_cts.pl & + +perl ~/trbsoft/daq/monitor/gbe_debug_3.pl & + +cd ~/trb3/thres/ +./thres.pl & + + + + + diff --git a/users/cern_cbmrich/start_readout.pl b/users/cern_cbmrich/start_readout.pl new file mode 100755 index 0000000..9f99926 --- /dev/null +++ b/users/cern_cbmrich/start_readout.pl @@ -0,0 +1,63 @@ +#!/usr/bin/perl +use warnings; +use strict; +use Getopt::Long; + +my $help = ""; +my $dataPath = "/d/"; +my $source1 = "50000"; # don't use 50001 +my $source2 = "50002"; # it is assigned for GbE debug +my $source3 = "50003"; +my $source4 = "50004"; +my $source5 = "50005"; +my $label = "test"; +my $time = -1; +my $c; + +my $result = GetOptions ( + "h|help" => \$help, + "t|time=i" => \$time, + "l|label=s" => \$label, + "p|path=s" => \$dataPath + ); + +if($help) { + print "Usage: start_readout.pl