ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/OSUT3Analysis/DBTools/scripts/osusub
(Generate patch)

Comparing UserCode/OSUT3Analysis/DBTools/scripts/osusub (file contents):
Revision 1.16 by ahart, Thu Apr 25 18:17:33 2013 UTC vs.
Revision 1.18 by ahart, Thu May 23 20:39:49 2013 UTC

# Line 5 | Line 5 | use Mysql;
5   use File::Copy;
6   use Getopt::Long;
7   use POSIX;
8 + use Term::ANSIColor;
9  
10   sub printHelp;
11   sub outputPset;
# Line 197 | Line 198 | getLocation
198    for (my $i = 1; $i <= $results->numrows (); $i++)
199      {
200        my @row = $results->fetchrow ();
201 +      $row[2] =~ s/([^ ]*) [^ ]*/$1/g;
202        $map{"$i"} = [$row[3], $row[4], $row[5], $row[7]] if $row[7];
203        $map{"$i"} = [$row[3], $row[4], $row[5], $row[6]] if !$row[7];
204        printf "(%2d) $row[0]\n", $i;
205 <      print "     created by $row[1] on $row[2]\n";
205 >      print "     (";
206 >      print color "green" if $row[5] eq "present";
207 >      print color "bold yellow" if $row[5] eq "submitted";
208 >      print color "bold red" if $row[5] eq "created" or $row[5] eq "cancelled" or $row[5] eq "deprecated";
209 >      print $row[5];
210 >      print color "reset";
211 >      print ") created by $row[1] on $row[2]\n";
212      }
213    print "\nWhich dataset would you like to use?: ";
214    my $response = <STDIN>;
# Line 229 | Line 237 | outputCondor
237    if (!(-e $condorFileName))
238      {
239        my $arguments = "Arguments               = config_cfg.py True $nJobs \$(Process)";
240 <      $arguments += " $dataset" if $dataset;
241 <      $arguments += " NULL" if !$dataset;
242 <      $arguments += " $label" if $label;
243 <      $arguments += " NULL" if !$label;
244 <      $arguments += "\n";
240 >      $arguments .= " $dataset" if $dataset;
241 >      $arguments .= " NULL" if !$dataset;
242 >      $arguments .= " $label" if $label;
243 >      $arguments .= " NULL" if !$label;
244 >      $arguments .= "\n";
245  
246        $condorFile .= "Executable              = $cmsRun\n";
247        $condorFile .= "Universe                = vanilla\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines