8 |
|
sub printHelp; |
9 |
|
sub getRunList; |
10 |
|
sub countEvents; |
11 |
+ |
sub isEDM; |
12 |
|
|
13 |
|
my %opt; |
14 |
|
Getopt::Long::Configure ("bundling"); |
84 |
|
$dir =~ s/^(.*)\/[^\/]*$/$1/; |
85 |
|
my $badJob = 0; |
86 |
|
my $jobNumber; |
87 |
< |
if ($file =~ m/^.*_[^_]*\.root$/) |
87 |
> |
my $fileIsEDM = 0; |
88 |
> |
$fileIsEDM = isEDM ($file) if $file =~ m/^.*\.root$/; |
89 |
> |
if ($file =~ m/^.*_[^_]*\.root$/ && !$fileIsEDM) |
90 |
|
{ |
91 |
|
$jobNumber = $file; |
92 |
|
$jobNumber =~ s/^.*_([^_]*)\.root$/$1/; |
93 |
|
$badJob = (defined $signals{$dir} && defined $signals{$dir}{$jobNumber}) || (defined $partial{$dir} && defined $partial{$dir}{$jobNumber}); |
94 |
|
} |
95 |
|
next if $badJob; |
96 |
< |
if ($file =~ m/^.*\.root$/) |
96 |
> |
if ($file =~ m/^.*\.root$/ && !$fileIsEDM) |
97 |
|
{ |
98 |
|
foreach my $arg (@ARGV) |
99 |
|
{ |
305 |
|
|
306 |
|
return $output; |
307 |
|
} |
308 |
+ |
|
309 |
+ |
sub |
310 |
+ |
isEDM |
311 |
+ |
{ |
312 |
+ |
my $file = shift; |
313 |
+ |
|
314 |
+ |
my $output = `edmFileUtil $file 2>&1`; |
315 |
+ |
return 0 if $output =~ m/appears to be missing/ || $output =~ m/not a ROOT file/; |
316 |
+ |
return 1; |
317 |
+ |
} |