From 22abccde99f988e30d2354a519110639c0407e3f Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Tue, 6 Aug 2013 18:45:36 +0200 Subject: [PATCH] most hardcoded stuff changed --- Environment.pm | 25 +++++++++++++++++-------- tools/run.pl | 4 ++-- tools/statusgui.pl | 2 +- tools/testgui.pl | 16 ++++++++-------- 4 files changed, 28 insertions(+), 19 deletions(-) diff --git a/Environment.pm b/Environment.pm index b31653c..6f780d5 100644 --- a/Environment.pm +++ b/Environment.pm @@ -1,16 +1,25 @@ #Import settings from environment or assign default values -use constant DAQOPSERVER => $ENV{'DAQOPSERVER'} || "localhost:7"; -use constant JTAGPATH => $ENV{'JTAGPATH'} || "/local.1/jtag_mvd/soft/toolbox/jtag_atomic/"; -use constant JTAGCONFIGPATH => $ENV{'JTAGCONFIGPATH'} || "/tmp/inifiles"; -use constant XMLPATH => $ENV{'XMLPATH'} || "/local.1/htdocs/jtag/"; +use constant JTAGROOTPATH => $ENV{'JTAGROOTPATH'} || "/local.1/htdocs/jtag/"; -use constant SETUPFILE => "/local.1/htdocs/jtag/setup/testsetup.xml"; +use constant DAQOPSERVER => $ENV{'DAQOPSERVER'} || "localhost:7"; +use constant JTAGPATH => $ENV{'JTAGPATH'} || "/local.1/jtag_mvd/soft/toolbox/jtag_atomic/"; +use constant JTAGCONFIGPATH => $ENV{'JTAGCONFIGPATH'} || "/tmp/inifiles"; +use constant XMLPATH => $ENV{'XMLPATH'} || JTAGROOTPATH; +use constant EVENTBUILDERPATH => $ENV{'EVENTBUILDERPATH'} || "/local.1/bastelstube/daqdata/bin"; + + +use constant TEMPDIR => JTAGROOTPATH."temp/"; +use constant SETUPDIR => JTAGROOTPATH."setup/"; +use constant CONFDIR => JTAGROOTPATH."config/"; +use constant SPECDIR => JTAGROOTPATH."specs/"; +use constant PICTUREPATH => TEMPDIR."prevImgs/"; #path for images on webserver +use constant DUMPPATH => "/tmp/MAPS_PREV/"; #path for small hld dumps + +use constant SETUPFILE => SETUPDIR."testsetup.xml"; -#Internal variable -my $additionalpath = "/local.1/bastelstube/daqdata/bin"; #Export variables that are used elsewhere @@ -19,6 +28,6 @@ $ENV{'JTAGPATH'} = JTAGPATH unless defined $ENV{'JTAGPATH'}; $ENV{'JTAGCONFIGPATH'} = JTAGCONFIGPATH unless defined $ENV{'JTAGCONFIGPATH'}; $ENV{'XMLPATH'} = XMLPATH unless defined $ENV{'XMLPATH'}; -$ENV{'PATH'} = $ENV{'PATH'}.":".$additionalpath; +$ENV{'PATH'} = $ENV{'PATH'}.":".EVENTBUILDERPATH; 1; \ No newline at end of file diff --git a/tools/run.pl b/tools/run.pl index 05fef49..c4887a8 100755 --- a/tools/run.pl +++ b/tools/run.pl @@ -22,8 +22,8 @@ my $here = getcwd(); my $runtime = 0.2; -my $dumpPath = "/tmp/MAPS_PREV/"; -my $picPath = "../temp/prevImgs/"; +my $dumpPath = DUMPPATH; +my $picPath = PICTUREPATH; my $q = CGI->new; diff --git a/tools/statusgui.pl b/tools/statusgui.pl index 3799dc2..2ba524c 100755 --- a/tools/statusgui.pl +++ b/tools/statusgui.pl @@ -12,7 +12,7 @@ use lib "$FindBin::Bin/.."; use Environment; -my $configFile = '/local.1/htdocs/jtag/setup/testsetup.xml'; +my $configFile = SETUPFILE; diff --git a/tools/testgui.pl b/tools/testgui.pl index 8b518de..01cc606 100755 --- a/tools/testgui.pl +++ b/tools/testgui.pl @@ -14,17 +14,17 @@ use HTML::Entities; require Common; require xmlOperations; +use FindBin; +use lib "$FindBin::Bin/.."; +use Environment; -##### preliminary hardcoded stuff: -our $setupDir = '../setup'; -our $confDir = '../config'; -our $specDir = '../specs'; -my $picPath = "../temp/prevImgs/"; - -my $setupFileName = "testsetup.xml"; -my $setupFile = $setupDir."/".$setupFileName; +our $setupDir = SETUPDIR; +our $confDir = CONFDIR; +our $specDir = SPECDIR; +my $picPath = PICTUREPATH; +my $setupFile = SETUPFILE; # the file that tells me what fields should be printed in the quick edit area # for each sensor -- 2.43.0