]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
sorry, this commit should actually be in the gui_devel branch
authorMichael Wiebusch <stratomaster@gmx.net>
Mon, 5 Aug 2013 10:42:21 +0000 (12:42 +0200)
committerMichael Wiebusch <stratomaster@gmx.net>
Mon, 5 Aug 2013 10:42:21 +0000 (12:42 +0200)
tools/preview/exec_evtbuild_t.pl
tools/run.pl

index 7cff77cb252e76fd5a24ee304d2f11133a71ca65..e45096d973a473a0ef9e97c51e002e1a41fbcacf 100755 (executable)
@@ -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  <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: ./
 
 "
 }
@@ -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;
index 4a7735d4b4aeb856ab5776a3af74a9b72370488e..c6103a6e90d3f0513f60b5dc9ea71969f45a9131 100755 (executable)
@@ -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/<br>/g;
 print $escapedDummy;