From: Hadaq Hades Date: Thu, 5 Dec 2019 09:33:23 +0000 (+0100) Subject: JAM: added new datasources for rpc and tof to eventbuilding configuration X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=ad711b588046807582d42667cd4cbfed675d08c9;p=hadesdaq.git JAM: added new datasources for rpc and tof to eventbuilding configuration remove unused register setup from hub configuration, adjust EB startup script for this --- diff --git a/evtbuild/start_eb_gbe_newservers.pl b/evtbuild/start_eb_gbe_newservers.pl index a24eb22..a913f87 100755 --- a/evtbuild/start_eb_gbe_newservers.pl +++ b/evtbuild/start_eb_gbe_newservers.pl @@ -104,7 +104,7 @@ my $numOfEBProcs = 0; my %EB_Args; my $EB_Args_href = \%EB_Args; -my @EB_IP_list; +#my @EB_IP_list; @@ -468,8 +468,9 @@ sub getEBArgs() #--- Loop over all EB processes #print Dumper $eb_ids_gbe_href; #exit; - foreach my $ebproc ( sort keys %{$eb_ids_gbe_href} ){ - + #foreach my $ebproc ( sort keys %{$eb_ids_gbe_href} ){ + foreach my $ebproc ( 0 .. $#bnetservers){ + #- 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"; @@ -483,10 +484,10 @@ sub getEBArgs() } - my $eb_ip = $eb_ids_gbe_href->{$ebproc}->{'IP'}; + #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 ); + #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); @@ -496,7 +497,8 @@ sub getEBArgs() my $procname = sprintf("EB_PROC_%d", 1+$ebproc); # $rfio_iCopyMode = $temp_args_href->{$procname}->{'RFIO_iCopyMode'}; - $href->{$ebproc}->{'IP'} = $eb_ip; + #$href->{$ebproc}->{'IP'} = $eb_ip; + $href->{$ebproc}->{'IP'} = $bnetservers[$ebproc]; $href->{$ebproc}->{'EBNUM'} = $ebproc+1; $href->{$ebproc}->{'BASEPORT'} = $base_port; $href->{$ebproc}->{'PORT_LIST'} = $eb_ids_gbe_href->{$ebproc}->{'port_list'}; @@ -704,7 +706,7 @@ while($totalbuilders < $maxbuilders) my $lasttotalbuilders=$totalbuilders; for ( my $ebserver=0; $ebserver<$maxbuildservers; $ebserver=$ebserver+1){ my $bnet_numbuilders = $EB_Args_href->{$ebserver}->{'BNET_BLD'}; - print "numbuilders for $ebserver is $bnet_numbuilders"; + #print "numbuilders for $ebserver is $bnet_numbuilders \n"; if($totalbuilders < $maxbuilders) { if($localbuilders[$ebserver] < $bnet_numbuilders) @@ -1522,7 +1524,9 @@ sub killIOC() print "Looking for running IOCs...\n" if($opt_verb); #--- Loop over server IPs - foreach my $ip (@EB_IP_list){ + + #foreach my $ip (@EB_IP_list){ + foreach my $ip (@bnetservers){ &findRunningIOC($ip, $ioc_href); } @@ -1559,7 +1563,8 @@ sub killIOC() ### just kill the remaining stuff @process_list = (); - foreach my $ip (@EB_IP_list){ + #foreach my $ip (@EB_IP_list){ + foreach my $ip (@bnetservers){ my $cmd = qq|ssh scs\@$ip "/usr/bin/pkill -f \\"SCREEN -dmS ioc_eb\\""|; print $cmd; &forkMe($cmd, "/tmp/ioc_kill_$ip", \@process_list); @@ -1573,7 +1578,8 @@ sub killIOC() ### just kill the remaining stuff @process_list = (); - foreach my $ip (@EB_IP_list){ + #foreach my $ip (@EB_IP_list){ + foreach my $ip (@bnetservers){ my $cmd = qq|ssh scs\@$ip "/usr/bin/pkill -9 -f \\"SCREEN -dmS ioc_eb\\""|; &forkMe($cmd, "/tmp/ioc_kill2_$ip", \@process_list); } @@ -1904,6 +1910,8 @@ sub readEBports() #print Dumper $tmp_href; #- Sort hash according to active data source list + my $numids= scalar keys %tmp; + #print "number of ids: $numids \n"; foreach my $id (keys %tmp){ $ports_href->{$id}->{'IP'} = $tmp_href->{$id}->{'IP'}; @@ -1914,14 +1922,37 @@ sub readEBports() next if($ind1 == -1); +# push( @{$ports_href->{$id}->{'port_list'}}, $tmp_href->{$id}->{'port_list'}->[$ind1]); +# # added for bnet JAM: +# push( @{$ports_href->{$id}->{'ip_list'}}, $tmp_href->{$id}->{'ip_list'}->[$ind1]); +# push( @{$ports_href->{$id}->{'calib_list'}}, $tmp_href->{$id}->{'calib_list'}->[$ind1]); +# +# push( @{$ports_href->{$id}->{'addr_list'}}, $addr); +# push( @{$ports_href->{$id}->{'bufsize_list'}}, $activeSources_href->{'bufsize_list'}->[$ind2]); + + + if($id == 0 && $numids==1){ + # fill all ids of active inputs with setup for id 0 of bnet + foreach my $bid (0 .. $#bnetservers){ + push( @{$ports_href->{$bid}->{'port_list'}}, $tmp_href->{$id}->{'port_list'}->[$ind1]); + push( @{$ports_href->{$bid}->{'ip_list'}}, $tmp_href->{$id}->{'ip_list'}->[$ind1]); + push( @{$ports_href->{$bid}->{'calib_list'}}, $tmp_href->{$id}->{'calib_list'}->[$ind1]); + push( @{$ports_href->{$bid}->{'addr_list'}}, $addr); + push( @{$ports_href->{$bid}->{'bufsize_list'}}, $activeSources_href->{'bufsize_list'}->[$ind2]); + } + } + else + { + #old EB mode/no bnet: config file defines all. DO WE NEED THIS STILL? push( @{$ports_href->{$id}->{'port_list'}}, $tmp_href->{$id}->{'port_list'}->[$ind1]); # added for bnet JAM: - push( @{$ports_href->{$id}->{'ip_list'}}, $tmp_href->{$id}->{'ip_list'}->[$ind1]); - push( @{$ports_href->{$id}->{'calib_list'}}, $tmp_href->{$id}->{'calib_list'}->[$ind1]); - + #push( @{$ports_href->{$id}->{'ip_list'}}, $tmp_href->{$id}->{'ip_list'}->[$ind1]); + #push( @{$ports_href->{$id}->{'calib_list'}}, $tmp_href->{$id}->{'calib_list'}->[$ind1]); push( @{$ports_href->{$id}->{'addr_list'}}, $addr); push( @{$ports_href->{$id}->{'bufsize_list'}}, $activeSources_href->{'bufsize_list'}->[$ind2]); - } + + } + } } #print Dumper $ports_href; diff --git a/hub/register_configgbe.db b/hub/register_configgbe.db index 970ef17..09d5926 120000 --- a/hub/register_configgbe.db +++ b/hub/register_configgbe.db @@ -1 +1 @@ -register_configgbe_2018.db \ No newline at end of file +register_configgbe_2019.db \ No newline at end of file diff --git a/hub/register_configgbe_ip.db b/hub/register_configgbe_ip.db index 261e481..ec8a45c 120000 --- a/hub/register_configgbe_ip.db +++ b/hub/register_configgbe_ip.db @@ -1 +1 @@ -register_configgbe_ip_newservers_secondgbe.db \ No newline at end of file +register_configgbe_ip_2019.db \ No newline at end of file diff --git a/main/data_sources.db b/main/data_sources.db index 5bf253b..ac57d05 100644 --- a/main/data_sources.db +++ b/main/data_sources.db @@ -3,11 +3,25 @@ # Addr On/Off Name DataSize #Start must be the first for EvtId 0x8800 1 CentralCTS low -0x8400 1 RPC123 mid -0x8410 1 RPC456 mid -0x8600 1 TOF low -0x8700 1 FW low -0x8880 1 StartTRB3 low +0x8810 0 CentralAux low +0x8400 0 RPC123 mid +0x8410 0 RPC456 mid +0x84c0 0 RPCnew1 mid +0x84c1 0 RPCnew2 mid +0x84c2 0 RPCnew3 mid +0x84c3 0 RPCnew4 mid +0x84c4 1 RPCnew5 mid +0x84c5 0 RPCnew6 mid +0x8600 0 TOF low +0x86c0 0 TOFnew1 mid +0x86c1 0 TOFnew2 mid +0x86c2 0 TOFnew3 mid +0x86c3 0 TOFnew4 mid +0x86c4 0 TOFnew5 mid +0x86c5 0 TOFnew6 mid +0x86c6 0 TOFnew7 mid +0x8700 0 FW low +0x8880 0 StartTRB3 low #0x8890 0 VetoTRB3 low5t #0x8900 0 Pion1 mid #0x8910 0 Pion2 mid @@ -23,21 +37,21 @@ 0x1130 1 MDC34sec4 mid 0x1140 1 MDC34sec5 high 0x1150 1 MDC34sec6 high -0x8a00 1 ECal0 mid -0x8a01 1 ECal1 mid -0x8a02 1 ECal2 mid -0x8a03 1 ECal3 mid -0x8a04 1 ECal4 mid -0x8a05 1 ECal5 mid -0x83c0 1 RICH0 mid -0x83c1 1 RICH1 mid -0x83c2 1 RICH2 mid -0x83c3 1 RICH3 mid -0x83c4 1 RICH4 mid -0x83c5 1 RICH5 mid -0x83c6 1 RICH6 mid -0x83c7 1 RICH7 mid -0x83c8 1 RICH8 mid -0x83c9 1 RICH9 mid -0x83ca 1 RICHa mid -0x83cb 1 RICHb mid +0x8a00 0 ECal0 mid +0x8a01 0 ECal1 mid +0x8a02 0 ECal2 mid +0x8a03 0 ECal3 mid +0x8a04 0 ECal4 mid +0x8a05 0 ECal5 mid +0x83c0 0 RICH0 mid +0x83c1 0 RICH1 mid +0x83c2 0 RICH2 mid +0x83c3 0 RICH3 mid +0x83c4 0 RICH4 mid +0x83c5 0 RICH5 mid +0x83c6 0 RICH6 mid +0x83c7 0 RICH7 mid +0x83c8 0 RICH8 mid +0x83c9 0 RICH9 mid +0x83ca 0 RICHa mid +0x83cb 0 RICHb mid