- Added bridge functions to histmemsec to make it look more like histmem

- Modifed many modules using histmem to work also with histmemsec
- Extended tasker with task names and task groups
- There is a new taskobj which allows to list tasks and to interact with them.
- Task now supports running Tcl functions as tasks
- There is a new experimental sctcomtask module which allows to define communication
  tasks against a scriptcontext. This is a new feature which should facilitate
  writing sequential scripts using asynchronous communication.
- A fix to make spss7 work when there are no switches
- ORION support for single X. TRICS measures crystals hanging down, ORION
  standing up


SKIPPED:
	psi/ease.c
	psi/faverage.c
	psi/jvlprot.c
	psi/make_gen
	psi/pardef.c
	psi/polterwrite.c
	psi/psi.c
	psi/sinq.c
	psi/spss7.c
This commit is contained in:
koennecke
2012-12-20 11:32:33 +00:00
parent 4f560552c4
commit 86e246416b
57 changed files with 2025 additions and 290 deletions

View File

@ -70,6 +70,7 @@
#include "event.h"
#include "status.h"
#include "site.h"
#include "histmemsec.h"
#define ABS(x) (x < 0 ? -(x) : (x))
/*
@ -84,6 +85,27 @@ extern pHistDriver CreateRegressHM(pStringDict pOpt);
*/
extern pHistDriver MakeHMSlaveHM(pStringDict pOpt);
/*------------------------------------------------------------------------*/
int isSecondGen(pHistMem self)
{
pDummy test = (pDummy)self;
if(strcmp(test->pDescriptor->name,"HistMemSec") == 0) {
return 1;
} else {
return 0;
}
}
/*-----------------------------------------------------------------------*/
pHistMem FindHM(SicsInterp *pSics, char *name)
{
pHistMem result = NULL;
result = (pHistMem)FindCommandData(pSics,name,"HistMem");
if(result == NULL){
result = (pHistMem)FindCommandData(pSics,name,"HistMemSec");
}
return result;
}
/*------------------------------------------------------------------------*/
static int HistHalt(void *pData)
{
pHistMem self = NULL;
@ -715,6 +737,12 @@ long GetHistMonitor(pHistMem self, int i, SConnection * pCon)
void HistDirty(pHistMem self)
{
assert(self);
if(isSecondGen(self)){
SecHistDirty(self);
return;
}
if(self->pDriv != NULL){
updateHMData(self->pDriv->data);
}
@ -724,6 +752,11 @@ void HistDirty(pHistMem self)
const float *GetHistTimeBin(pHistMem self, int *iLength)
{
assert(self);
if(isSecondGen(self)){
return GetSecHistTimeBin(self,iLength);
}
*iLength = getNoOfTimebins(self->pDriv->data);
return getTimeBinning(self->pDriv->data);
}
@ -733,6 +766,10 @@ int GetHistLength(pHistMem self)
{
assert(self);
if(isSecondGen(self)){
return GetSecHistLength(self);
}
return getHMDataLength(self->pDriv->data);
}
@ -827,6 +864,11 @@ int GetHistogram(pHistMem self, SConnection * pCon,
{
assert(self);
if(isSecondGen(self)){
return GetSecHistogram(self,pCon,i,iStart,iEnd,lData,iDataLen);
}
if (!self->iInit) {
SCWrite(pCon, "ERROR: histogram memory not initialised", eError);
return 0;
@ -883,6 +925,11 @@ HistInt *GetHistogramPointer(pHistMem self, SConnection * pCon)
{
assert(self);
if(isSecondGen(self)){
return GetSecHistogramPointer(self,pCon);
}
if (!self->iInit) {
SCWrite(pCon, "ERROR: histogram memory not initialised", eError);
return NULL;