]> jspc29.x-matter.uni-frankfurt.de Git - hadesdaq.git/commitdiff
JAM: added new datasources for rpc and tof to eventbuilding configuration
authorHadaq Hades <jan@lxhadeb07>
Thu, 5 Dec 2019 09:33:23 +0000 (10:33 +0100)
committerHadaq Hades <jan@lxhadeb07>
Thu, 5 Dec 2019 09:33:23 +0000 (10:33 +0100)
remove unused register setup from hub configuration, adjust EB startup script for this

evtbuild/start_eb_gbe_newservers.pl
hub/register_configgbe.db
hub/register_configgbe_ip.db
main/data_sources.db

index a24eb22d400e99000f019b73ffbd91df2d59f8c8..a913f8715e74b252f61da12f705ba36d1c7d2d40 100755 (executable)
@@ -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;
index 970ef175b20d6a49eac702b51e2d80c1a5ebbd76..09d5926e7de9c90ece28081d214dd31e28e1d29e 120000 (symlink)
@@ -1 +1 @@
-register_configgbe_2018.db
\ No newline at end of file
+register_configgbe_2019.db
\ No newline at end of file
index 261e48187e58f8792065fb41bfa5818a15e2cea2..ec8a45c4a919ef3ab4d135f32e344bc1b5182cc5 120000 (symlink)
@@ -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
index 5bf253bc9bc05887b8ecb362cd1cf7c6f55c9532..ac57d055e137b136e0704d063ca8fa2f82b8af11 100644 (file)
@@ -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
 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