Skip to content

Commit

Permalink
Merge pull request #8050 from frmeier/patch_mpendparse
Browse files Browse the repository at this point in the history
Parse exit state of alignment in millepede.end and set job status accordingly
  • Loading branch information
cmsbuild committed Mar 4, 2015
2 parents 6fe6d0f + a9818bd commit e1e2df6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Alignment/MillePedeAlignmentAlgorithm/scripts/mps_check.pl
Expand Up @@ -239,6 +239,32 @@ BEGIN
}
} else {
print "mps_check.pl cannot find $eazeLog to test\n";
}

# check millepede.end -- added F. Meier 03.03.2015
$eazeLog = "jobData/@JOBDIR[$i]/millepede.end";
$logZipped = "no";
if (-r $eazeLog.".gz") {
system "gunzip ".$eazeLog.".gz";
$logZipped = "true";
}
if (-r $eazeLog) {
# open the input file
open INFILE,"$eazeLog";
# scan records in input file
while ($line = <INFILE>) {
# Checks for the output code. 0 is OK, 1 is WARN, anything else is FAIL
if ($line =~ m/([-+]?\d+)/) {
if ($1 == 1) { $pedeLogWrn = 1; $pedeLogWrnStr .= $line;}
elsif ($1 != 0) { $pedeLogErr = 1; $pedeLogErrStr .= $line;}
}
}
close INFILE;
if ($logZipped eq "true") {
system "gzip $eazeLog";
}
} else {
print "mps_check.pl cannot find $eazeLog to test\n";
}
}

Expand Down Expand Up @@ -340,6 +366,7 @@ BEGIN
print "@JOBDIR[$i] @JOBID[$i] Warnings in running Pede:\n";
print $pedeLogWrnStr;
$remark = "pede warnings";
$okStatus = "WARN";
}
if ($endofjob ne 1) {
print "@JOBDIR[$i] @JOBID[$i] Job not ended\n";
Expand Down

0 comments on commit e1e2df6

Please sign in to comment.