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.25 by ahart, Tue Jun 4 23:46:12 2013 UTC vs.
Revision 1.26 by ahart, Tue Jun 11 11:02:00 2013 UTC

# Line 146 | Line 146 | foreach my $arg (@ARGV)
146          my $weight = $weights{$arg};
147          system ("weightTrees $rootFile $weight");
148        }
149 +    if (defined $crossSections{$dirs{$arg}})
150 +      {
151 +        open (EVENT_COUNT, ">$dirs{$arg}/numberOfEvents.txt");
152 +        print EVENT_COUNT sprintf ("%.0f", $count) . "\n";
153 +        close (EVENT_COUNT);
154 +      }
155    }
156   my $mergedFiles = join (" ", @mergedFiles);
157   my $mergedWeights = join (",", @mergedWeights);
# Line 190 | Line 196 | foreach my $arg (keys %weights)
196   print $output if $printOutput;
197  
198   my $goodEvents = countEvents ("$opt{'prefix'}.root", $cutFlow);
199 < print "$nGoodJobs jobs ran successfully over $nTotalEvents ($goodEvents weighted) events.\n" if $counting;
199 > printf "$nGoodJobs jobs ran successfully over $nTotalEvents (%.1f weighted) events.\n", $goodEvents if $counting;
200   print "$nBadJobs jobs failed to run.\n" if $counting;
201   print "$nIncompleteJobs jobs have not finished.\n" if $counting;
202   print "=============================================\n";

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines