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.5 by ahart, Wed Aug 15 08:43:26 2012 UTC vs.
Revision 1.6 by ahart, Sun Sep 9 20:02:20 2012 UTC

# Line 74 | Line 74 | outputRunList
74    my $dataset = shift;
75    my $workingDir = shift;
76  
77 <  my ($location, $nFiles, $status) = getLocation ($dataset);
77 >  my ($location, $nFiles, $status, $crossSection) = getLocation ($dataset);
78    if ($status ne "present")
79      {
80        print "This dataset is not marked as present on the Tier 3!\n";
# Line 105 | Line 105 | outputRunList
105      }
106    print RUNLIST "]";
107    close (RUNLIST);
108 +  if ($crossSection && $crossSection >= 0.0)
109 +    {
110 +      open (CROSS_SECTION, ">$workingDir/crossSectionInPicobarn.txt");
111 +      print CROSS_SECTION "$crossSection\n";
112 +      close (CROSS_SECTION);
113 +    }
114  
115    return $nFiles;
116   }
# Line 118 | Line 124 | getLocation
124    my $queryDataset = $dataset;
125    $queryDataset =~ s/\*/%/g;
126    $queryDataset =~ s/(.*)/%$1%/g;
127 <  my $query = "select dataset,user,creationTime,location,nFiles,status from ntuple where dataset like '$queryDataset' and status='present' order by creationTime";
127 >  my $query = "select dataset,user,creationTime,location,nFiles,status,crossSectionInPicobarn from ntuple where dataset like '$queryDataset' and status='present' order by creationTime";
128    $db->selectdb ("ntuple");
129    $results = $db->query ($query);
130    if ($results->numrows () == 1)
131      {
132        my @row = $results->fetchrow ();
133 <      return ($row[3], $row[4], $row[5]);
133 >      return ($row[3], $row[4], $row[5], $row[6]);
134      }
135    if ($results->numrows () == 0)
136      {
# Line 137 | Line 143 | getLocation
143    for (my $i = 1; $i <= $results->numrows (); $i++)
144      {
145        my @row = $results->fetchrow ();
146 <      $map{"$i"} = [$row[3], $row[4], $row[5]];
146 >      $map{"$i"} = [$row[3], $row[4], $row[5], $row[6]];
147        printf "(%2d) $row[0]\n", $i;
148        print "     created by $row[1] on $row[2]\n";
149      }
# Line 150 | Line 156 | getLocation
156        exit;
157      }
158  
159 <  return ($map{$response}[0], $map{$response}[1], $map{$response}[2]);
159 >  return ($map{$response}[0], $map{$response}[1], $map{$response}[2], $map{$response}[3]);
160   }
161  
162   sub

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines