From: Michael Wiebusch Date: Mon, 5 Aug 2013 11:52:10 +0000 (+0200) Subject: changed paths in the preview plot scripts to temp directories X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=b25835762c8e561aa1381702bc2538cfae79731b;p=mvdsensorcontrol.git changed paths in the preview plot scripts to temp directories --- diff --git a/tools/preview/unpack_hld.pl b/tools/preview/unpack_hld.pl index 8c3125d..e9b0c64 100755 --- a/tools/preview/unpack_hld.pl +++ b/tools/preview/unpack_hld.pl @@ -23,6 +23,7 @@ my $opt_help = 0; my $opt_verb = 0; my $opt_debug = 0; my $opt_frameinfo = 0; +my $opt_picpath = "./"; my $totalevents = 1E9; my $mode = ""; @@ -31,6 +32,7 @@ GetOptions ('h|help' => \$opt_help, 'v|verb' => \$opt_verb, 'i|info' => \$opt_frameinfo, 'd|debug' => \$opt_debug, + 'p|picpath' => \$opt_picpath, 'e|events=i' => \$totalevents); @@ -43,6 +45,7 @@ if($opt_help) { printf("[-v|--verb] Dump hld file content\n"); printf("[-i|--info] Show frame information\n"); printf("[-d|--debug] More debugging output\n"); + printf("[-p|--picpath] Set where to write plots\n"); printf("\n"); exit; } @@ -497,7 +500,7 @@ sub WriteResults { print $fh "set cbrange [0:5000];\n"; print $fh "set palette defined ( 0 'white', 1 'red', 5 'black', 10 'blue', 5000 'green');\n"; my $s = sprintf("%04x",$id); - print $fh "set output './image_recalibrated_$s.png';\n"; + print $fh "set output '$opt_picpath/$image_recalibrated_$s.png';\n"; print $fh "plot '-' matrix with image\n"; my @matrix; diff --git a/tools/run.pl b/tools/run.pl index c6103a6..d9727d8 100755 --- a/tools/run.pl +++ b/tools/run.pl @@ -20,7 +20,7 @@ my $runtime = 0.2; my $dumpPath = "/tmp/MAPS_PREV/"; unless(-e $dumpPath or mkdir $dumpPath) { - die "Unable to create $picPath\n"; + die "Unable to create $dumpPath\n"; } my $picPath = "../temp/prevImgs/"; @@ -37,12 +37,7 @@ print start_html( -style=>{'src'=>'../layout/styles.css'} ); -# print h2("testgui"); -# print "

still more to come

"; -# print escapeHTML("hallo<<<>>>&&&!!"),br; -# print escapeHTML($here); -# $ENV{'PATH'}=$ENV{'PATH'}.":/home/hadaq/bin"; $ENV{'PATH'}=$ENV{'PATH'}.":/local.1/bastelstube/daqdata/bin"; # print br,$ENV{'PATH'},br; $ENV{'JTAGPATH'}="/local.1/jtag_mvd/soft/toolbox/jtag_atomic/"; @@ -50,21 +45,17 @@ $ENV{'DAQOPSERVER'}="localhost:7"; system("./startup.pl ../setup/testsetup.xml"); -chdir("preview"); +# chdir("preview"); my $dummy; -$dummy=qx"./exec_evtbuild_t.pl -t $runtime -p $dumpPath 2>&1"; #14 +$dummy=qx"./preview/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"; +$dummy.=qx"./preview/unpack_hld.pl -f $dumpPath/temp.hld -p $picPath 2>&1"; my $escapedDummy = escapeHTML($dummy); $escapedDummy =~ s/\n/
/g; print $escapedDummy; -# qx%./run.pl -t 0.1 -id ccc1ccc1%; -# print br; -# print img{src=>'./preview/image_recalibrated_ccc1.png?'.rand(),title=>$dummy}; -# print br; -# print "finished",br; + print end_html;