makeL2TimingFiles.pl

#!/opt/star/sl44_gcc346/bin/perl -w

# specify which macro to run
my $macro="runEEmcL2Timing.C";

# run numbers
my @runs = ( 8333113, 8333115, 8333116, 8333117, 8333118, 8333120,
8333121, 8333123, 8333124, 8333125, 8333126, 8333127,
8333128, 8333129
);


# number of events per run
my @nevents = ( 200000, 200000, 200000, 200000, 200000, 200000,
200000, 200000, 200000, 200000, 200000, 200000,
200000, 200000 );



# tower delays in each run
@tower_delays = (
5, 15, 25, 35, 45, 55,
65, 70, 60, 50, 40, 30,
20, 10,
);


# mapmt delays in each run (junk in this scan );
@mapmt_delays = (
5, 15, 25, 35, 45, 55,
65, 75, 70, 60, 50, 40,
30, 20, 10, 19
);


# loop over the runs
$i = 0;
foreach $run ( @runs )
{

# command to run
$cmd = "root4star -q -b $macro\\\($nevents[$i],\\\"$run.list\\\",\\\"$run.root\\\",$tower_delays[$i],$mapmt_delays[$i]\\\)\n";

# run root4star
open RUNIT, "$cmd|";
while ( <RUNIT> ) { print; }

$i++;

}