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

Comparing UserCode/OSUT3Analysis/AnaTools/scripts/mergeHists (file contents):
Revision 1.26 by ahart, Tue Jun 11 11:02:00 2013 UTC vs.
Revision 1.27 by ahart, Tue Jun 18 02:00:39 2013 UTC

# Line 8 | Line 8 | sub processArgs;
8   sub printHelp;
9   sub getRunList;
10   sub countEvents;
11 + sub isEDM;
12  
13   my %opt;
14   Getopt::Long::Configure ("bundling");
# Line 83 | Line 84 | foreach my $file (@$files)
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            {
# Line 302 | Line 305 | countEvents
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 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines