Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:16:12

0001 #! /usr/bin/perl -w
0002 #
0003 #  This script is used to take the full CondorList and break it
0004 #  into smaller jobs for faster analysis
0005 #
0006 use strict;
0007 use CGI qw(:standard);
0008 
0009 open (INPUT, "<", "FULL_Condor.txt") or die "Can't open original file $!/n";
0010 open (OUTPUT, ">", "FastCondor.txt") or die "Can't open original file $!/n";
0011 
0012 my %PadMap;
0013 my $CurrentSignal="GND";
0014 my @Connector = ();
0015 my @Pad = ();
0016 
0017 while (<INPUT>)
0018 {
0019     my $line = $_;
0020     
0021     if ($line =~ /<signal name/)
0022     {
0023     my @lineValues = split(/"/,$line);
0024     $CurrentSignal = $lineValues[1];
0025     @Connector = ();
0026     @Pad       = ();
0027     }
0028     
0029     if (!($CurrentSignal =~ /GND/) && $line =~ /<contactref/ )
0030     {
0031     print " push ";
0032     my @ContactRefValues = split(/"/,$line);
0033     push @Connector, $ContactRefValues[1];
0034     push @Pad, $ContactRefValues[3];
0035     }
0036 
0037     if (!($CurrentSignal =~ /GND/) && $line =~ /<\/signal/)
0038     {
0039     my $length = $#Connector + 1;
0040     print "$length\n";
0041     for (my $i=0; $i <= $#Connector; $i++)
0042     {
0043         print OUTPUT "$Connector[$i]$Pad[$i],";
0044     }
0045     print OUTPUT "\n";
0046     }
0047 
0048 
0049 }
0050 close (INPUT);
0051 close (OUTPUT);