#!/usr/bin/perl

use strict;

my @run_list = (72337,72383,72417,72424,72446,72486,72828,72863,72884,72949,72984,73005,73040);
# 72920 would not replay
# modify kumac. run kumac. run sort script.

print $run_list[$0];
print "\n";

if(0){
for(my $i = 0;$i<1;$i++){

    open(READ,"bcal.kumac");
    my @lines = <READ>;
    close(READ);
    my @output;
    foreach my $a (@lines){
	if($a =~ /run_number =/){
	    $a = "run_number = $run_list[$i]\n";	    
	}
	push(@output,$a);
    }
    open(WRITE,">bcal.kumac");
    foreach(@output){
	print WRITE;
    }
    close(WRITE);
    system("paw -b bcal");
    system("sort_and_extract.pl $run_list[$i]");
}
}
