- Removed slit 5 from amorset.c

- poldizug now sends all codes all the time
- polterwrite writes the filename again
- sanswave has been modifed to support the new second generation velocity
  selector
- sinqhttprot has been mdified to copy data to nodes, this for the second
  generation HM object
- tasscan suppressed some output
This commit is contained in:
koennecke
2009-05-15 13:24:02 +00:00
parent 5d30c7b5b9
commit caf59ef8eb
12 changed files with 225 additions and 87 deletions

View File

@ -23,6 +23,10 @@
Support for new HTTP HM added
Mark Koennecke, July 2006
Lightly ammended for the new second generation HM module.
Mark koennecke, May 2009
--------------------------------------------------------------------------*/
#include <stdlib.h>
#include <assert.h>
@ -41,6 +45,7 @@
#include "lld.h"
#include "amorstat.i"
#include "amorstat.h"
#include "sicshipadaba.h"
/*-------------------------------------------------------------------
Manually from SinqHM_def.h
--------------------------------------------------------------------*/
@ -60,7 +65,8 @@ static int HMCountStartCallback(int iEvent, void *pEvent, void *pUser)
const float *fTime = NULL;
int *iTime = NULL;
int iLength, iRet, i;
pHdb tbin = NULL;
/* check kill condition */
if (pCon == NULL || !SCisConnected(pCon)) {
return -1;
@ -69,14 +75,28 @@ static int HMCountStartCallback(int iEvent, void *pEvent, void *pUser)
if (iEvent == COUNTSTART) {
/* send current time binning */
iTOF = 1;
fTime = GetHistTimeBin(pHMHM, &iLength);
iTime = (int *) malloc((iLength + 1) * sizeof(int));
if ((!fTime) || (!iTime)) {
return 0;
}
iTime[0] = htonl(iLength);
for (i = 0; i < iLength; i++) {
iTime[i + 1] = htonl((int) ((fTime[i] / 10.) * 65536.));
if(pHMHM->pDes->parNode != NULL){
tbin = GetHipadabaNode(pHMHM->pDes->parNode,"time_binning");
assert(tbin != NULL);
iLength = tbin->value.arrayLength;
iTime = (int *) malloc((iLength + 1) * sizeof(int));
if ((!iTime)) {
return 0;
}
iTime[0] = htonl(iLength);
for (i = 0; i < iLength; i++) {
iTime[i + 1] = htonl( (int) ( (tbin->value.v.floatArray[i]) / 10.) * 65536.) ;
}
} else {
fTime = GetHistTimeBin(pHMHM, &iLength);
iTime = (int *) malloc((iLength + 1) * sizeof(int));
if ((!fTime) || (!iTime)) {
return 0;
}
iTime[0] = htonl(iLength);
for (i = 0; i < iLength; i++) {
iTime[i + 1] = htonl((int) ((fTime[i] / 10.) * 65536.));
}
}
/* send new time binning to all clients */
SCWrite(pCon, "TOFClear", eError);
@ -681,7 +701,7 @@ static int projectYTOF(pAmorStat self, SConnection * pCon)
/*-----------------------------------------------------------------
SendSingleTOF sends single detector data for TOF mode
*/
--------------------------------------------------------------------*/
static int SendSingleTOF(pAmorStat self, SConnection * pCon)
{
@ -753,7 +773,7 @@ static int SendSingleTOF(pAmorStat self, SConnection * pCon)
/*-------------------------------------------------------------------
SubSample sums histogram data in the area defined by the rectangle
x1,y1 x2, y2. Summing is along the time axis.
*/
----------------------------------------------------------------------*/
static int SubSample(pAmorStat self, SConnection * pCon,
char *name, int x1, int x2, int y1, int y2)
{