78 |
|
if ($status ne "present") |
79 |
|
{ |
80 |
|
print "This dataset is not marked as present on the Tier 3!\n"; |
81 |
< |
exit; |
81 |
> |
print "Continue anyway? (y/N): "; |
82 |
> |
my $response = <STDIN>; |
83 |
> |
$response =~ s/\n//g; |
84 |
> |
exit if !$response || lc ($response) ne "y"; |
85 |
|
} |
86 |
|
if (!(-e $location)) |
87 |
|
{ |
94 |
|
if (@files - 2 != $nFiles) |
95 |
|
{ |
96 |
|
print "Number of files does not match database entry!\n"; |
97 |
< |
exit; |
97 |
> |
print "Continue anyway? (y/N): "; |
98 |
> |
my $response = <STDIN>; |
99 |
> |
$response =~ s/\n//g; |
100 |
> |
exit if !$response || lc ($response) ne "y"; |
101 |
|
} |
102 |
|
open (RUNLIST, ">$workingDir/runList.py"); |
103 |
|
print RUNLIST "runList = [\n"; |
130 |
|
my $queryDataset = $dataset; |
131 |
|
$queryDataset =~ s/\*/%/g; |
132 |
|
$queryDataset =~ s/(.*)/%$1%/g; |
133 |
< |
my $query = "select dataset,user,creationTime,location,nFiles,status,crossSectionInPicobarn from ntuple where dataset like '$queryDataset' and status='present' order by creationTime"; |
133 |
> |
my $query = "select dataset,user,creationTime,location,nFiles,status,crossSectionInPicobarn from ntuple where dataset like '$queryDataset' order by creationTime"; |
134 |
|
$db->selectdb ("ntuple"); |
135 |
|
$results = $db->query ($query); |
136 |
|
if ($results->numrows () == 1) |