Skip to content
Snippets Groups Projects
Commit 041f10e5 authored by Stephen A. Wood's avatar Stephen A. Wood
Browse files

Perl cleanup

parent 700faef4
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@
# Hall A style crate map DB file.
#
# 22.03.2012 (saw)
# 11.04.2014 (saw) Perl cleanup
%crates=();
......@@ -13,8 +14,8 @@ $bsub = 0;
$modtype = 0;
$slot = 0;
while(<>) {
$line=chomp;
if($line=/^\s*ROC=\s*(\d*)/i) {
chomp($line=$_);
if($line=~/^\s*ROC=\s*(\d*)/i) {
$i++;
$crate = $1;
if(not $crates{$crate}) {
......@@ -23,16 +24,16 @@ while(<>) {
}
$modtype = 0;
$slot = 0;
} elsif ($line=/^\s*nsubadd=\s*(\d*)/i) {
} elsif ($line=~/^\s*nsubadd=\s*(\d*)/i) {
$nsubadd = $1;
$modtype = 0;
} elsif ($line=/^\s*bsub=\s*(\d*)/i) {
} elsif ($line=~/^\s*bsub=\s*(\d*)/i) {
$bsub = $1;
$modtype = 0;
} elsif ($line=/^\s*slot=\s*(\d*)/i) {
} elsif ($line=~/^\s*slot=\s*(\d*)/i) {
$slot = $1;
$modtype = 0;
} elsif ($line=/^\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)/) {
} elsif ($line=~/^\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)/) {
if($modtype == 0) { # Slot not yet registered
if($nsubadd == 96) {
$modtype = 1877;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment