From: Michael Wiebusch Date: Mon, 5 Aug 2013 10:42:21 +0000 (+0200) Subject: sorry, this commit should actually be in the gui_devel branch X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=8270ed716c331fc36702c0da7b7f3b337cfd207d;p=mvdsensorcontrol.git sorry, this commit should actually be in the gui_devel branch --- diff --git a/tools/preview/exec_evtbuild_t.pl b/tools/preview/exec_evtbuild_t.pl index 7cff77c..e45096d 100755 --- a/tools/preview/exec_evtbuild_t.pl +++ b/tools/preview/exec_evtbuild_t.pl @@ -16,11 +16,13 @@ my $thr2; 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) { @@ -35,6 +37,8 @@ sub help(){ required: [-t|--time ] : 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: ./ " } @@ -47,7 +51,7 @@ else{ $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; diff --git a/tools/run.pl b/tools/run.pl index 4a7735d..c6103a6 100755 --- a/tools/run.pl +++ b/tools/run.pl @@ -17,6 +17,18 @@ my $here = getcwd(); 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; @@ -42,10 +54,10 @@ chdir("preview"); 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/
/g; print $escapedDummy;