my $opt_help;
my $opt_time;
+my $opt_path="./";
my $time;
GetOptions ('h|help' => \$opt_help,
- 't|time=f' => \$opt_time
+ 't|time=f' => \$opt_time,
+ 'p|path=s' => \$opt_path
);
if($opt_help) {
required:
[-t|--time <seconds>] : The runtime of the daq_netmem (effective runtime).
[-h|--help] : Show this help.
+ [-p|--path /path/to/dump/data/ ] : Specify the path where the data is to be written to.
+ default: ./
"
}
$time = 3;
}
-
+execute("cd $opt_path");
$thr1 = threads->new(\&execute, "timeout -s SIGINT ".($time+1.5)." daq_evtbuild -m 1 -q 32 -d file -x te -Se -S boris");
sleep 1;
my $runtime = 0.2;
+my $dumpPath = "/tmp/MAPS_PREV/";
+
+unless(-e $dumpPath or mkdir $dumpPath) {
+ die "Unable to create $picPath\n";
+}
+
+my $picPath = "../temp/prevImgs/";
+
+unless(-e $picPath or mkdir $picPath) {
+ die "Unable to create $picPath\n";
+}
+
my $q = CGI->new;
print header;
my $dummy;
-$dummy=qx"./exec_evtbuild_t.pl -t $runtime 2>&1"; #14
-$dummy.=qx"rm ./temp.hld 2>&1";
-$dummy.=qx"mv te1* ./temp.hld 2>&1";
-$dummy.=qx"./unpack_hld.pl -f ./temp.hld 2>&1";
+$dummy=qx"./exec_evtbuild_t.pl -t $runtime -p $dumpPath 2>&1"; #14
+$dummy.=qx"rm $dumpPath/temp.hld 2>&1";
+$dummy.=qx"mv $dumpPath/te1* $dumpPath/temp.hld 2>&1";
+$dummy.=qx"./unpack_hld.pl -f $dmupPath/temp.hld 2>&1";
my $escapedDummy = escapeHTML($dummy);
$escapedDummy =~ s/\n/<br>/g;
print $escapedDummy;