- Small fixes to histogram memory software
- Added simulation directories and instruments
This commit is contained in:
@@ -14,7 +14,7 @@ FF = f90
|
||||
CC = cc
|
||||
CFLAGS = -std -g -I. -I../hardsup -I$(PGPLOT_DIR) -I/data/koenneck/include
|
||||
BIN = ../bin
|
||||
LFLAGS = -L../hardsup -L$PGPLOT_DIR
|
||||
LFLAGS = -L../hardsup -L$PGPLOT_DIR -L/data/lnslib/lib
|
||||
#------------ for Linux
|
||||
## FF = g77
|
||||
## CC = gcc
|
||||
|
||||
@@ -841,13 +841,13 @@
|
||||
yPos = (yPos - 2048)/psdYFactor;
|
||||
|
||||
|
||||
if(xPos < 0 || xPos > psdXSize)
|
||||
if(xPos < 0 || xPos >= psdXSize)
|
||||
{
|
||||
printf("X position out of range: %d, alllowed 0 - %d\n",
|
||||
xPos, psdXSize);
|
||||
continue;
|
||||
}
|
||||
if(yPos < 0 || yPos > psdYSize)
|
||||
if(yPos < 0 || yPos >= psdYSize)
|
||||
{
|
||||
printf("Y position out of range: %d, alllowed 0 - %d\n",
|
||||
yPos, psdYSize);
|
||||
@@ -893,6 +893,11 @@
|
||||
printf("Matched time stamp %d into bin %d\n", iTime,middl);
|
||||
}
|
||||
|
||||
if(middl >= Tof_edges[0]->n_bins){
|
||||
middl = Tof_edges[0]->n_bins-1;
|
||||
printf("WARNING: Fixed bad time bin!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
calculate histogram position to update
|
||||
*/
|
||||
@@ -959,12 +964,10 @@
|
||||
counting at 1, and ANSI-C at 0
|
||||
*/
|
||||
edNum = edData.ui2[1] - 1;
|
||||
/*
|
||||
if(edNum < 0 || edNum >= MAX_PSD_ED){
|
||||
printf("Got invalid detector number %d\n",edNum);
|
||||
printf("Got invalid single detector number %d\n",edNum);
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
Extract time stamp and match to the appropriate time bin.
|
||||
@@ -1005,6 +1008,11 @@
|
||||
printf("Matched time stamp %d into bin %d\n", iTime,middl);
|
||||
}
|
||||
|
||||
if(middl >= Tof_edges[0]->n_bins){
|
||||
middl = Tof_edges[0]->n_bins-1;
|
||||
printf("WARNING: Fixed bad time bin for single detector!\n");
|
||||
}
|
||||
|
||||
/*
|
||||
calculate histogram position to update
|
||||
*/
|
||||
|
||||
@@ -151,7 +151,7 @@
|
||||
|
||||
Dbg_mask = 0;
|
||||
Dbg_lev0 = 0;
|
||||
Dbg_lev1 = 1;
|
||||
Dbg_lev1 = 0;
|
||||
Dbg_lev2 = 0;
|
||||
Dbg_lev3 = 0;
|
||||
Cfgn_done = 0; /* Force a configuration before we can do anything. */
|
||||
@@ -272,10 +272,22 @@
|
||||
printf ("%s: Instrument = \"%s\"\n", Tsk_name[0], "HRPT");
|
||||
Lwl_hdr_daq_mask = LWL_HDR_SYNC0_MASK | LWL_HDR_SYNC2_MASK;
|
||||
Lwl_hdr_daq_soll = LWL_HDR_SYNC2_MASK;
|
||||
}else if (strcmp (INST, "TRICS") == 0 || strcmp(INST,"AMOR") == 0) {
|
||||
}else if (strcmp (INST, "TRICS") == 0) {
|
||||
printf ("%s: Instrument = \"%s\"\n", Tsk_name[0], "TriCS");
|
||||
/*
|
||||
Lwl_hdr_daq_mask = LWL_HDR_NRL_MASK | LWL_PSD_PWF;
|
||||
Lwl_hdr_daq_soll = 0;
|
||||
*/
|
||||
Lwl_hdr_daq_mask = 0x00f00000;
|
||||
Lwl_hdr_daq_soll = 0x00e00000;
|
||||
}else if (strcmp(INST,"AMOR") == 0) {
|
||||
printf ("%s: Instrument = \"%s\"\n", Tsk_name[0], "TriCS");
|
||||
/*
|
||||
Lwl_hdr_daq_mask = LWL_HDR_NRL_MASK | LWL_PSD_PWF;
|
||||
Lwl_hdr_daq_soll = 0;
|
||||
*/
|
||||
Lwl_hdr_daq_mask = 0x00f00000;
|
||||
Lwl_hdr_daq_soll = 0x00600000;
|
||||
}else if (strcmp (INST, "POLDI") == 0) {
|
||||
printf ("%s: Instrument = \"%s\"\n", Tsk_name[0], "POLDI");
|
||||
Lwl_hdr_daq_mask = LWL_HDR_NRL_MASK;
|
||||
|
||||
@@ -1721,7 +1721,7 @@
|
||||
rply_status_setup_and_send (skt, reply, KER__BAD_CREATE, is, /* No */
|
||||
"Filler creation failed");
|
||||
printf ("\n%s -- creation of FILLER failed: %d.\n",
|
||||
Tsk_name[index], status);
|
||||
Tsk_name[index], is);
|
||||
free_HM_memory (NULL);
|
||||
Cfgn_done = 0;
|
||||
return ERROR;
|
||||
@@ -3447,7 +3447,7 @@
|
||||
return -1; /* Yes. */
|
||||
}else { /* No */
|
||||
Filler_pid = created_pid;
|
||||
tmo = 1000; /* Normally give FILLER 1000 ticks to ..
|
||||
tmo = 10000; /* Normally give FILLER 1000 ticks to ..
|
||||
** .. get going */
|
||||
if (suspendMode != 0) {
|
||||
tmo = WAIT_FOREVER; /* But in debug mode, wait forever! */
|
||||
|
||||
Reference in New Issue
Block a user