From 8a5b3239d1c3ddeb1de6c686b047f67fa171a09e Mon Sep 17 00:00:00 2001 From: HADES DAQ Date: Tue, 11 Apr 2017 00:32:03 +0200 Subject: [PATCH] aktueller rich status, mt --- tools/power_cycle | 5 +- users/gsi_rich/TdcEventBuilder.xml | 6 +- users/gsi_rich/check_ping.pl | 10 +- users/gsi_rich/db/addresses_dirich.db | 17 +- .../db/addresses_dirich_concentrator.db | 4 +- users/gsi_rich/db/addresses_trb3.db | 24 +- users/gsi_rich/db/register_configgbe.db | 6 +- users/gsi_rich/db/register_configgbe_ip.db | 10 +- users/gsi_rich/db/register_configtdc.db | 6 +- users/gsi_rich/first.C | 18 +- users/gsi_rich/second.C | 224 ++++++++++-------- users/gsi_rich/startup.sh | 30 +-- users/gsi_rich/trbreset_loop.pl | 2 +- web/CtsConfig.pm | 2 +- 14 files changed, 194 insertions(+), 170 deletions(-) diff --git a/tools/power_cycle b/tools/power_cycle index 973337f..19b44b0 100755 --- a/tools/power_cycle +++ b/tools/power_cycle @@ -10,7 +10,8 @@ use Data::Dumper; my $sock; my $ra_setup = [ { host => "wiznet02:5000", - idn => "HAMEG,HMP4040,021527872,HW50020001/SW2.41", + ##idn => "HAMEG,HMP4040,021527872,HW50020001/SW2.41", + idn => "HAMEG,HMP4040,103161,HW50020001/SW2.51", channels => [ 'clock', 'TDB', 'TBD', 'dirich'], commands => {status => 'OUTPUT:STATE?', off => 'OUTPUT:SEL OFF', on => 'OUTPUT:SEL ON'} }, @@ -51,7 +52,7 @@ sub main { my $idn = write_and_read('*IDN?'); if($idn ne $actual_setup->{idn}) { - print "wrong device: is not $actual_setup->idn\n"; + print "wrong device: read idn $idn is not the one stored in the setup: $actual_setup->{idn}\n"; exit; } diff --git a/users/gsi_rich/TdcEventBuilder.xml b/users/gsi_rich/TdcEventBuilder.xml index e1bd0fb..8c4c4f5 100644 --- a/users/gsi_rich/TdcEventBuilder.xml +++ b/users/gsi_rich/TdcEventBuilder.xml @@ -95,10 +95,10 @@ When starting analysis from the go4 gui, one should specify stream server with p - - + + - + diff --git a/users/gsi_rich/check_ping.pl b/users/gsi_rich/check_ping.pl index ff146b6..fcd5c1e 100755 --- a/users/gsi_rich/check_ping.pl +++ b/users/gsi_rich/check_ping.pl @@ -19,10 +19,10 @@ my $result = GetOptions ( my $map = { - 0 => { trb => 84, addr => "0xc001", sys => "CTS"}, - 1 => { trb => 61, addr => "0x8000", sys => "TOF"}, - 2 => { trb => 113, addr => "0x8001", sys => "TOF"}, - 3 => { trb => 158, addr => "0x8002", sys => "TOF"}, + 0 => { trb => 165, addr => "0xc001", sys => "CTS"}, +# 1 => { trb => 61, addr => "0x8000", sys => "TOF"}, +# 2 => { trb => 113, addr => "0x8001", sys => "TOF"}, +# 3 => { trb => 158, addr => "0x8002", sys => "TOF"}, }; my $MAX_PROCESSES=50; @@ -61,7 +61,7 @@ while ( (($first_iteration == 1) || keys %$rh_unsuccessful) && #my $num = sprintf "%3.3d", $ct; my $trbnum= $map->{$ct}->{trb}; my $num = sprintf "%3.3d", $trbnum; - my $host= "trb" . $num; + my $host= "trbp" . $num; #my $host= "trb" . $num ."b"; my $system = $map->{$ct}->{sys}; #print "192.168.0.$ct $host.gsi.de $host\n"; diff --git a/users/gsi_rich/db/addresses_dirich.db b/users/gsi_rich/db/addresses_dirich.db index 6613a19..c9da922 100644 --- a/users/gsi_rich/db/addresses_dirich.db +++ b/users/gsi_rich/db/addresses_dirich.db @@ -3,12 +3,13 @@ # Address # S/N # FPGA -0x1201 0001 1 -0x1202 0002 1 -0x1203 0003 1 -0x1204 0004 1 -0x1205 0005 1 -0x1206 0006 1 -0x1207 0007 1 -0x1208 0008 1 +0x1201 0011 1 +0x1202 0021 1 +0x1203 0031 1 +0x1204 0041 1 +0x1205 0051 1 +0x1206 0061 1 +0x1207 0071 1 +0x1208 0081 1 +0x1209 0091 1 diff --git a/users/gsi_rich/db/addresses_dirich_concentrator.db b/users/gsi_rich/db/addresses_dirich_concentrator.db index f95bf2b..250845b 100644 --- a/users/gsi_rich/db/addresses_dirich_concentrator.db +++ b/users/gsi_rich/db/addresses_dirich_concentrator.db @@ -1,4 +1,4 @@ # concentrator/combiner -0x8300 0001 0 -0x8300 0002 0 +0x8300 0010 0 +0x8300 0020 0 diff --git a/users/gsi_rich/db/addresses_trb3.db b/users/gsi_rich/db/addresses_trb3.db index a480b5f..a7a2e55 100644 --- a/users/gsi_rich/db/addresses_trb3.db +++ b/users/gsi_rich/db/addresses_trb3.db @@ -5,11 +5,11 @@ # 0x1234 14 0 #CTS -0x0840 84 0 -0x8841 84 1 # hub -0x0842 84 2 -0x0843 84 3 -0xc001 84 5 +0x0840 165 0 +0x0841 165 1 +0x8165 165 2 #hub +0x0843 165 3 +0xc001 165 5 #slave 0x0610 61 0 @@ -18,17 +18,3 @@ 0x0613 61 3 0x8610 61 5 -#slave -0x1130 113 0 -0x1131 113 1 -0x1132 113 2 -0x1133 113 3 -0x8113 113 5 - -#slave -0x1580 158 0 -0x1581 158 1 -0x1582 158 2 -0x1583 158 3 -0x8158 158 5 - diff --git a/users/gsi_rich/db/register_configgbe.db b/users/gsi_rich/db/register_configgbe.db index ff87483..7105766 100644 --- a/users/gsi_rich/db/register_configgbe.db +++ b/users/gsi_rich/db/register_configgbe.db @@ -10,6 +10,6 @@ # Hub # Type # C0 # C1 # C2 # C3 # C4 # C5 # C6 # C7 # C8 # C9 # C10 # ################################################################################################################################################################# 0xc001 0 0xc001 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 - 0x8610 0 0x8000 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 - 0x8113 0 0x8001 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 - 0x8158 0 0x8002 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 +# 0x8610 0 0x8000 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 +# 0x8113 0 0x8001 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 +# 0x8158 0 0x8002 0x00020001 0x00030062 0xEA60 0x578 1 0 1 0xffffff 0x7 0x1 diff --git a/users/gsi_rich/db/register_configgbe_ip.db b/users/gsi_rich/db/register_configgbe_ip.db index 93d22ed..5081438 100644 --- a/users/gsi_rich/db/register_configgbe_ip.db +++ b/users/gsi_rich/db/register_configgbe_ip.db @@ -32,8 +32,8 @@ #0xc001 0 0x214397EA 0x001b 0xc0a80002 0xc3a4 0xDEADc000 0x001B 0xc0a80154 0xc350 0x0578 #0x8000 0 0x214397EA 0x001b 0xc0a80002 0xc38d 0xDEADc000 0x001c 0xc0a80155 0xc350 0x0578 -#14:dd:a9:d3:f4:b8 # hadesp39 - 0xc001 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc3a4 0xDEADc000 0x001B 0xc0a80154 0xc350 0x0578 - 0x8610 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc38d 0xDEADc001 0x001d 0xc0a80155 0xc350 0x0578 - 0x8113 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc3c1 0xDEADc002 0x001d 0xc0a80156 0xc350 0x0578 - 0x8158 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc3ee 0xDEADc003 0x001d 0xc0a80157 0xc350 0x0578 +#14:dd:a9:d3:f4:b8 # hadesp43 + 0xc001 0 0xe48c8a36 0xf832 0xc0a864b5 0xc3f5 0xDEADc000 0x001B 0xc0a864b6 0xc350 0x0578 +# 0x8610 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc38d 0xDEADc001 0x001d 0xc0a80155 0xc350 0x0578 +# 0x8113 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc3c1 0xDEADc002 0x001d 0xc0a80156 0xc350 0x0578 +# 0x8158 0 0xa9d3f4b8 0x14dd 0xc0a800b1 0xc3ee 0xDEADc003 0x001d 0xc0a80157 0xc350 0x0578 diff --git a/users/gsi_rich/db/register_configtdc.db b/users/gsi_rich/db/register_configtdc.db index a5655d7..48a6b71 100644 --- a/users/gsi_rich/db/register_configtdc.db +++ b/users/gsi_rich/db/register_configtdc.db @@ -12,7 +12,7 @@ #0xfe48 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 #0xfe4a 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # gpin addon -0xfe4c 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # padiwa addon +#0xfe4c 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # padiwa addon #0xfe4e 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # ADA addon #0xfe50 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # cbmtof #0xfe62 0 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 # trb3sc @@ -20,8 +20,8 @@ #0xfe48 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 #0xfe4a 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # gpin addon -0xfe4c 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # padiwa addon +#0xfe4c 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # padiwa addon #0xfe4e 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # ADA addon #0xfe50 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # cbmtof #0xfe62 0 0x50003000 0x80640064 0x00000000 0x00000000 0x0000007c 0x00000000 # trb3sc -0xfe51 0 0x50003000 0x00640064 0x00000000 0x00000000 0x00000078 0x00000000 # dirich +0xfe51 0 0x50003000 0x00640064 0x0000000f 0x00000000 0x00000078 0xffffffff # dirich diff --git a/users/gsi_rich/first.C b/users/gsi_rich/first.C index d805e1d..a5878f4 100644 --- a/users/gsi_rich/first.C +++ b/users/gsi_rich/first.C @@ -10,13 +10,13 @@ void first() base::ProcMgr::instance()->SetHistFilling(4); // configure bubbles - hadaq::TdcProcessor::SetBubbleMode(3, 18); + //hadaq::TdcProcessor::SetBubbleMode(0, 18); // this limits used for liner calibrations when nothing else is available hadaq::TdcMessage::SetFineLimits(31, 491); // default channel numbers and edges mask - hadaq::TrbProcessor::SetDefaults(5, 1); + hadaq::TrbProcessor::SetDefaults(5, 3); // [min..max] range for TDC ids hadaq::TrbProcessor::SetTDCRange(0x1200, 0x12FF); @@ -31,8 +31,8 @@ void first() const char* calname = getenv("CALNAME"); if ((calname==0) || (*calname==0)) calname = "test_"; const char* calmode = getenv("CALMODE"); - int cnt = (calmode && *calmode) ? atoi(calmode) : 10000; - cnt=100000; + int cnt = (calmode && *calmode) ? atoi(calmode) : 100000; + #cnt=50000; const char* caltrig = getenv("CALTRIG"); unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x1; const char* uset = getenv("USETEMP"); @@ -53,13 +53,13 @@ void first() // (1 << 0xD) - special 0XD trigger with internal pulser, used also for TOT calibration // 0x3FFF - all kinds of trigger types will be used for calibration (excluding 0xE and 0xF) // 0x80000000 in mask enables usage of temperature correction - hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp); + hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp | 0x3FFF); // only accept trigger type 0x1 when storing file // new hadaq::HldFilter(0x1); // create ROOT file store - base::ProcMgr::instance()->CreateStore("td.root"); + //base::ProcMgr::instance()->CreateStore("td.root"); // 0 - disable store // 1 - std::vector - includes original TDC message @@ -99,9 +99,11 @@ extern "C" void after_create(hadaq::HldProcessor* hld) // tdc->SetStoreEnabled(); for (unsigned nch=2;nchNumChannels();nch++) - tdc->SetRefChannel(nch, nch-2, 0xffff, 20000, -10., 10.); + tdc->SetRefChannel(nch, nch-1, 0xffff, 20000, -100., 100.); - tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000, -10., 10.); + //tdc->SetRefChannel(6, 3, 0xffff, 20000, -100., 100.); + + //tdc->SetRefChannel(1, tdc->NumChannels() -1 , 0xffff, 20000, -100., 100.); } diff --git a/users/gsi_rich/second.C b/users/gsi_rich/second.C index 71fdcc5..3c85724 100644 --- a/users/gsi_rich/second.C +++ b/users/gsi_rich/second.C @@ -7,106 +7,138 @@ #include "hadaq/TdcSubEvent.h" class SecondProc : public base::EventProc { - protected: - - std::string fTdcId; //!< tdc id where channels will be selected - - double fHits[33][2]; //!< 33 channel, abstract hits, two dges - - base::H1handle hNumHits; //!< histogram with hits number - base::H1handle hDif1; //!< histogram with hits number - base::H1handle hDif2; //!< histogram with hits number - base::H2handle hUser; //!< user-defined 2D histogram - - public: - SecondProc(const char* procname, const char* _tdcid) : - base::EventProc(procname), - fTdcId(_tdcid), - hUser(0) - { - printf("Create %s for %s\n", GetName(), fTdcId.c_str()); - - hNumHits = MakeH1("NumHits","Num hits", 100, 0, 100, "number"); - - /* - hDif1 = MakeH1("ToT1","ToT of channel 17 (18)", 1000, 0.5, 3.0, "ns"); - hDif2 = MakeH1("LED_diff1","LED diff channel 17 - 21", 1000, -2., -1., "ns"); - hUser = MakeH2("ToT_vs_LED","ToT versus LED difference", 500, -4, 0, 500, -2, -1, "ToT/ns;LED diff/ns"); - */ - - hDif1 = MakeH1("LE1","1 vs. 2", 30000, -90, 90, "ns"); - hDif2 = MakeH1("TE2","1 vs. 2", 30000, -90, 90, "ns"); - - - /* - hDif1 = MakeH1("ToT1","ToT of channel 9", 1000, 32, 40, "ns"); - hDif2 = MakeH1("LED_diff1","LED diff channel 9 - 11", 1000, -3, -1, "ns"); - hUser = MakeH2("ToT_vs_LED","ToT versus LED difference", 500, 32, 40, 500, -4, -0, "ToT/ns;LED diff/ns"); - */ - - // enable storing already in constructor - // SetStoreEnabled(); - } - - virtual void CreateBranch(TTree* t) - { - // only called when tree is created in first.C - // one can ignore - // t->Branch(GetName(), fHits, "hits[8]/D"); - } - - unsigned eventnumber = 0; - virtual bool Process(base::Event* ev) - { - for (unsigned n=0;n<33;n++) { - fHits[n][0] = 0.; - fHits[n][1] = 0.; - } - - eventnumber++; - hadaq::TdcSubEventFloat* sub = - dynamic_cast (ev->GetSubEvent(fTdcId)); - - //printf("%s process sub %p %s\n", GetName(), sub, fTdcId.c_str()); - - // when return false, event processing is cancelled - if (sub==0) return true; - - double num(0); - - for (unsigned cnt=0;cntSize();cnt++) { - const hadaq::MessageFloat& msg = sub->msg(cnt); - - unsigned chid = msg.getCh(); - unsigned edge = msg.getEdge(); // 0 - rising, 1 - falling - // if (chid==0) { ch0tm = ext.GetGlobalTime(); continue; } - - // time relative ch0 - double tm = msg.stamp; +protected: + + std::string fTdcId; //!< tdc id where channels will be selected + + double fHits[33][2]; //!< 33 channel, abstract hits, two dges + //unsigned eventnumber = 0; + + base::H1handle hNumHits; //!< histogram with hits number + + base::H1handle hToTch3; + base::H1handle hToTch4; + base::H1handle hTdifflch3ch4; + base::H1handle hTdifftch3ch4; + base::H1handle hTdifflch3ch4_cut1; + base::H1handle hTdifftch3ch4_cut1; + base::H1handle hTdifflch3ch4_cut2; + base::H1handle hTdifftch3ch4_cut2; + +public: + SecondProc(const char* procname, const char* _tdcid) : + base::EventProc(procname), + fTdcId(_tdcid) + + { + printf("Create %s for %s\n", GetName(), fTdcId.c_str()); + + hNumHits = MakeH1("NumHits","Num hits", 100, 0, 100, "number"); + + hToTch3 = MakeH1("hToTch3","ToTch3",400,-20,20, "ns"); + hToTch4 = MakeH1("hToTch4","ToTch4",400,-20,20, "ns"); + hTdifflch3ch4 = MakeH1("hTdifflch3ch4","Tdifflch3ch4",500,-10,20,"ns"); + hTdifftch3ch4 = MakeH1("hTdifftch3ch4","Tdifftch3ch4",500,-10,20,"ns"); + hTdifflch3ch4_cut1 = MakeH1("hTdifflch3ch4_cut1","Tdifflch3ch4",500,-10,20,"ns"); + hTdifftch3ch4_cut1 = MakeH1("hTdifftch3ch4_cut1","Tdifftch3ch4",500,-10,20,"ns"); + hTdifflch3ch4_cut2 = MakeH1("hTdifflch3ch4_cut2","Tdifflch3ch4",500,-10,20,"ns"); + hTdifftch3ch4_cut2 = MakeH1("hTdifftch3ch4_cut2","Tdifftch3ch4",500,-10,20,"ns"); + + // enable storing already in constructor + // SetStoreEnabled(); + } + + virtual void CreateBranch(TTree* t) + { + // only called when tree is created in first.C + // one can ignore + // t->Branch(GetName(), fHits, "hits[8]/D"); + } + + + virtual bool Process(base::Event* ev) + { + for (unsigned n=0;n<33;n++) { + fHits[n][0] = 0.; + fHits[n][1] = 0.; + } + + //eventnumber++; + hadaq::TdcSubEventFloat* sub = + dynamic_cast (ev->GetSubEvent(fTdcId)); + + //printf("%s process sub %p %s\n", GetName(), sub, fTdcId.c_str()); + + // when return false, event processing is cancelled + if (sub==0) return true; + + double num(0); + + for (unsigned cnt=0;cntSize();cnt++) { + const hadaq::MessageFloat& msg = sub->msg(cnt); + + unsigned chid = msg.getCh(); + unsigned edge = msg.getEdge(); // 0 - rising, 1 - falling + // if (chid==0) { ch0tm = ext.GetGlobalTime(); continue; } + + // time relative ch0 + double tm = msg.stamp; - if (chid<33) fHits[chid][edge] = tm; + if (chid<33) fHits[chid][edge] = tm; - //printf(" ch:%3d tm:%f, edge:%d\n", chid, tm, edge); - num+=1; - } + //printf(" ch:%3d tm:%f, edge:%d\n", chid, tm, edge); + num+=1; + } - //printf("tot(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[9][1]), (fHits[11][0] - fHits[11][1])); - //printf("led(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[11][0]), (fHits[9][1] - fHits[11][1])); + //printf("tot(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[9][1]), (fHits[11][0] - fHits[11][1])); + //printf("led(%d): %f %f\n", eventnumber, (fHits[9][0] - fHits[11][0]), (fHits[9][1] - fHits[11][1])); + + FillH1(hNumHits, num); + + double ToTch3, ToTch4; + double LETch3,TETch3,LETch4,TETch4; + + LETch3=fHits[3][0]; + TETch3=fHits[3][1]; + LETch4=fHits[4][0]; + TETch4=fHits[4][1]; + + ToTch3=TETch3-LETch3 - 18; // subtract TDC offsets + ToTch4=TETch4-LETch4 - 19.5; // individual offsets for each channel ! + + // Leading AND Trailing edge in both channels 3+4 + if ( fabs(LETch3) <0.00001 || fabs(LETch4) < 0.00001 ) + return true; + if ( fabs(TETch3) <0.00001 || fabs(TETch4) < 0.00001 ) + return true; + if ( (ToTch3>8) || (ToTch4>8) || (ToTch3<0) || (ToTch4<0)) + return true; + + // Fill ToT histograms + FillH1(hToTch3,ToTch3); + FillH1(hToTch4,ToTch4); + + // Fill dT ch4-ch3 histograms + double tdiff_leading=LETch4-LETch3; + double tdiff_trailing=TETch4-TETch3; + + if (ToTch3>0.0 && ToTch4>0.0) { + FillH1(hTdifflch3ch4,tdiff_leading); + FillH1(hTdifftch3ch4,tdiff_trailing); + } + if (ToTch3>2.0 && ToTch3<8.0 && ToTch4>2.0 && ToTch4<8.0) { + FillH1(hTdifflch3ch4_cut1,tdiff_leading); + FillH1(hTdifftch3ch4_cut1,tdiff_trailing); + } + if (ToTch3>3.5 && ToTch3<8.0 && ToTch4>3.5 && ToTch4<8.0) { + FillH1(hTdifflch3ch4_cut2,tdiff_leading); + FillH1(hTdifftch3ch4_cut2,tdiff_trailing); + } + + return true; + } - FillH1(hNumHits, num); - /* - FillH1(hDif1, (fHits[9][1] - fHits[9][0]) ); - FillH1(hDif2, (fHits[9][0] - fHits[11][0]) ); - FillH2(hUser, (fHits[9][1] - fHits[9][0]) , (fHits[9][0] - fHits[11][0]) ); - */ - - - FillH1(hDif1, (fHits[1][0] - fHits[2][0]) ); - FillH1(hDif2, (fHits[1][1] - fHits[2][1]) ); - - return true; - } }; @@ -114,5 +146,5 @@ void second() { //new SecondProc("A", "TDC_1133"); //new SecondProc("A", "TDC_1580"); - new SecondProc("A", "TDC_1207"); + new SecondProc("A", "TDC_1208"); } diff --git a/users/gsi_rich/startup.sh b/users/gsi_rich/startup.sh index ef5c93a..a20e560 100755 --- a/users/gsi_rich/startup.sh +++ b/users/gsi_rich/startup.sh @@ -1,23 +1,23 @@ #!/bin/bash -DAQ_TOOLS_PATH=~/trbsoft/daqtools -USER_DIR=~/trbsoft/daqtools/users/gsi_ee_trb84 -TRB_WEB_DIR=$DAQ_TOOLS_PATH/web +export DAQ_TOOLS_PATH=~/trbsoft/daqtools +export USER_DIR=~/trbsoft/daqtools/users/gsi_rich +export TRB_WEB_DIR=$DAQ_TOOLS_PATH/web export PATH=$PATH:$DAQ_TOOLS_PATH export PATH=$PATH:$DAQ_TOOLS_PATH/tools export PATH=$PATH:$USER_DIR -export TRB3_SERVER=trb084:26000 -export TRBNETDPID=$(pgrep -f "trbnetd -i 84") +export TRB3_SERVER=trbp165:26000 +export TRBNETDPID=$(pgrep -f "trbnetd -i 165") #export DAQOPSERVER=hadeb05:84 -export DAQOPSERVER=hades39:84 +export DAQOPSERVER=hadesp43:165 echo "- trbnetd pid: $TRBNETDPID" if [[ -z "$TRBNETDPID" ]] then - ~/trbsoft/trbnettools/bin/trbnetd -i 84 + ~/trbsoft/trbnettools/bin/trbnetd -i 165 fi ./check_ping.pl --reboot @@ -87,12 +87,12 @@ trbcmd loadbit 0x8300 0xd580 0x6 0x6 echo "pulser" # pulser #0 to 10 kHz -trbcmd w 0xc001 0xa150 0x0000270f -#trbcmd w 0xc001 0xa150 0x0022270f +#trbcmd w 0xc001 0xa154 0x0000270f # cts design newer than 2016.09 +trbcmd w 0xc001 0xa150 0x0000270f # -echo "trigger type" +#echo "trigger type" # set trigger type to 0x1 -trbcmd setbit 0xc001 0xa155 0x10 +#trbcmd setbit 0xc001 0xa155 0x10 echo "pulser enable" # pulser enable @@ -109,8 +109,10 @@ cd $USER_DIR trbcmd w 0xfe51 0xdf80 0xffffffff # enable monitor counters -trbcmd w 0x1133 0xc804 0x7c # max number of words -trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window -trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser +#trbcmd w 0x1133 0xc804 0x7c # max number of words +#trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window +#trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser #trbcmd setbit 0xc001 0xa101 0x8 # enable external trigger in of CTS +trbcmd setbit 0xc001 0xa101 0x1 # enable pulser + diff --git a/users/gsi_rich/trbreset_loop.pl b/users/gsi_rich/trbreset_loop.pl index 82b7efe..430799e 100755 --- a/users/gsi_rich/trbreset_loop.pl +++ b/users/gsi_rich/trbreset_loop.pl @@ -4,7 +4,7 @@ use strict; use warnings; ### Change THIS! -my $required_endpoints = 20; +my $required_endpoints = 5; diff --git a/web/CtsConfig.pm b/web/CtsConfig.pm index a9b01b0..35b4bb6 100644 --- a/web/CtsConfig.pm +++ b/web/CtsConfig.pm @@ -2,7 +2,7 @@ package CtsConfig; #default cts endpoint. can be overriden by a command line parameter sub getDefaultEndpoint { - return 0xc000; + return 0xc001; } 1; -- 2.43.0