]> jspc29.x-matter.uni-frankfurt.de Git - mvdsensorcontrol.git/commitdiff
changed paths in the preview plot scripts to temp directories
authorMichael Wiebusch <stratomaster@gmx.net>
Mon, 5 Aug 2013 11:52:10 +0000 (13:52 +0200)
committerMichael Wiebusch <stratomaster@gmx.net>
Mon, 5 Aug 2013 11:52:10 +0000 (13:52 +0200)
tools/preview/unpack_hld.pl
tools/run.pl

index 8c3125d3f0fbafe03b350ee6d283501c0fc2e389..e9b0c6414ee899c88b5e1bdcd1f2060c2d207c70 100755 (executable)
@@ -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;
index c6103a6e90d3f0513f60b5dc9ea71969f45a9131..d9727d8e647670a1745de22ac5934e96c66ea52e 100755 (executable)
@@ -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 "<p> still more to come </p>";
 
-# 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/<br>/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;