From 576d3d1b5c1188b710c541f9b4192e68489b7bb6 Mon Sep 17 00:00:00 2001 From: Michael Traxler Date: Tue, 19 Dec 2017 23:09:42 +0100 Subject: [PATCH] misc, perl5 use local directory in library path, mt --- users/gsi_ee_trb84/first.C | 18 +++++++++--------- users/gsi_ee_trb84/startup.sh | 5 +++-- web/cts_gui | 2 ++ web/httpi | 1 + 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/users/gsi_ee_trb84/first.C b/users/gsi_ee_trb84/first.C index eb6e22a..6b8450b 100644 --- a/users/gsi_ee_trb84/first.C +++ b/users/gsi_ee_trb84/first.C @@ -34,7 +34,7 @@ void first() int cnt = (calmode && *calmode) ? atoi(calmode) : 100000; //cnt=100000; const char* caltrig = getenv("CALTRIG"); - unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x0; + unsigned trig = (caltrig && *caltrig) ? atoi(caltrig) : 0x1; const char* uset = getenv("USETEMP"); unsigned use_temp = 0; // 0x80000000; if ((uset!=0) && (*uset!=0) && (strcmp(uset,"1")==0)) use_temp = 0x80000000; @@ -53,8 +53,8 @@ void first() // (1 << 0xD) - special 0XD trigger with internal pulser, used also for TOT calibration // 0x3FFF - all kinds of trigger types will be used for calibration (excluding 0xE and 0xF) // 0x80000000 in mask enables usage of temperature correction - //hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp); - hld->ConfigureCalibration(calname, 100000, 1); + hld->ConfigureCalibration(calname, cnt, (1 << trig) | use_temp); + //hld->ConfigureCalibration(calname, 100000, 1); // only accept trigger type 0x1 when storing file // new hadaq::HldFilter(0x1); @@ -99,14 +99,14 @@ extern "C" void after_create(hadaq::HldProcessor* hld) tdc->SetUseLastHit(false); //tdc->SetStoreEnabled(); - //for (unsigned nch=1; nchNumChannels(); nch++) { - // tdc->SetRefChannel(nch, nch-1, 0xffff, 10000, -90., 90.); - //} - - for (unsigned j=10; j<33; j++) { - tdc->SetRefChannel(j, 1, 0xffff, 10000, -40., 40.); + for (unsigned nch=1; nchNumChannels(); nch++) { + tdc->SetRefChannel(nch, nch-1, 0xffff, 10000, -90., 90.); } + // for (unsigned j=10; j<33; j++) { + // tdc->SetRefChannel(j, 1, 0xffff, 10000, -40., 40.); + //} + tdc->SetRefChannel(6, 0, 0xffff, 10000, -100.,100.); //tdc->SetRefChannel(0, 0, 0x1202, 10000, -20., 20.); //tdc->SetRefChannel(4, 2, 0xffff, 10000, -20., 20.); diff --git a/users/gsi_ee_trb84/startup.sh b/users/gsi_ee_trb84/startup.sh index d74725b..1154d13 100755 --- a/users/gsi_ee_trb84/startup.sh +++ b/users/gsi_ee_trb84/startup.sh @@ -108,10 +108,11 @@ trbcmd w 0xfe51 0xdf80 0xffffffff # enable monitor counters trbcmd w 0x1133 0xc804 0x7c # max number of words trbcmd clearbit 0x1133 0xc801 0x80000000 # disable window -trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser + +#trbcmd w 0x1133 0xc802 0x00000c03 # enable pulser #trbcmd setbit 0xc001 0xa101 0x8 # enable external trigger in of CTS echo "pulser enable" # pulser enable -#trbcmd setbit 0xc001 0xa101 0x1 +trbcmd setbit 0xc001 0xa101 0x2 diff --git a/web/cts_gui b/web/cts_gui index 35bc4e0..4d31716 100755 --- a/web/cts_gui +++ b/web/cts_gui @@ -4,6 +4,8 @@ use warnings; use Data::Dumper; use Getopt::Long; +use lib "./"; + # This method will execute the cts-command in monitoring mode. # If it failes, it is automatically respawned. The only way to # exit this function is by user interaction, e.g. by pressing diff --git a/web/httpi b/web/httpi index fe55653..236e191 100755 --- a/web/httpi +++ b/web/httpi @@ -2,6 +2,7 @@ use POSIX qw(SIGALRM SIGTERM sigaction); use lib "./include"; +use lib "./"; use Digest::SHA::PurePerl qw(sha1_base64); -- 2.43.0