- Added support for accessing the exe file management functions from scripts
- Fixed a bug in hmdata.c - Fixed an issue with tempoerature writing through RemObjects in mesure - Added auxiliary reflections to tasub - Make maximize use soft motor positions
This commit is contained in:
22
hmdata.c
22
hmdata.c
@ -358,7 +358,7 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
int iStart[MAXDIM], int iEnd[MAXDIM]) {
|
||||
HistInt *iData;
|
||||
pHMdata self = hist->pDriv->data;
|
||||
int i, iHistLength, status, iIndex;
|
||||
int i, iHistLength, status, iIndex, myrank;
|
||||
char pBueffel[256];
|
||||
unsigned long lSum, lRowSum;
|
||||
|
||||
@ -367,7 +367,12 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
/*
|
||||
error checking
|
||||
*/
|
||||
for(i = 0; i < self->rank; i++){
|
||||
myrank = self->rank;
|
||||
if(isInTOFMode(self)){
|
||||
self->iDim[self->rank] = getNoOfTimebins(self);
|
||||
myrank++;
|
||||
}
|
||||
for(i = 0; i < myrank; i++){
|
||||
if( (iStart[i] < 0) || (iStart[i] > self->iDim[i]) ) {
|
||||
sprintf(pBueffel,"ERROR: %d is out of data dimension range",
|
||||
iStart[i]);
|
||||
@ -398,13 +403,14 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
|
||||
iHistLength = getHMDataLength(self);
|
||||
/* actually sum */
|
||||
switch(self->rank)
|
||||
switch(myrank)
|
||||
{
|
||||
case 1:
|
||||
lSum = SumRow(self->localBuffer, iHistLength,
|
||||
iStart[0], iEnd[0]);
|
||||
break;
|
||||
case 2:
|
||||
/*
|
||||
lSum = 0;
|
||||
for(i = iStart[1]; i < iEnd[1]; i++){
|
||||
iIndex = i*self->iDim[0];
|
||||
@ -412,11 +418,19 @@ long sumHMDataRectangle(pHistMem hist, SConnection *pCon,
|
||||
iIndex+iStart[0], iIndex+iEnd[0]);
|
||||
lSum += lRowSum;
|
||||
}
|
||||
*/
|
||||
lSum = 0;
|
||||
for(i = iStart[0]; i < iEnd[0]; i++){
|
||||
iIndex = i*self->iDim[1];
|
||||
lRowSum = SumRow(self->localBuffer,iHistLength,
|
||||
iIndex+iStart[1], iIndex+iEnd[1]);
|
||||
lSum += lRowSum;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sprintf(pBueffel,
|
||||
"ERROR: summing in %d dimensions not yet implemented",
|
||||
self->rank);
|
||||
myrank);
|
||||
SCWrite(pCon,pBueffel,eError);
|
||||
return -1;
|
||||
break;
|
||||
|
Reference in New Issue
Block a user