diff --git a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp index 8aa341033..f229c588f 100644 --- a/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp +++ b/slsDetectorSoftware/multiSlsDetector/multiSlsDetector.cpp @@ -31,7 +31,7 @@ char ans[MAX_STR_LENGTH]; int multiSlsDetector::freeSharedMemory() { // Detach Memory address - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) detectors[id]->freeSharedMemory(); } @@ -103,11 +103,11 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) while (shmId<0) { shmId=initSharedMemory(id); - id++; + ++id; } - id--; + --id; - for (int id=0; idalreadyExisting==0) { @@ -116,7 +116,7 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) thisMultiDetector->onlineFlag = ONLINE_FLAG; thisMultiDetector->receiverOnlineFlag = OFFLINE_FLAG; thisMultiDetector->numberOfDetectors=0; - for (int id=0; iddetectorIds[id]=-1; thisMultiDetector->offsetX[id]=0; thisMultiDetector->offsetY[id]=0; @@ -190,14 +190,14 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) thisMultiDetector->actionMask=0; - for (int ia=0; iaactionMode[ia]=0; strcpy(thisMultiDetector->actionScript[ia],"none"); strcpy(thisMultiDetector->actionParameter[ia],"none"); } - for (int iscan=0; iscanscanMode[iscan]=0; strcpy(thisMultiDetector->scanScript[iscan],"none"); @@ -253,7 +253,7 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) fileFormatType=&thisMultiDetector->fileFormatType; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { #ifdef VERBOSE cout << thisMultiDetector->detectorIds[i] << endl; #endif @@ -263,7 +263,7 @@ multiSlsDetector::multiSlsDetector(int id) : slsDetectorUtils(), shmId(-1) // setAngularConversionPointer(detectors[i]->getAngularConversionPointer(),detectors[i]->getNModsPointer(),detectors[i]->getNChans()*detectors[i]->getNChips(), i); } - // for (int i=thisMultiDetector->numberOfDetectors; inumberOfDetectors; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { //check that it is not already in the list, in that case move to new position if (detectors[i]) { if (detectors[i]->getDetectorId()==id) { @@ -368,7 +368,7 @@ int multiSlsDetector::addSlsDetector(int id, int pos) { if (pos!=thisMultiDetector->numberOfDetectors) { - for (int ip=thisMultiDetector->numberOfDetectors-1; ip>=pos; ip--) { + for (int ip=thisMultiDetector->numberOfDetectors-1; ip>=pos; --ip) { #ifdef VERBOSE cout << "Moving detector " << thisMultiDetector->detectorIds[ip] << " from position " << ip << " to " << ip+1 << endl; #endif @@ -382,7 +382,7 @@ int multiSlsDetector::addSlsDetector(int id, int pos) { detectors[pos]=new slsDetector(pos, id, this); thisMultiDetector->detectorIds[pos]=detectors[pos]->getDetectorId(); - thisMultiDetector->numberOfDetectors++; + ++thisMultiDetector->numberOfDetectors; thisMultiDetector->dataBytes+=detectors[pos]->getDataBytes(); @@ -401,7 +401,7 @@ int multiSlsDetector::addSlsDetector(int id, int pos) { #ifdef VERBOSE cout << "Detector added " << thisMultiDetector->numberOfDetectors<< endl; - for (int ip=0; ipnumberOfDetectors; ip++) { + for (int ip=0; ipnumberOfDetectors; ++ip) { cout << "Detector " << thisMultiDetector->detectorIds[ip] << " position " << ip << " " << detectors[ip]->getHostname() << endl; } #endif @@ -434,7 +434,7 @@ void multiSlsDetector::updateOffsets(){//cannot paralllize due to slsdetector ca thisMultiDetector->maxNumberOfChannel[Y] = 0; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { #ifdef VERBOSE cout<<"offsetX:"<getHostname(); } else { - for (int ip=0; ipnumberOfDetectors; ip++) { + for (int ip=0; ipnumberOfDetectors; ++ip) { #ifdef VERBOSE cout << "detector " << ip << endl; #endif @@ -627,7 +627,7 @@ string multiSlsDetector::sgetDetectorsType(int pos) { if (detectors[pos]) return detectors[pos]->sgetDetectorsType(); } else { - for (int ip=0; ipnumberOfDetectors; ip++) { + for (int ip=0; ipnumberOfDetectors; ++ip) { #ifdef VERBOSE cout << "detector " << ip << endl; #endif @@ -688,7 +688,7 @@ int multiSlsDetector::addSlsDetector(const char *name, int pos) { if (t==GENERIC) { - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { if (detectors[i]->getHostname()==string(name)) { cout << "Detector " << name << "already part of the multiDetector in position " << i << "!" << endl<< "Remove it before adding it back in a new position!"<< endl; @@ -699,7 +699,7 @@ int multiSlsDetector::addSlsDetector(const char *name, int pos) { //checking that the detector doesn't already exists - for (id=0; id0) { #ifdef VERBOSE cout << "Detector " << id << " already exists" << endl; @@ -709,7 +709,7 @@ int multiSlsDetector::addSlsDetector(const char *name, int pos) { break; delete s; s=NULL; - //id++; + //++id; } } @@ -736,7 +736,7 @@ int multiSlsDetector::addSlsDetector(const char *name, int pos) { if (s==NULL) { - for (id=0; idnumberOfDetectors; ++i) { if (thisMultiDetector->offsetX[i] > offsetx) { - nx++; + ++nx; offsetx = thisMultiDetector->offsetX[i]; } if (thisMultiDetector->offsetY[i] > offsety) { - ny++; + ++ny; offsety = thisMultiDetector->offsetY[i]; } } @@ -843,7 +843,7 @@ int multiSlsDetector::setDetectorOffset(int pos, int ox, int oy) { int multiSlsDetector::removeSlsDetector(char *name){ - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { if (detectors[id]->getHostname()==string(name)) { removeSlsDetector(id); @@ -878,7 +878,7 @@ int multiSlsDetector::removeSlsDetector(int pos) { return thisMultiDetector->numberOfDetectors; //j=pos; - for (j=mi; jnumberOfDetectors--; + --thisMultiDetector->numberOfDetectors; if (single) { - for (int i=j+1; inumberOfDetectors+1; i++) { + for (int i=j+1; inumberOfDetectors+1; ++i) { detectors[i-1]=detectors[i]; thisMultiDetector->detectorIds[i-1]=thisMultiDetector->detectorIds[i]; } @@ -933,7 +933,7 @@ int multiSlsDetector::setMaster(int i) { if(detectors[i]->getErrorMask()) setErrorMask(getErrorMask()|(1<numberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (i!=id) { if (detectors[id]) { #ifdef VERBOSE @@ -948,7 +948,7 @@ int multiSlsDetector::setMaster(int i) { } } else if (i==-2) { - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { #ifdef VERBOSE cout << "detector position " << id << " "; @@ -964,7 +964,7 @@ int multiSlsDetector::setMaster(int i) { // check return value - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { #ifdef VERBOSE cout << "detector position " << id << " "; @@ -1021,7 +1021,7 @@ slsDetectorDefs::synchronizationMode multiSlsDetector::setSynchronization(synchr synchronizationMode ret=GET_SYNCHRONIZATION_MODE, ret1=GET_SYNCHRONIZATION_MODE; - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { ret1=detectors[id]->setSynchronization(sync); if(detectors[id]->getErrorMask()) @@ -1079,7 +1079,7 @@ int multiSlsDetector::setOnline(int off) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func1_t(&slsDetector::setOnline, @@ -1089,7 +1089,7 @@ int multiSlsDetector::setOnline(int off) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -1113,7 +1113,7 @@ int multiSlsDetector::setOnline(int off) { string multiSlsDetector::checkOnline() { string retval1 = "",retval; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { retval=detectors[idet]->checkOnline(); if(!retval.empty()){ @@ -1131,7 +1131,7 @@ int multiSlsDetector::activate(int const enable){ int i; int64_t ret1=-100, ret; - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->activate(enable); if(detectors[i]->getErrorMask()) @@ -1175,7 +1175,7 @@ int multiSlsDetector::getThresholdEnergy(int pos) { posmax=pos+1; } - for (i=posmin; igetThresholdEnergy(); if(detectors[i]->getErrorMask()) @@ -1213,7 +1213,7 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise }else{ //return storage values int* iret[posmax-posmin]; - for(int idet=posmin; idet(&slsDetector::setThresholdEnergy, @@ -1223,7 +1223,7 @@ int multiSlsDetector::setThresholdEnergy(int e_eV, int pos, detectorSettings ise } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idet(&slsDetector::getSettings, @@ -1274,7 +1274,7 @@ slsDetectorDefs::detectorSettings multiSlsDetector::getSettings(int pos) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idet(&slsDetector::setSettings, @@ -1322,7 +1322,7 @@ slsDetectorDefs::detectorSettings multiSlsDetector::setSettings(detectorSettings } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetnumberOfChannels,nChansDet,currentNumChans=0; double retval1[n]; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { // cout << "det " << idet << endl; nChansDet = detectors[idet]->getChanRegs(retval1,fromDetector); @@ -1397,7 +1397,7 @@ int multiSlsDetector::prepareAcquisition(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::prepareAcquisition, @@ -1407,7 +1407,7 @@ int multiSlsDetector::prepareAcquisition(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -1460,7 +1460,7 @@ int multiSlsDetector::cleanupAcquisition(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::cleanupAcquisition, @@ -1470,7 +1470,7 @@ int multiSlsDetector::cleanupAcquisition(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -1506,7 +1506,7 @@ int multiSlsDetector::startAcquisition(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::startAcquisition, @@ -1516,7 +1516,7 @@ int multiSlsDetector::startAcquisition(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -1568,7 +1568,7 @@ int multiSlsDetector::stopAcquisition(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::stopAcquisition, @@ -1578,7 +1578,7 @@ int multiSlsDetector::stopAcquisition(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -1613,7 +1613,7 @@ int multiSlsDetector::startReadOut(){ ret1=FAIL; } } - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->startReadOut(); if(detectors[i]->getErrorMask()) @@ -1648,7 +1648,7 @@ int* multiSlsDetector::getDataFromDetector() { p=retval; // cout << "multi: " << thisMultiDetector->dataBytes << endl; - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { retdet=detectors[id]->getDataFromDetector(p); if(detectors[id]->getErrorMask()) @@ -1676,7 +1676,7 @@ int* multiSlsDetector::getDataFromDetector() { } if (nodatadet>=0) { - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (id!=nodatadet) { if (detectors[id]) { //#ifdef VERBOSE @@ -1718,7 +1718,7 @@ int* multiSlsDetector::readFrame(){ /** probably it's always better to have one integer per channel in any case! */ - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { retdet=detectors[id]->readFrame(); if(detectors[id]->getErrorMask()) @@ -1760,7 +1760,7 @@ int* multiSlsDetector::readAll(){ #endif if (thisMultiDetector->onlineFlag==ONLINE_FLAG) { - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { detectors[id]->readAllNoWait(); if(detectors[id]->getErrorMask()) @@ -1768,7 +1768,7 @@ int* multiSlsDetector::readAll(){ } } while ((retval=getDataFromDetector())){ - i++; + ++i; #ifdef VERBOSE std::cout<< i << std::endl; //#else @@ -1776,7 +1776,7 @@ int* multiSlsDetector::readAll(){ #endif dataQueue.push(retval); } - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { detectors[id]->disconnectControl(); } @@ -1812,7 +1812,7 @@ int* multiSlsDetector::startAndReadAll(){ startAndReadAllNoWait(); while ((retval=getDataFromDetector())){ - i++; + ++i; #ifdef VERBOSE std::cout<< i << std::endl; //#else @@ -1821,7 +1821,7 @@ int* multiSlsDetector::startAndReadAll(){ dataQueue.push(retval); } - for (int id=0; idnumberOfDetectors; id++) { + for (int id=0; idnumberOfDetectors; ++id) { if (detectors[id]) { detectors[id]->disconnectControl(); } @@ -1851,7 +1851,7 @@ int multiSlsDetector::startAndReadAllNoWait(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::startAndReadAllNoWait, @@ -1861,7 +1861,7 @@ int multiSlsDetector::startAndReadAllNoWait(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -1907,7 +1907,7 @@ slsDetectorDefs::runStatus multiSlsDetector::getRunStatus() { return s; } - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { s1=detectors[i]->getRunStatus(); if(detectors[i]->getErrorMask()) setErrorMask(getErrorMask()|(1<numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int64_t(-1); Task* task = new Task(new func2_t(&slsDetector::setTimer, @@ -1995,7 +1995,7 @@ int64_t multiSlsDetector::setTimer(timerIndex index, int64_t t){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -2033,7 +2033,7 @@ int64_t multiSlsDetector::getTimeLeft(timerIndex index){ return ret1; } - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->getTimeLeft(index); if(detectors[i]->getErrorMask()) @@ -2057,7 +2057,7 @@ int multiSlsDetector::setSpeed(speedVariable index, int value){ - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->setSpeed(index,value); if(detectors[i]->getErrorMask()) @@ -2087,7 +2087,7 @@ int multiSlsDetector::setSpeed(speedVariable index, int value){ int multiSlsDetector::getDataBytes(){ int ret=0; - for (int ip=0; ipnumberOfDetectors; ip++) { + for (int ip=0; ipnumberOfDetectors; ++ip) { if (detectors[ip]) ret+=detectors[ip]->getDataBytes(); } @@ -2114,7 +2114,7 @@ int multiSlsDetector::setDynamicRange(int n, int pos){ ima=pos+1; } - for (i=imi; inumberOfDetectors;i++){ + for(int i=0;inumberOfDetectors;++i){ if (detectors[i]) { //check x offset range if ((offsetX >= thisMultiDetector->offsetX[i]) && (offsetX < (thisMultiDetector->offsetX[i]+detectors[i]->getMaxNumberOfChannels(X)))){ @@ -2200,7 +2200,7 @@ int multiSlsDetector::setROI(int n,ROI roiLimits[]){ int ndet = thisMultiDetector->numberOfDetectors; ROI allroi[ndet][n]; int nroi[ndet]; - for(i=0;inumberOfDetectors;i++){ + for(i=0;inumberOfDetectors;++i){ cout<<"detector "<numberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]){ #ifdef VERBOSE cout << "detector " << i << ":" << endl; @@ -2336,7 +2336,7 @@ slsDetectorDefs::ROI* multiSlsDetector::getROI(int &n){ int index=0; //get each detector's roi array - for (i=0; inumberOfDetectors; i++){ + for (i=0; inumberOfDetectors; ++i){ if (detectors[i]){ temp = detectors[i]->getROI(index); if(detectors[i]->getErrorMask()) @@ -2347,7 +2347,7 @@ slsDetectorDefs::ROI* multiSlsDetector::getROI(int &n){ if(index) cout << "detector " << i << ":" << endl; //#endif - for(j=0;joffsetX[i]; roiLimits[n].ymin = temp[j].ymin + thisMultiDetector->offsetY[i]; roiLimits[n].ymax = temp[j].ymin + thisMultiDetector->offsetY[i]; - n++; + ++n; } } } @@ -2370,7 +2370,7 @@ slsDetectorDefs::ROI* multiSlsDetector::getROI(int &n){ #ifdef VERBOSE cout<<"ROI :"<numberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { detectors[i]->decodeData(datap, n, detp); if(detectors[i]->getErrorMask()) @@ -2513,9 +2513,9 @@ double* multiSlsDetector::decodeData(int *datain, int &nn, double *fdata) { #ifdef VERBOSE cout << "done " << endl; #endif - // for (int j=0; jgetTotalNumberOfChannels(); j++) { + // for (int j=0; jgetTotalNumberOfChannels(); ++j) { // dataout[ich]=detp[j]; - // ich++; + // ++ich; // } //delete [] detp; } @@ -2581,7 +2581,7 @@ int multiSlsDetector::setFlatFieldCorrection(string fname){ #endif thisMultiDetector->correctionMask&=~(1<flatFieldFile,"none"); - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]){ detectors[i]->setFlatFieldCorrection(NULL, NULL); if(detectors[i]->getErrorMask()) @@ -2604,7 +2604,7 @@ int multiSlsDetector::setFlatFieldCorrection(string fname){ int nm=getNMods(); int chpm[nm]; int mMask[nm]; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { - for (int im=0; imgetNMods(); im++) { + for (int im=0; imgetNMods(); ++im) { mM[imod]=im+off; - imod++; + ++imod; } off+=detectors[i]->getMaxMods(); } @@ -2653,7 +2653,7 @@ int multiSlsDetector::fillModuleMask(int *mM) { int multiSlsDetector::setFlatFieldCorrection(double *corr, double *ecorr) { int ichdet=0; double *p, *ep; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { if (corr!=NULL) p=corr+ichdet; @@ -2684,7 +2684,7 @@ int multiSlsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { int ichdet=0; double *p, *ep; int ff=1, dff; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { if (corr!=NULL) p=corr+ichdet; @@ -2721,7 +2721,7 @@ int multiSlsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { int multiSlsDetector::getNMods(){ int nm=0; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { nm+=detectors[idet]->getNMods(); } @@ -2736,7 +2736,7 @@ int multiSlsDetector::getNMods(){ int multiSlsDetector::getNMod(dimension d){ int nm=0; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { nm+=detectors[idet]->getNMod(d); } @@ -2800,7 +2800,7 @@ int multiSlsDetector::flatFieldCorrect(double* datain, double *errin, double* da int ichdet=0; double *perr=errin;//*pdata, - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { #ifdef VERBOSE cout << " detector " << idet << " offset " << ichdet << endl; @@ -2831,7 +2831,7 @@ int multiSlsDetector::setRateCorrection(double t){ if (getDetectorsType() == EIGER){ int ret = OK, ret1= OK; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret=detectors[idet]->setRateCorrection(t); if(detectors[idet]->getErrorMask()) @@ -2851,7 +2851,7 @@ int multiSlsDetector::setRateCorrection(double t){ thisMultiDetector->correctionMask|=(1<numberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret=detectors[idet]->setRateCorrection(t); if(detectors[idet]->getErrorMask()) @@ -2890,7 +2890,7 @@ int multiSlsDetector::getRateCorrection(double &t){ double multiSlsDetector::getRateCorrectionTau(){ double ret1=-100,ret; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret=detectors[idet]->getRateCorrectionTau(); if (ret1==-100) @@ -2943,7 +2943,7 @@ int multiSlsDetector::rateCorrect(double* datain, double *errin, double* dataout int ichdet=0; double *perr=errin; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { if (errin) perr+=ichdet; @@ -3004,7 +3004,7 @@ int multiSlsDetector::setBadChannelCorrection(int nbad, int *badlist, int ff) { if (nbad>0) { thisMultiDetector->correctionMask|=(1<=detectors[idet]->getMaxNumberOfChannels()) { //#ifdef VERBOSE @@ -3015,12 +3015,12 @@ int multiSlsDetector::setBadChannelCorrection(int nbad, int *badlist, int ff) { setErrorMask(getErrorMask()|(1<getMaxNumberOfChannels(); nbaddet=0; - idet++; + ++idet; if (detectors[idet]==NULL) break; } badlistdet[nbaddet]=(badlist[ich]-choff); - nbaddet++; + ++nbaddet; #ifdef VERBOSE cout << nbaddet << " " << badlist[ich] << " " << badlistdet[nbaddet-1] << endl; #endif @@ -3037,11 +3037,11 @@ int multiSlsDetector::setBadChannelCorrection(int nbad, int *badlist, int ff) { setErrorMask(getErrorMask()|(1<getMaxNumberOfChannels(); nbaddet=0; - idet++; + ++idet; } } nbaddet=0; - for (int i=idet; inumberOfDetectors; i++) { + for (int i=idet; inumberOfDetectors; ++i) { #ifdef VERBOSE cout << "setting " << 0 << " badchans to detector " << i << endl; #endif @@ -3054,7 +3054,7 @@ int multiSlsDetector::setBadChannelCorrection(int nbad, int *badlist, int ff) { } else { nbaddet=0; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[idet]) { #ifdef VERBOSE cout << "setting " << 0 << " badchans to detector " << idet << endl; @@ -3086,7 +3086,7 @@ int multiSlsDetector::readAngularConversionFile(string fname) { infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { #ifdef VERBOSE cout << " detector " << idet << endl; @@ -3114,7 +3114,7 @@ int multiSlsDetector::writeAngularConversion(string fname) { outfile.open(fname.c_str(), ios_base::out); if (outfile.is_open()) { - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { detectors[idet]->writeAngularConversion(outfile); if(detectors[idet]->getErrorMask()) @@ -3135,7 +3135,7 @@ int multiSlsDetector::getAngularConversion(int &direction, angleConversionCons int dir=-100, dir1; angleConversionConstant *a1=angconv; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { detectors[idet]->getAngularConversion(dir1,a1); if(detectors[idet]->getErrorMask()) @@ -3198,7 +3198,7 @@ dacs_t multiSlsDetector::setDAC(dacs_t val, dacIndex idac, int mV, int imod) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetstartExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetsetChannel(reg, ichan, ichip, im); if(detectors[idet]->getErrorMask()) @@ -3312,7 +3312,7 @@ int multiSlsDetector::setChannel(int64_t reg, int ichan, int ichip, int imod) { double multiSlsDetector::setAngularConversionParameter(angleConversionParameter c, double v) { double ret=slsDetectorUtils::setAngularConversionParameter(c,v); - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { @@ -3333,7 +3333,7 @@ double multiSlsDetector::setAngularConversionParameter(angleConversionParameter // double *p=ang; // int choff=0; -// for (int idet=0; idetnumberOfDetectors; idet++) { +// for (int idet=0; idetnumberOfDetectors; ++idet) { // if (detectors[idet]) { // #ifdef EPICS @@ -3365,7 +3365,7 @@ int multiSlsDetector::getBadChannelCorrection(int *bad) { //else // cout << "bad chans corr enabled "<< thisMultiDetector->correctionMask << endl; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { nd=detectors[idet]->getBadChannelCorrection(); // cout << "det " << idet << " nbad " << nd << endl; @@ -3375,10 +3375,10 @@ int multiSlsDetector::getBadChannelCorrection(int *bad) { if(detectors[idet]->getErrorMask()) setErrorMask(getErrorMask()|(1<getTotalNumberOfChannels()) { if (bad) bad[ntot]=choff+bd[id]; - ntot++; + ++ntot; } } choff+=detectors[idet]->getTotalNumberOfChannels(); @@ -3396,7 +3396,7 @@ int multiSlsDetector::getBadChannelCorrection(int *bad) { int multiSlsDetector::exitServer() { int ival=FAIL, iv; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { iv=detectors[idet]->exitServer(); if (iv==OK) @@ -3413,7 +3413,7 @@ char* multiSlsDetector::getSettingsDir() { //char ans[1000]; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getSettingsDir(); if(detectors[idet]->getErrorMask()) @@ -3442,7 +3442,7 @@ char* multiSlsDetector::getSettingsDir() { char* multiSlsDetector::setSettingsDir(string s){ if (s.find('+')==string::npos) { - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { detectors[idet]->setSettingsDir(s); if(detectors[idet]->getErrorMask()) @@ -3460,7 +3460,7 @@ char* multiSlsDetector::setSettingsDir(string s){ if(detectors[id]->getErrorMask()) setErrorMask(getErrorMask()|(1<=thisMultiDetector->numberOfDetectors) @@ -3480,7 +3480,7 @@ int multiSlsDetector::setTrimEn(int ne, int *ene) { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setTrimEn(ne,ene); if(detectors[idet]->getErrorMask()) @@ -3501,7 +3501,7 @@ int multiSlsDetector::getTrimEn(int *ene) { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->getTrimEn(ene); if(detectors[idet]->getErrorMask()) @@ -3531,7 +3531,7 @@ int multiSlsDetector::getTrimEn(int *ene) { char* multiSlsDetector::getCalDir() { string s0="", s1="", s; //char ans[1000]; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getCalDir(); if(detectors[idet]->getErrorMask()) @@ -3562,7 +3562,7 @@ char* multiSlsDetector::getCalDir() { char* multiSlsDetector::setCalDir(string s){ if (s.find('+')==string::npos) { - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { detectors[idet]->setCalDir(s); if(detectors[idet]->getErrorMask()) @@ -3580,7 +3580,7 @@ char* multiSlsDetector::setCalDir(string s){ if(detectors[id]->getErrorMask()) setErrorMask(getErrorMask()|(1<=thisMultiDetector->numberOfDetectors) @@ -3600,7 +3600,7 @@ string multiSlsDetector::getNetworkParameter(networkParameter p) { string s0="", s1="",s ; string ans=""; //char ans[1000]; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getNetworkParameter(p); if(detectors[idet]->getErrorMask()) @@ -3646,7 +3646,7 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){ return getNetworkParameter(p); }else{ string* sret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if (p == RECEIVER_STREAMING_PORT) s.append("multi\0"); @@ -3658,7 +3658,7 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(sret[idet]!= NULL) delete sret[idet]; @@ -3682,7 +3682,7 @@ string multiSlsDetector::setNetworkParameter(networkParameter p, string s){ if(detectors[id]->getErrorMask()) setErrorMask(getErrorMask()|(1<=thisMultiDetector->numberOfDetectors) @@ -3703,7 +3703,7 @@ int multiSlsDetector::setPort(portType t, int p) { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setPort(t,p); if(detectors[idet]->getErrorMask()) @@ -3722,7 +3722,7 @@ int multiSlsDetector::lockServer(int p) { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->lockServer(p); if(detectors[idet]->getErrorMask()) @@ -3741,7 +3741,7 @@ int multiSlsDetector::lockServer(int p) { string multiSlsDetector::getLastClientIP() { string s0="", s1="",s ; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getLastClientIP(); if(detectors[idet]->getErrorMask()) @@ -3772,7 +3772,7 @@ int multiSlsDetector::setReadOutFlags(readOutFlags flag) { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setReadOutFlags(flag); if(detectors[idet]->getErrorMask()) @@ -3800,7 +3800,7 @@ slsDetectorDefs::externalCommunicationMode multiSlsDetector::setExternalCommunic setErrorMask(getErrorMask()|(1<<0)); - for (int idet=1; idetnumberOfDetectors; idet++) { + for (int idet=1; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setExternalCommunicationMode(pol); if(detectors[idet]->getErrorMask()) @@ -3827,7 +3827,7 @@ slsDetectorDefs::externalSignalFlag multiSlsDetector::setExternalSignalFlags(ext if(detectors[0]->getErrorMask()) setErrorMask(getErrorMask()|(1<<0)); - for (int idet=1; idetnumberOfDetectors; idet++) { + for (int idet=1; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setExternalSignalFlags(pol,signalindex); if(detectors[idet]->getErrorMask()) @@ -3859,7 +3859,7 @@ const char * multiSlsDetector::getSettingsFile() { string s0="", s1="",s ; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getSettingsFile(); if(detectors[idet]->getErrorMask()) @@ -3887,7 +3887,7 @@ int multiSlsDetector::configureMAC() { int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->configureMAC(); if(detectors[idet]->getErrorMask()) @@ -3920,7 +3920,7 @@ int multiSlsDetector::loadImageToDetector(imageType index,string const fname){ std::cout<<"Gain"; std::cout<<" image from file " << fname << std::endl; #endif - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { if(detectors[idet]->readDataFile(infile,imageVals)>=0){ ret1=detectors[idet]->sendImageToDetector(index,imageVals); @@ -3954,7 +3954,7 @@ int multiSlsDetector::writeCounterBlockFile(string const fname,int startACQ){ std::cout<<"\" and Restarting Acquisition"; std::cout<numberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->getCounterBlock(arg,startACQ); if(ret1!=OK) @@ -3980,7 +3980,7 @@ int multiSlsDetector::writeCounterBlockFile(string const fname,int startACQ){ int multiSlsDetector::resetCounterBlock(int startACQ){ int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->resetCounterBlock(startACQ); if(detectors[idet]->getErrorMask()) @@ -3998,7 +3998,7 @@ int multiSlsDetector::resetCounterBlock(int startACQ){ int multiSlsDetector::setCounterBit(int i){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setCounterBit(i); if(detectors[idet]->getErrorMask()) @@ -4020,7 +4020,7 @@ int multiSlsDetector::setDynamicRange(int p) { thisMultiDetector->dataBytes=0; thisMultiDetector->numberOfChannels=0; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setDynamicRange(p); if(detectors[idet]->getErrorMask()) @@ -4055,7 +4055,7 @@ int multiSlsDetector::getMaxMods() { int ret=0, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->getMaxMods(); #ifdef VERBOSE @@ -4075,14 +4075,14 @@ int multiSlsDetector::getMaxMods() { - int multiSlsDetector::getTotalNumberOfChannels(){thisMultiDetector->numberOfChannels=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; id++) thisMultiDetector->numberOfChannels+=detectors[id]->getTotalNumberOfChannels(); return thisMultiDetector->numberOfChannels;}; + int multiSlsDetector::getTotalNumberOfChannels(){thisMultiDetector->numberOfChannels=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; ++id) thisMultiDetector->numberOfChannels+=detectors[id]->getTotalNumberOfChannels(); return thisMultiDetector->numberOfChannels;}; - //int multiSlsDetector::getTotalNumberOfChannels(dimension d){thisMultiDetector->numberOfChannel[d]=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; id++) thisMultiDetector->numberOfChannel[d]+=detectors[id]->getTotalNumberOfChannels(d); return thisMultiDetector->numberOfChannel[d];}; + //int multiSlsDetector::getTotalNumberOfChannels(dimension d){thisMultiDetector->numberOfChannel[d]=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; ++id) thisMultiDetector->numberOfChannel[d]+=detectors[id]->getTotalNumberOfChannels(d); return thisMultiDetector->numberOfChannel[d];}; int multiSlsDetector::getTotalNumberOfChannels(dimension d){return thisMultiDetector->numberOfChannel[d];}; - int multiSlsDetector::getMaxNumberOfChannels(){thisMultiDetector->maxNumberOfChannels=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; id++) thisMultiDetector->maxNumberOfChannels+=detectors[id]->getMaxNumberOfChannels();return thisMultiDetector->maxNumberOfChannels;}; + int multiSlsDetector::getMaxNumberOfChannels(){thisMultiDetector->maxNumberOfChannels=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; ++id) thisMultiDetector->maxNumberOfChannels+=detectors[id]->getMaxNumberOfChannels();return thisMultiDetector->maxNumberOfChannels;}; - // int multiSlsDetector::getMaxNumberOfChannels(dimension d){thisMultiDetector->maxNumberOfChannel[d]=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; id++) thisMultiDetector->maxNumberOfChannel[d]+=detectors[id]->getMaxNumberOfChannels(d);return thisMultiDetector->maxNumberOfChannel[d];}; + // int multiSlsDetector::getMaxNumberOfChannels(dimension d){thisMultiDetector->maxNumberOfChannel[d]=0; for (int id=0; id< thisMultiDetector->numberOfDetectors; ++id) thisMultiDetector->maxNumberOfChannel[d]+=detectors[id]->getMaxNumberOfChannels(d);return thisMultiDetector->maxNumberOfChannel[d];}; int multiSlsDetector::getMaxNumberOfChannels(dimension d){return thisMultiDetector->maxNumberOfChannel[d];}; @@ -4094,7 +4094,7 @@ int multiSlsDetector::getMaxMod(dimension d){ int ret=0, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->getNMaxMod(d); #ifdef VERBOSE @@ -4116,7 +4116,7 @@ int multiSlsDetector::getMaxNumberOfModules(dimension d) { int ret=0, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->getMaxNumberOfModules(d); ret+=ret1; @@ -4129,7 +4129,7 @@ int multiSlsDetector::getMaxNumberOfModules(dimension d) { int multiSlsDetector::getFlippedData(dimension d){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->getFlippedData(d); if(ret==-100) @@ -4148,7 +4148,7 @@ int multiSlsDetector::setNumberOfModules(int p, dimension d) { thisMultiDetector->dataBytes=0; thisMultiDetector->numberOfChannels=0; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { // cout << "detector " << idet << endl; if (detectors[idet]) { @@ -4183,7 +4183,7 @@ int multiSlsDetector::setNumberOfModules(int p, dimension d) { int multiSlsDetector::setFlippedData(dimension d, int value){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setFlippedData(d,value); if(ret==-100) @@ -4213,7 +4213,7 @@ int multiSlsDetector::decodeNMod(int i, int &id, int &im) { return -1; } int nm; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { nm=detectors[idet]->getNMods(); if (nm>i) { @@ -4304,7 +4304,7 @@ int multiSlsDetector::executeTrimming(trimMode mode, int par1, int par2, int imo } int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func4_t(&slsDetector::executeTrimming, @@ -4314,7 +4314,7 @@ int multiSlsDetector::executeTrimming(trimMode mode, int par1, int par2, int imo } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -4336,7 +4336,7 @@ int multiSlsDetector::executeTrimming(trimMode mode, int par1, int par2, int imo int multiSlsDetector::programFPGA(string fname){ int ret=OK, ret1=OK; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->programFPGA(fname); if(detectors[i]->getErrorMask()) @@ -4353,7 +4353,7 @@ int multiSlsDetector::programFPGA(string fname){ int multiSlsDetector::resetFPGA(){ int ret=OK, ret1=OK; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->resetFPGA(); if(detectors[i]->getErrorMask()) @@ -4370,7 +4370,7 @@ int multiSlsDetector::resetFPGA(){ int multiSlsDetector::powerChip(int ival){ int ret=OK, ret1=OK; - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->powerChip(ival); if(detectors[i]->getErrorMask()) @@ -4407,7 +4407,7 @@ int multiSlsDetector::loadSettingsFile(string fname, int imod) { } int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(OK); Task* task = new Task(new func2_t(&slsDetector::loadSettingsFile, @@ -4417,7 +4417,7 @@ int multiSlsDetector::loadSettingsFile(string fname, int imod) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -4445,7 +4445,7 @@ int multiSlsDetector::saveSettingsFile(string fname, int imod) { } return -1; } - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret=detectors[idet]->saveSettingsFile(fname, imod); if(detectors[idet]->getErrorMask()) @@ -4481,7 +4481,7 @@ int multiSlsDetector::setAllTrimbits(int val, int imod){ return -1; } int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func2_t(&slsDetector::setAllTrimbits, @@ -4491,7 +4491,7 @@ int multiSlsDetector::setAllTrimbits(int val, int imod){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -4535,7 +4535,7 @@ int multiSlsDetector::loadCalibrationFile(string fname, int imod) { } int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(OK); Task* task = new Task(new func2_t(&slsDetector::loadCalibrationFile, @@ -4545,7 +4545,7 @@ int multiSlsDetector::loadCalibrationFile(string fname, int imod) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -4573,7 +4573,7 @@ int multiSlsDetector::saveCalibrationFile(string fname, int imod) { } return -1; } - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret=detectors[idet]->saveCalibrationFile(fname, imod); if(detectors[idet]->getErrorMask()) @@ -4592,7 +4592,7 @@ int multiSlsDetector::writeRegister(int addr, int val){ int i;//imi, ima, int ret, ret1=-100; - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->writeRegister(addr,val); if(detectors[i]->getErrorMask()) @@ -4614,7 +4614,7 @@ int multiSlsDetector::writeAdcRegister(int addr, int val){ int i;//imi, ima, int ret, ret1=-100; - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->writeAdcRegister(addr,val); if(detectors[i]->getErrorMask()) @@ -4635,7 +4635,7 @@ int multiSlsDetector::readRegister(int addr){ int i;//imi, ima, int ret, ret1=-100; - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { ret=detectors[i]->readRegister(addr); if(detectors[i]->getErrorMask()) @@ -4659,7 +4659,7 @@ int multiSlsDetector::printReceiverConfiguration(){ std::cout << "Printing Receiver configurations for all detectors..." << std::endl; - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { std::cout << std::endl << "#Detector " << i << ":" << std::endl; @@ -4683,7 +4683,7 @@ int multiSlsDetector::readConfigurationFile(string const fname){ int nd=thisMultiDetector->numberOfDetectors; - for (int i=0; ifreeSharedMemory(); @@ -4718,7 +4718,7 @@ int multiSlsDetector::readConfigurationFile(string const fname){ sargname="none"; sargval="0"; getline(infile,str); - iline++; + ++iline; #ifdef VERBOSE std::cout<< str << std::endl; #endif @@ -4750,7 +4750,7 @@ int multiSlsDetector::readConfigurationFile(string const fname){ std::cout<< "--" << iargval << " " << args[iargval] << std::endl; #endif - iargval++; + ++iargval; //} } @@ -4762,7 +4762,7 @@ int multiSlsDetector::readConfigurationFile(string const fname){ cmd=new multiSlsDetectorClient(iargval, args, PUT_ACTION, this); delete cmd; } - iline++; + ++iline; } @@ -4827,7 +4827,7 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ int iv=0; char *args[100]; - for (int ia=0; ia<100; ia++) { + for (int ia=0; ia<100; ++ia) { args[ia]=new char[1000]; } int ret=OK; @@ -4848,9 +4848,9 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ cout << iv << " " << names[iv] << endl; strcpy(args[0],names[iv].c_str()); outfile << names[iv] << " " << cmd->executeLine(1,args,GET_ACTION) << std::endl; - iline++; + ++iline; // single detector configuration - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { // sprintf(ext,".det%d",i); if (detectors[i]) { iv+=detectors[i]->writeConfigurationFile(outfile,i); @@ -4861,12 +4861,12 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ //other configurations - for (iv=1; ivexecuteLine(1,args,GET_ACTION) << std::endl; - iline++; + ++iline; } @@ -4881,7 +4881,7 @@ int multiSlsDetector::writeConfigurationFile(string const fname){ ret = FAIL; } - for (int ia=0; ia<100; ia++) { + for (int ia=0; ia<100; ++ia) { delete [] args[ia]; } @@ -4925,7 +4925,7 @@ int multiSlsDetector::writeDataFile(string fname, double *data, double *err, dou if (outfile.is_open()) { - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { n=detectors[i]->getTotalNumberOfChannels(); @@ -4978,7 +4978,7 @@ int multiSlsDetector::writeDataFile(string fname, int *data) { outfile.open (fname.c_str(),ios_base::out); if (outfile.is_open()) { - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { #ifdef VERBOSE cout << " write " << i << " position " << off << " offset " << choff << endl; @@ -5020,7 +5020,7 @@ int multiSlsDetector::readDataFile(string fname, double *data, double *err, doub infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { iline+=detectors[i]->readDataFile(detectors[i]->getTotalNumberOfChannels(), infile, data+off, pe, pa, dataformat, choff); if(detectors[i]->getErrorMask()) @@ -5062,7 +5062,7 @@ int multiSlsDetector::readDataFile(string fname, int *data) { infile.open(fname.c_str(), ios_base::in); if (infile.is_open()) { - for (int i=0; inumberOfDetectors; i++) { + for (int i=0; inumberOfDetectors; ++i) { if (detectors[i]) { iline+=detectors[i]->readDataFile(infile, data+off,detectors[i]->getTotalNumberOfChannels(), choff); if(detectors[i]->getErrorMask()) @@ -5096,7 +5096,7 @@ int multiSlsDetector::setReceiverOnline(int off) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func1_t(&slsDetector::setReceiverOnline, @@ -5106,7 +5106,7 @@ int multiSlsDetector::setReceiverOnline(int off) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -5129,7 +5129,7 @@ int multiSlsDetector::setReceiverOnline(int off) { string multiSlsDetector::checkReceiverOnline() { string retval1 = "",retval; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { retval=detectors[idet]->checkReceiverOnline(); if(!retval.empty()){ @@ -5150,7 +5150,7 @@ string multiSlsDetector::setFilePath(string s) { //if the sls file paths are different, it should be realized by always using setfilepath even if string empty //if(!s.empty()){ - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setFilePath(s); if(detectors[idet]->getErrorMask()) @@ -5189,7 +5189,7 @@ string multiSlsDetector::setFileName(string s) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=(int)detectors[idet]->setFileFormat(f); if(detectors[idet]->getErrorMask()) @@ -5238,7 +5238,7 @@ int multiSlsDetector::setFileIndex(int i) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func1_t(&slsDetector::setFileIndex, @@ -5248,7 +5248,7 @@ int multiSlsDetector::setFileIndex(int i) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -5278,7 +5278,7 @@ int multiSlsDetector::startReceiver(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::startReceiver, @@ -5288,7 +5288,7 @@ int multiSlsDetector::startReceiver(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -5340,7 +5340,7 @@ int multiSlsDetector::stopReceiver(){ return FAIL; }else{ int* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::stopReceiver, @@ -5350,7 +5350,7 @@ int multiSlsDetector::stopReceiver(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] != OK) @@ -5379,7 +5379,7 @@ slsDetectorDefs::runStatus multiSlsDetector::startReceiverReadout(){ } } - for (i=0; inumberOfDetectors; i++) { + for (i=0; inumberOfDetectors; ++i) { if (detectors[i]) { s=detectors[i]->startReceiverReadout(); if(detectors[i]->getErrorMask()) @@ -5417,7 +5417,7 @@ slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){ return ERROR; }else{ runStatus* iret[posmax-posmin]; - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ iret[idet]= new runStatus(ERROR); Task* task = new Task(new func0_t(&slsDetector::getReceiverStatus, @@ -5427,7 +5427,7 @@ slsDetectorDefs::runStatus multiSlsDetector::getReceiverStatus(){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=posmin; idetmasterPosition) && (detectors[idet])){ if(iret[idet] != NULL){ if(*iret[idet] == (int)ERROR) @@ -5461,7 +5461,7 @@ int multiSlsDetector::getFramesCaughtByAnyReceiver() { } } - for (int i=0; inumberOfDetectors; i++) + for (int i=0; inumberOfDetectors; ++i) if (detectors[i]){ ret=detectors[i]->getFramesCaughtByReceiver(); if(detectors[i]->getErrorMask()) @@ -5483,7 +5483,7 @@ int multiSlsDetector::getFramesCaughtByReceiver() { return -1; }else{ int* iret[posmax]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(0); Task* task = new Task(new func0_t(&slsDetector::getFramesCaughtByReceiver, @@ -5494,7 +5494,7 @@ int multiSlsDetector::getFramesCaughtByReceiver() { threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; i++) + for (int i=0; inumberOfDetectors; ++i) if (detectors[i]){ ret1+=detectors[i]->getReceiverCurrentFrameIndex(); if(detectors[i]->getErrorMask()) @@ -5544,7 +5544,7 @@ int multiSlsDetector::resetFramesCaught() { return FAIL; }else{ int* iret[posmax]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(OK); Task* task = new Task(new func0_t(&slsDetector::resetFramesCaught, @@ -5555,7 +5555,7 @@ int multiSlsDetector::resetFramesCaught() { threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->lockReceiver(lock); if(detectors[idet]->getErrorMask()) @@ -5849,7 +5849,7 @@ int multiSlsDetector::lockReceiver(int lock) { string multiSlsDetector::getReceiverLastClientIP() { string s0="", s1="",s ; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { s=detectors[idet]->getReceiverLastClientIP(); if(detectors[idet]->getErrorMask()) @@ -5877,7 +5877,7 @@ string multiSlsDetector::getReceiverLastClientIP() { int multiSlsDetector::exitReceiver() { int ival=FAIL, iv; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { iv=detectors[idet]->exitReceiver(); if (iv==OK) @@ -5892,7 +5892,7 @@ int multiSlsDetector::exitReceiver() { int multiSlsDetector::enableWriteToFile(int enable){ int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->enableWriteToFile(enable); if(detectors[idet]->getErrorMask()) @@ -5912,7 +5912,7 @@ int multiSlsDetector::enableWriteToFile(int enable){ int multiSlsDetector::overwriteFile(int enable){ int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->overwriteFile(enable); if(detectors[idet]->getErrorMask()) @@ -5938,7 +5938,7 @@ int multiSlsDetector::setFrameIndex(int index){ }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idet(&slsDetector::setFrameIndex, @@ -5948,7 +5948,7 @@ int multiSlsDetector::setFrameIndex(int index){ } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -5980,7 +5980,7 @@ string multiSlsDetector::getErrorMessage(int &critical){ if(multiMask & MULTI_DETECTORS_NOT_ADDED) retval.append("Detectors not added:\n"+string(getNotAddedList())+string("\n")); - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { //if the detector has error if(multiMask&(1<numberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]) detectors[idet]->clearErrorMask(); @@ -6023,7 +6023,7 @@ int64_t multiSlsDetector::clearAllErrorMask(){ int multiSlsDetector::calibratePedestal(int frames){ int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->calibratePedestal(frames); if(detectors[idet]->getErrorMask()) @@ -6044,7 +6044,7 @@ int multiSlsDetector::setReadReceiverFrequency(int getFromReceiver, int freq){ if(!getFromReceiver) return thisMultiDetector->receiver_read_freq; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setReadReceiverFrequency(getFromReceiver,freq); if(detectors[idet]->getErrorMask()) @@ -6066,7 +6066,7 @@ int multiSlsDetector::setReadReceiverFrequency(int getFromReceiver, int freq){ int multiSlsDetector::setReceiverReadTimer(int time_in_ms){ int ret=-100, ret1; - for (int idet=0; idetnumberOfDetectors; idet++) { + for (int idet=0; idetnumberOfDetectors; ++idet) { if (detectors[idet]) { ret1=detectors[idet]->setReceiverReadTimer(time_in_ms); if(detectors[idet]->getErrorMask()) @@ -6116,7 +6116,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){//cannot parra }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func1_t(&slsDetector::enableDataStreamingFromReceiver, @@ -6126,7 +6126,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){//cannot parra } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -6150,7 +6150,7 @@ int multiSlsDetector::enableDataStreamingFromReceiver(int enable){//cannot parra int multiSlsDetector::enableReceiverCompression(int i){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->enableReceiverCompression(i); if(detectors[idet]->getErrorMask()) @@ -6167,7 +6167,7 @@ int multiSlsDetector::enableReceiverCompression(int i){ int multiSlsDetector::enableTenGigabitEthernet(int i){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->enableTenGigabitEthernet(i); if(detectors[idet]->getErrorMask()) @@ -6184,7 +6184,7 @@ int multiSlsDetector::enableTenGigabitEthernet(int i){ int multiSlsDetector::setReceiverFifoDepth(int i){ int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setReceiverFifoDepth(i); if(detectors[idet]->getErrorMask()) @@ -6215,12 +6215,12 @@ int multiSlsDetector::setCTBPattern(string fname) { FILE *fd=fopen(fname.c_str(),"r"); if (fd>0) { while (fread(&word, sizeof(word), 1,fd)) { - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ detectors[idet]->setCTBWord(addr,word); } // cout << hex << addr << " " << word << dec << endl; - addr++; + ++addr; } fclose(fd); @@ -6243,7 +6243,7 @@ int multiSlsDetector::setCTBPattern(string fname) { */ uint64_t multiSlsDetector::setCTBWord(int addr,uint64_t word) { uint64_t ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setCTBWord(addr, word); if(detectors[idet]->getErrorMask()) @@ -6270,7 +6270,7 @@ int multiSlsDetector::setCTBPatLoops(int level,int &start, int &stop, int &n) { int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setCTBPatLoops(level, start, stop, n); if(detectors[idet]->getErrorMask()) @@ -6296,7 +6296,7 @@ int multiSlsDetector::setCTBPatWaitAddr(int level, int addr) { int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setCTBPatWaitAddr(level, addr); if(detectors[idet]->getErrorMask()) @@ -6321,7 +6321,7 @@ int multiSlsDetector::setCTBPatWaitTime(int level, uint64_t t) { int ret=-100,ret1; - for (int idet=0; idetnumberOfDetectors; idet++) + for (int idet=0; idetnumberOfDetectors; ++idet) if (detectors[idet]){ ret1=detectors[idet]->setCTBPatWaitTime(level,t); if(detectors[idet]->getErrorMask()) @@ -6345,7 +6345,7 @@ int multiSlsDetector::pulsePixel(int n,int x,int y) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func3_t(&slsDetector::pulsePixel, @@ -6355,7 +6355,7 @@ int multiSlsDetector::pulsePixel(int n,int x,int y) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -6382,7 +6382,7 @@ int multiSlsDetector::pulsePixelNMove(int n,int x,int y) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func3_t(&slsDetector::pulsePixelNMove, @@ -6392,7 +6392,7 @@ int multiSlsDetector::pulsePixelNMove(int n,int x,int y) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -6419,7 +6419,7 @@ int multiSlsDetector::pulseChip(int n) { }else{ //return storage values int* iret[thisMultiDetector->numberOfDetectors]; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ iret[idet]= new int(-1); Task* task = new Task(new func1_t(&slsDetector::pulseChip, @@ -6429,7 +6429,7 @@ int multiSlsDetector::pulseChip(int n) { } threadpool->startExecuting(); threadpool->wait_for_tasks_to_complete(); - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ if(iret[idet] != NULL){ if (ret==-100) @@ -6450,7 +6450,7 @@ int multiSlsDetector::pulseChip(int n) { void multiSlsDetector::setAcquiringFlag(bool b){ thisMultiDetector->acquiringFlag = b; - for(int idet=0; idetnumberOfDetectors; idet++){ + for(int idet=0; idetnumberOfDetectors; ++idet){ if(detectors[idet]){ detectors[idet]->setAcquiringFlag(b); } diff --git a/slsDetectorSoftware/slsDetector/slsDetector.cpp b/slsDetectorSoftware/slsDetector/slsDetector.cpp index 8038bc09d..6951892e9 100644 --- a/slsDetectorSoftware/slsDetector/slsDetector.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetector.cpp @@ -190,9 +190,9 @@ slsDetector::slsDetector(int pos, int id, multiSlsDetector *p) :slsDetectorUtils if it fails the detector id is incremented until it succeeds */ shmId=initSharedMemory(type,id); - id++; + ++id; } - id--; + --id; #ifdef VERBOSE std::cout<< "Detector id is " << id << std::endl; #endif @@ -238,9 +238,9 @@ slsDetector::slsDetector(int pos, detectorType type, int id, multiSlsDetector *p if it fails the detector id is incremented until it succeeds */ shmId=initSharedMemory(type,id); - id++; + ++id; } - id--; + --id; #ifdef VERBOSE std::cout<< "Detector id is " << id << " type is " << type << std::endl; #endif @@ -304,9 +304,9 @@ slsDetector::slsDetector(int pos, char *name, int id, int cport,multiSlsDetector if it fails the detector id is incremented until it succeeds */ shmId=initSharedMemory(type,id); - id++; + ++id; } - id--; + --id; #ifdef VERBOSE std::cout<< "Detector id is " << id << std::endl; #endif @@ -779,13 +779,13 @@ int slsDetector::initializeDetectorSize(detectorType type) { thisDetector->flippedData[1] = 0; thisDetector->zmqport = 0; - for (int ia=0; iaactionScript[ia],"none"); strcpy(thisDetector->actionParameter[ia],"none"); } - for (int iscan=0; iscanscanMode[iscan]=0; strcpy(thisDetector->scanScript[iscan],"none"); @@ -830,7 +830,7 @@ int slsDetector::initializeDetectorSize(detectorType type) { fferrors=(double*)(goff+thisDetector->fferroff); detectorModules=(sls_detector_module*)(goff+ thisDetector->modoff); #ifdef VERBOSE - // for (int imod=0; imod< thisDetector->nModsMax; imod++) + // for (int imod=0; imod< thisDetector->nModsMax; ++imod) // std::cout<< hex << detectorModules+imod << dec <nModsMax; imod++) { + for (int imod=0; imodnModsMax; ++imod) { @@ -964,37 +964,37 @@ int slsDetector::initializeDetectorStructure() { thisMod->reg=0; /** initializes the dacs values to 0 */ - for (int idac=0; idacnDacs; idac++) { + for (int idac=0; idacnDacs; ++idac) { *(dacs+idac+thisDetector->nDacs*imod)=0; } /** initializes the adc values to 0 */ - for (int iadc=0; iadcnAdcs; iadc++) { + for (int iadc=0; iadcnAdcs; ++iadc) { *(adcs+iadc+thisDetector->nAdcs*imod)=0; } /** initializes the chip registers to 0 */ - for (int ichip=0; ichipnChips; ichip++) { + for (int ichip=0; ichipnChips; ++ichip) { *(chipregs+ichip+thisDetector->nChips*imod)=-1; } /** initializes the channel registers to 0 */ - for (int ichan=0; ichannChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannChans*thisDetector->nChips; ++ichan) { *(chanregs+ichan+thisDetector->nChips*thisDetector->nChans*imod)=-1; } /** initializes the gain values to 0 */ - for (int igain=0; igainnGain; igain++) { + for (int igain=0; igainnGain; ++igain) { *(gain+igain+thisDetector->nGain*imod)=0; } /** initializes the offset values to 0 */ - for (int ioffset=0; ioffsetnOffset; ioffset++) { + for (int ioffset=0; ioffsetnOffset; ++ioffset) { *(offset+ioffset+thisDetector->nOffset*imod)=0; } @@ -1730,7 +1730,7 @@ int slsDetector::getTotalNumberOfChannels() { if (thisDetector->nChan[X]>=32) { if (thisDetector->nROI>0) { thisDetector->nChan[X]-=32; - for (int iroi=0; iroinROI; iroi++) + for (int iroi=0; iroinROI; ++iroi) thisDetector->nChan[X]+=thisDetector->roiLimits[iroi].xmax-thisDetector->roiLimits[iroi].xmin+1; } } @@ -2489,7 +2489,7 @@ dacs_t slsDetector::setDAC(dacs_t val, dacIndex index, int mV, int imod){ *(dacs+index+imod*thisDetector->nDacs)=retval[0]; } else { - for (imod=0; imodnModsMax; imod++) + for (imod=0; imodnModsMax; ++imod) *(dacs+index+imod*thisDetector->nDacs)=retval[0]; } } @@ -2601,9 +2601,9 @@ int slsDetector::setChannel(int64_t reg, int ichan, int ichip, int imod){ chamax=thisDetector->nChans; }*/ - // for (int im=mmin; imnChans*thisDetector->nChips+ichi*thisDetector->nChips+icha)=retval; @@ -2779,14 +2779,14 @@ int slsDetector::setChip(int reg, int ichip, int imod){ myChip.nchan=thisDetector->nChans; myChip.reg=reg; - for (int im=mmin; imnChans+im*thisDetector->nChans*thisDetector->nChips); else { - for (int i=0; inChans; i++) + for (int i=0; inChans; ++i) chregs[i]=-1; myChip.chanregs=chregs; } @@ -2885,7 +2885,7 @@ slsDetectorDefs::sls_detector_chip slsDetector::getChip(int ichip, int imod){ if (chipregs) *(chipregs+ichip+imod*thisDetector->nChips)=myChip.reg; if (chanregs) { - for (int ichan=0; ichannChans; ichan++) + for (int ichan=0; ichannChans; ++ichan) *(chanregs+imod*thisDetector->nChans*thisDetector->nChips+ichip*thisDetector->nChans+ichan)=*((myChip.chanregs)+ichan); } } @@ -2923,7 +2923,7 @@ int slsDetector::setModule(int reg, int imod){ - for (int im=mmin; imnChans; @@ -2943,34 +2943,34 @@ int slsDetector::setModule(int reg, int imod){ } - for (int i=0; inAdcs; i++) + for (int i=0; inAdcs; ++i) ads[i]=-1; if (chanregs) myModule.chanregs=chanregs+im*thisDetector->nChips*thisDetector->nChans; else { - for (int i=0; inChans*thisDetector->nChips; i++) + for (int i=0; inChans*thisDetector->nChips; ++i) charegs[i]=-1; myModule.chanregs=charegs; } if (chipregs) myModule.chipregs=chanregs+im*thisDetector->nChips; else { - for (int ichip=0; ichipnChips; ichip++) + for (int ichip=0; ichipnChips; ++ichip) chiregs[ichip]=-1; myModule.chipregs=chiregs; } if (dacs) myModule.dacs=dacs+im*thisDetector->nDacs; else { - for (int i=0; inDacs; i++) + for (int i=0; inDacs; ++i) das[i]=-1; myModule.dacs=das; } if (adcs) myModule.adcs=adcs+im*thisDetector->nAdcs; else { - for (int i=0; inAdcs; i++) + for (int i=0; inAdcs; ++i) ads[i]=-1; myModule.adcs=ads; } @@ -3051,25 +3051,25 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int if(thisDetector->myDetectorType != JUNGFRAU){ if(tb) { - for (int ichip=0; ichipnChips; ichip++) { + for (int ichip=0; ichipnChips; ++ichip) { if (chipregs) chipregs[ichip+thisDetector->nChips*imod]=module.chipregs[ichip]; if (chanregs) { - for (int i=0; inChans; i++) { + for (int i=0; inChans; ++i) { chanregs[i+ichip*thisDetector->nChans+thisDetector->nChips*thisDetector->nChans*imod]=module.chanregs[ichip*thisDetector->nChans+i]; } } } } if (adcs) { - for (int i=0; inAdcs; i++) + for (int i=0; inAdcs; ++i) adcs[i+imod*thisDetector->nAdcs]=module.adcs[i]; } } if (dacs) { - for (int i=0; inDacs; i++) + for (int i=0; inDacs; ++i) dacs[i+imod*thisDetector->nDacs]=module.dacs[i]; } @@ -3081,12 +3081,12 @@ int slsDetector::setModule(sls_detector_module module, int iodelay, int tau, int } if ((thisDetector->nGain) && (gainval) && (gain)) { - for (int i=0; inGain; i++) + for (int i=0; inGain; ++i) gain[i+imod*thisDetector->nGain]=gainval[i]; } if ((thisDetector->nOffset) && (offsetval) && (offset)) { - for (int i=0; inOffset; i++) + for (int i=0; inOffset; ++i) offset[i+imod*thisDetector->nOffset]=offsetval[i]; } @@ -3181,25 +3181,25 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ thisDetector->nAdcs=myMod->nadc; if(thisDetector->myDetectorType != JUNGFRAU){ - for (int ichip=0; ichipnChips; ichip++) { + for (int ichip=0; ichipnChips; ++ichip) { if (chipregs) chipregs[ichip+thisDetector->nChips*imod]=myMod->chipregs[ichip]; if (chanregs) { - for (int i=0; inChans; i++) { + for (int i=0; inChans; ++i) { chanregs[i+ichip*thisDetector->nChans+thisDetector->nChips*thisDetector->nChans*imod]=myMod->chanregs[ichip*thisDetector->nChans+i]; } } } if (adcs) { - for (int i=0; inAdcs; i++) + for (int i=0; inAdcs; ++i) adcs[i+imod*thisDetector->nAdcs]=myMod->adcs[i]; } } if (dacs) { - for (int i=0; inDacs; i++) + for (int i=0; inDacs; ++i) dacs[i+imod*thisDetector->nDacs]=myMod->dacs[i]; } (detectorModules+imod)->gain=myMod->gain; @@ -3210,12 +3210,12 @@ slsDetectorDefs::sls_detector_module *slsDetector::getModule(int imod){ } if ((thisDetector->nGain) && (gainval) && (gain)) { - for (int i=0; inGain; i++) + for (int i=0; inGain; ++i) gain[i+imod*thisDetector->nGain]=gainval[i]; } if ((thisDetector->nOffset) && (offsetval) && (offset)) { - for (int i=0; inOffset; i++) + for (int i=0; inOffset; ++i) offset[i+imod*thisDetector->nOffset]=offsetval[i]; } @@ -3678,7 +3678,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise modma=thisDetector->nMod[X]*thisDetector->nMod[Y]; } - for (im=modmi; immodule=im; @@ -3819,12 +3819,12 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise int slsDetector::getChanRegs(double* retval,bool fromDetector){ int n=getTotalNumberOfChannels(); if(fromDetector){ - for(int im=0;imdataBytes/8; ib++) + // for (int ib=0; ibdataBytes/8; ++ib) // cout << ((*(((u_int64_t*)retval)+ib))>>17&1) ; @@ -4262,7 +4262,7 @@ int* slsDetector::readAll(){ while ((retval=getDataFromDetector())){ #ifdef VERBOSE - i++; + ++i; std::cout<< i << std::endl; #endif dataQueue.push(retval); @@ -4324,7 +4324,7 @@ int* slsDetector::startAndReadAll(){ //#endif while ((retval=getDataFromDetector())){ #ifdef VERBOSE - i++; + ++i; std::cout<< i << std::endl; //#else //std::cout<< "-" << flush; @@ -4342,7 +4342,7 @@ int* slsDetector::startAndReadAll(){ #endif return dataQueue.front(); // check what we return! /* while ((retval=getDataFromDetectorNoWait())) - i++; + ++i; #ifdef VERBOSE std::cout<< "Received " << i << " frames"<< std::endl; #endif @@ -5112,10 +5112,10 @@ int slsDetector::setROI(int n,ROI roiLimits[]){ //sort ascending order int temp; - for(int i=0;iroiLimits[i]=retval[i]; thisDetector->nROI = retvalsize; } //#ifdef VERBOSE - for(int j=0;jnROI;j++) + for(int j=0;jnROI;++j) cout<<"get"<< roiLimits[j].xmin<<"\t"<timerValue[PROBES_NUMBER]==0) { if (thisDetector->myDetectorType==JUNGFRAUCTB) { - for (ichan=0; ichandataBytes; ibyte++) { + for (ibyte=0; ibytedataBytes; ++ibyte) { iptr=ptr[ibyte];//&0x1; - for (ipos=0; ipos<8; ipos++) { + for (ipos=0; ipos<8; ++ipos) { // dataout[ibyte*2+ichan]=((iptr&((0xf)<>ichan)&0xf; ival=(iptr>>(ipos))&0x1; dataout[ichan]=ival; - ichan++; + ++ichan; } } break; case 4: - for (ibyte=0; ibytedataBytes; ibyte++) { + for (ibyte=0; ibytedataBytes; ++ibyte) { iptr=ptr[ibyte]; - for (ipos=0; ipos<2; ipos++) { + for (ipos=0; ipos<2; ++ipos) { // dataout[ibyte*2+ichan]=((iptr&((0xf)<>ichan)&0xf; ival=(iptr>>(ipos*4))&0xf; dataout[ichan]=ival; - ichan++; + ++ichan; } } break; case 8: - for (ichan=0; ichandataBytes; ichan++) { + for (ichan=0; ichandataBytes; ++ichan) { ival=ptr[ichan]&0xff; dataout[ichan]=ival; } break; case 16: - for (ichan=0; ichanmyDetectorType == MYTHEN) mask=0xffffff; - for (ichan=0; ichannMod[Y]*thisDetector->nMod[X]*thisDetector->nChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannMod[Y]*thisDetector->nMod[X]*thisDetector->nChans*thisDetector->nChips; ++ichan) { // #ifdef VERBOSE // std::cout<< ichan << " "<< corr[ichan] << std::endl; // #endif @@ -5552,7 +5552,7 @@ int slsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { std::cout<< "Flat field correction is enabled" << std::endl; #endif if (corr) { - for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ++ichan) { // corr[ichan]=(ffcoefficients[ichan]*ffcoefficients[ichan])/(fferrors[ichan]*fferrors[ichan]); corr[ichan]=ffcoefficients[ichan]; if (ecorr) { @@ -5567,7 +5567,7 @@ int slsDetector::getFlatFieldCorrection(double *corr, double *ecorr) { std::cout<< "Flat field correction is disabled" << std::endl; #endif if (corr) - for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ++ichan) { corr[ichan]=1; if (ecorr) ecorr[ichan]=0; @@ -5584,7 +5584,7 @@ int slsDetector::flatFieldCorrect(double* datain, double *errin, double* dataout #endif double e, eo; if (thisDetector->correctionMask & (1<nMod[X]*thisDetector->nChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannMod[X]*thisDetector->nChans*thisDetector->nChips; ++ichan) { if (errin==NULL) { e=0; } else { @@ -5758,7 +5758,7 @@ int slsDetector::rateCorrect(double* datain, double *errin, double* dataout, dou #ifdef VERBOSE std::cout<< "Rate correcting data with dead time "<< tau << " and acquisition time "<< t << std::endl; #endif - for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ichan++) { + for (int ichan=0; ichannMod[X]*thisDetector->nMod[Y]*thisDetector->nChans*thisDetector->nChips; ++ichan) { if (errin==NULL) { e=sqrt(datain[ichan]); @@ -5817,10 +5817,10 @@ int slsDetector::setBadChannelCorrection(int nch, int *chs, int ff) { if (nch0) { thisDetector->correctionMask|=(1<nBadChans=0; - for (int ich=0 ;ich=0 && chs[ich]badChansList[ich]=chs[ich]; - thisDetector->nBadChans++; + ++thisDetector->nBadChans; // cout << "det : " << thisDetector->nBadChans << " " << thisDetector->badChansList[ich] << endl; } } @@ -5829,7 +5829,7 @@ int slsDetector::setBadChannelCorrection(int nch, int *chs, int ff) { } else { if (nch0) { thisDetector->nBadFF=nch; - for (int ich=0 ;ichbadFFList[ich]=chs[ich]; } } @@ -5856,9 +5856,9 @@ int slsDetector::getBadChannelCorrection(int *bad) { int ichan; if (thisDetector->correctionMask&(1<< DISCARD_BAD_CHANNELS)) { if (bad) { - for (ichan=0; ichannBadChans; ichan++) + for (ichan=0; ichannBadChans; ++ichan) bad[ichan]=thisDetector->badChansList[ichan]; - for (int ich=0; ichnBadFF; ich++) + for (int ich=0; ichnBadFF; ++ich) bad[ichan+ich]=thisDetector->badFFList[ich]; } return thisDetector->nBadChans+thisDetector->nBadFF; @@ -6401,7 +6401,7 @@ int slsDetector::configureMAC(){ #endif - for(i=0;i<2;i++){ + for(i=0;i<2;++i){ if(!strcmp(arg[i],"none")){ std::cout<< "Configure MAC Error. IP/MAC Addresses not set"<< std::endl; setErrorMask((getErrorMask())|(COULD_NOT_CONFIGURE_MAC)); @@ -6546,7 +6546,7 @@ int slsDetector::configureMAC(){ int slsDetector::getAngularConversion(int &direction, angleConversionConstant *angconv) { direction=thisDetector->angDirection; if (angconv) { - for (int imod=0; imodnMods; imod++) { + for (int imod=0; imodnMods; ++imod) { (angconv+imod)->center=thisDetector->angOff[imod].center; (angconv+imod)->r_conversion=thisDetector->angOff[imod].r_conversion; (angconv+imod)->offset=thisDetector->angOff[imod].offset; @@ -6842,7 +6842,7 @@ int slsDetector::readConfigurationFile(ifstream &infile){ sargname="none"; sargval="0"; getline(infile,str); - iline++; + ++iline; #ifdef VERBOSE std::cout<< str << std::endl; #endif @@ -6868,7 +6868,7 @@ int slsDetector::readConfigurationFile(ifstream &infile){ #endif strcpy(myargs[iargval],sargname.c_str()); args[iargval]=myargs[iargval]; - iargval++; + ++iargval; //} } ans=cmd->executeLine(iargval,args,PUT_ACTION); @@ -6876,7 +6876,7 @@ int slsDetector::readConfigurationFile(ifstream &infile){ std::cout<< ans << std::endl; #endif } - iline++; + ++iline; } delete cmd; return OK; @@ -6978,17 +6978,17 @@ int slsDetector::writeConfigurationFile(ofstream &outfile, int id){ char *args[100]; char myargs[100][1000]; - for (int ia=0; ia<100; ia++) { + for (int ia=0; ia<100; ++ia) { //args[ia]=new char[1000]; args[ia]=myargs[ia]; } - for (iv=0; iv=0) @@ -7065,17 +7065,17 @@ int slsDetector::programFPGA(string fname){ FILE* src = fopen(fname.c_str(),"rb"); FILE* dst = fopen(destfname.c_str(),"wb"); // Remove header (0...11C) - for (filepos=0; filepos < 0x11C; filepos++) + for (filepos=0; filepos < 0x11C; ++filepos) fgetc(src); // Write 0x80 times 0xFF (0...7F) - for (filepos=0; filepos < 0x80; filepos++) + for (filepos=0; filepos < 0x80; ++filepos) fputc(0xFF,dst); // Swap bits and write to file - for (filepos=0x80; filepos < 0x1000000; filepos++) { + for (filepos=0x80; filepos < 0x1000000; ++filepos) { x = fgetc(src); if (x < 0) break; y=0; - for (i=0; i < 8; i++) + for (i=0; i < 8; ++i) y=y| ( (( x & (1<> i) << (7-i) ); // This swaps the bits fputc(y,dst); } @@ -7155,7 +7155,7 @@ int slsDetector::programFPGA(string fname){ int count = 66; while(count>0){ usleep(1 * 1000 * 1000); - count--; + --count; printf("Erasing Flash:%d%%\r",(int) (((double)(65-count)/65)*100)); std::cout << flush; } @@ -7297,7 +7297,7 @@ int slsDetector::loadSettingsFile(string fname, int imod) { mmin=imod; mmax=imod+1; } - for (int im=mmin; immyDetectorType != EIGER){ @@ -7337,7 +7337,7 @@ int slsDetector::saveSettingsFile(string fname, int imod) { mmin=imod; mmax=imod+1; } - for (int im=mmin; immyDetectorType == EIGER){ ostfn << fname << ".sn" << setfill('0') << setw(3) << dec << getId(DETECTOR_SERIAL_NUMBER); @@ -7408,12 +7408,12 @@ int slsDetector::loadCalibrationFile(string fname, int imod) { int* gainval=0; int* offsetval=0; if(thisDetector->nGain){ gainval=new int[thisDetector->nGain]; - for(int i=0;inGain;i++) + for(int i=0;inGain;++i) gainval[i] = -1; } if(thisDetector->nOffset){ offsetval=new int[thisDetector->nOffset]; - for(int i=0;inOffset;i++) + for(int i=0;inOffset;++i) offsetval[i] = -1; } @@ -7425,7 +7425,7 @@ int slsDetector::loadCalibrationFile(string fname, int imod) { mmin=imod; mmax=imod+1; } - for (int im=mmin; immyDetectorType != EIGER){ @@ -7469,7 +7469,7 @@ int slsDetector::saveCalibrationFile(string fname, int imod) { mmin=imod; mmax=imod+1; } - for (int im=mmin; immyDetectorType == EIGER) ostfn << fname << ".sn" << setfill('0') << setw(3) << dec << getId(DETECTOR_SERIAL_NUMBER); @@ -8120,7 +8120,7 @@ int slsDetector::resetFramesCaught(){ // return NULL; } // //jungfrau masking adcval // if(thisDetector->myDetectorType == JUNGFRAU){ -// for(unsigned int i=0;igetNumberOfDetectors();i++){ + for(int i=0;igetNumberOfDetectors();++i){ if(parentDet->getDetectorId(i) == getDetectorId()) parentDet->setErrorMask(parentDet->getErrorMask()|(0<help Returns a list of possible commands. */ descrToFuncMap[i].m_pFuncName="help";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHelp; - i++; + ++i; /*! \page test - exitserver Shuts down all the detector servers. Don't use it!!!! */ descrToFuncMap[i].m_pFuncName="exitserver";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdExitServer; - i++; + ++i; /*! \page test - exitreceiver Shuts down all the receivers. Don't use it!!!! */ descrToFuncMap[i].m_pFuncName="exitreceiver";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdExitServer; - i++; + ++i; /*! \page test - flippeddatay [i] enables/disables data being flipped across y axis. 1 enables, 0 disables. Not implemented. */ descrToFuncMap[i].m_pFuncName="flippeddatay"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /* digital test and debugging */ @@ -111,63 +111,63 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="digitest"; // /* find command! */ descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; + ++i; /*! \page test - bustest performs test of the bus interface between FPGA and embedded Linux system. Can last up to a few minutes. Cannot set! Used for Mythen only. Only get! */ descrToFuncMap[i].m_pFuncName="bustest"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; + ++i; /*! \page test - digibittest:[i] performs digital test of the module i. Returns 0 if succeeded, otherwise error mask. Only put! */ descrToFuncMap[i].m_pFuncName="digibittest"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDigiTest; - i++; + ++i; /*! \page test - reg [addr] [val] ??? writes to an register \c addr with \c value in hexadecimal format. */ descrToFuncMap[i].m_pFuncName="reg"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; + ++i; /*! \page test - adcreg [addr] [val] ??? writes to an adc register \c addr with \c value in hexadecimal format. Only put! */ descrToFuncMap[i].m_pFuncName="adcreg"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; + ++i; /*! \page test - setbit ??? Only put! */ descrToFuncMap[i].m_pFuncName="setbit"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; + ++i; /*! \page test - clearbit ??? Only put! */ descrToFuncMap[i].m_pFuncName="clearbit"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; + ++i; /*! \page test - getbit ??? Only get! */ descrToFuncMap[i].m_pFuncName="getbit"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRegister; - i++; + ++i; /*! \page test - r_compression [i] sets/gets compression in receiver. 1 sets, 0 unsets. Not implemented. */ descrToFuncMap[i].m_pFuncName="r_compression"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; @@ -181,56 +181,56 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="acquire"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAcquire; - i++; + ++i; /*! \page acquisition - \b busy returns \c 1 if the acquisition is active, \c 0 otherwise. Works when the acquisition is started in blocking mode. Only get! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="busy"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdStatus; - i++; + ++i; /*! \page acquisition - status [s] starts or stops acquisition in detector in non blocking mode. \c s: [\c start, \c stop]. \c Returns the detector status: [\c running, \c error, \c transmitting, \c finished, \c waiting, \c idle]. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="status"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdStatus; - i++; + ++i; /*! \page acquisition - \b data gets all data from the detector (if any) processes them and writes them to file according to the preferences already setup (MYTHEN only). Only get! */ descrToFuncMap[i].m_pFuncName="data"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdData; - i++; + ++i; /*! \page acquisition - \b frame gets a single frame from the detector (if any) processes it and writes it to file according to the preferences already setup (MYTHEN only). Only get! */ descrToFuncMap[i].m_pFuncName="frame"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFrame; - i++; + ++i; /*! \page acquisition - readctr Reads the counters from the detector memory (analog detector returning values translated into number of photons - only GOTTHARD). Cannot put. */ descrToFuncMap[i].m_pFuncName="readctr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdCounter; - i++; + ++i; /*! \page acquisition - resetctr i Resets counter in detector, restarts acquisition if i=1(analog detector returning values translated into number of photons - only GOTTHARD). Cannot put. */ descrToFuncMap[i].m_pFuncName="resetctr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdCounter; - i++; + ++i; /*! \page acquisition - resmat i sets/resets counter bit in detector.gets the counter bit in detector ???? */ descrToFuncMap[i].m_pFuncName="resmat"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdCounter; - i++; + ++i; @@ -260,63 +260,63 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="externalgui"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDataStream; - i++; + ++i; /*! \page config - \b free Free shared memory on the control PC */ descrToFuncMap[i].m_pFuncName="free";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFree; - i++; + ++i; /*! \page config - \b add Adds a detector at the end of the multi-detector structure. \c put argument is the hostname or IP adress. Returns the chained list of detector hostnames. */ descrToFuncMap[i].m_pFuncName="add";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdd; - i++; + ++i; /*! \page config - remove i Removes controller \c i from the multi-detector structure. Can be used for partial readout of the detector. */ descrToFuncMap[i].m_pFuncName="remove";//OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRemove; - i++; + ++i; /*! \page config - type Sets/gets detector type. \c Returns \c (string). Normally not used. Using hostname is enough. */ descrToFuncMap[i].m_pFuncName="type"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname; - i++; + ++i; /*! \page config - hostname \c put adds the hostname (ot IP adress) at the end of the multi-detector structure. If used for a single controlled (i:) replaces the current hostname. Returns the list of the hostnames of the multi-detector structure. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="hostname"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname; - i++; + ++i; /*! \page config - id[:i] Returns the id of the detector structure. i is the detector position in a multi detector system. If used a \c put, configures the id of the detector structure. i is the detector position in a multi detector system and l is the id of the detector to be added. */ descrToFuncMap[i].m_pFuncName="id"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdId; - i++; + ++i; /*! \page config - master i \c put sets the position of the master of the acquisition (-1 if none). Returns the position of the master of the detector structure (-1 if none). */ descrToFuncMap[i].m_pFuncName="master"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdMaster; - i++; + ++i; /*! \page config - sync Sets/gets the synchronization mode of the detectors in the multi-detector structure. Can be: \c none, \c gating, \c trigger, \c complementary. Mainly used by MYTHEN/GOTTHARD. */ descrToFuncMap[i].m_pFuncName="sync"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSync; - i++; + ++i; /*! \page config \section configstatus Status @@ -328,20 +328,20 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="online"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline; - i++; + ++i; /*! \page config - checkonline returns the hostnames of all detectors without connecting to them. \c Returns (string) "All online" or "[list of offline hostnames] : Not online". */ descrToFuncMap[i].m_pFuncName="checkonline"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline; - i++; + ++i; /*! \page config - activate Activates/Deactivates the detector. Deactivated detector does not send data. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="activate"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline; - i++; + ++i; /* detector and data size */ @@ -355,56 +355,56 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="nmod"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - maxmod Gets the maximum number of modules of the detector. Used for MYTHEN only. Cannot put! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="maxmod"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - dr [i] sets/gets the dynamic range of detector. Mythen [4,8,16,24]. Eiger [4,8,16,32]. Others cannot put! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="dr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - roi [i] [xmin] [xmax] [ymin] [ymax] sets region of interest of the detector, where i is number of rois;i=0 to clear rois. Used for GOTTHARD only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="roi"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - detsizechan [xmax] [ymax] sets the maximum number of channels in each dimension for complete detector set; -1 is no limit. Use for multi-detector system as first command in config file. \c Returns \c ("int int") */ descrToFuncMap[i].m_pFuncName="detsizechan"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - roimask [i] ?? \c Returns \c (int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="roimask"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - flippeddatax [i] enables/disables data being flipped across x axis. 1 enables, 0 disables. Used for EIGER only. 1 for bottom half-module, 0 for top-half module. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="flippeddatax"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize; - i++; + ++i; /*! \page config - tengiga [i] enables/disables 10GbE in system (detector & receiver). 1 enabled 10GbE, 0 enables 1GbE. Used in EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="tengiga"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /* flags */ @@ -418,7 +418,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="flags"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /*! \page config - extsig:[i] [flag] sets/gets the mode of the external signal i. Options: \c off, \c gate_in_active_high, \c gate_in_active_low, \c trigger_in_rising_edge, \c trigger_in_falling_edge, @@ -427,7 +427,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="extsig"; /* find command! */ descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /* fpga */ @@ -438,14 +438,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="programfpga"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /*! \page config - resetfpga [f] resets FPGA, where f can be any value. Used for JUNGFRAU only. Only put! \c Returns \c ("successful", "unsuccessful") */ descrToFuncMap[i].m_pFuncName="resetfpga"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /* chip */ @@ -459,35 +459,35 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="powerchip"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /*! \page config - led [i] sets/gets the led status. 1 on, 0 off. Used for MOENCH only ?? \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="led"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdvanced; - i++; + ++i; /*! \page config - pulse [n] [x] [y] pulses pixel at coordinates (x,y) n number of times. Used in EIGER only. Only put! \c Returns \c ("successful", "unsuccessful") */ descrToFuncMap[i].m_pFuncName="pulse"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; + ++i; /*! \page config - pulsenmove [n] [x] [y] pulses pixel n number of times and moves relatively by x value (x axis) and y value(y axis). Used in EIGER only. Only put! \c Returns \c ("successful", "unsuccessful") */ descrToFuncMap[i].m_pFuncName="pulsenmove"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; + ++i; /*! \page config - pulsechip [n]pulses chip n number of times, while n=-1 will reset it to normal mode. Used in EIGER only. Only put! \c Returns \c ("successful", "unsuccessful") */ descrToFuncMap[i].m_pFuncName="pulsechip"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPulse; - i++; + ++i; @@ -503,49 +503,49 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="moduleversion"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - detectornumber Gets the serial number or MAC of detector. Only get! \c Returns \c (long int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="detectornumber"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - modulenumber:[i] Gets the serial number of module i. Used for MYTHEN only. Only get! \c Returns \c (long int) in hexadecimal or "undefined module number" */ descrToFuncMap[i].m_pFuncName="modulenumber"; /* find command! */ descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - detectorversion Gets the firmware version of detector. Only get! \c Returns \c (long int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="detectorversion"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - softwareversion Gets the software version of detector server. Only get! \c Returns \c (long int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="softwareversion"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - thisversion Gets the software version of this client software. Only get! \c Returns \c (long int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="thisversion"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /*! \page config - receiverversion Gets the software version of receiver. Only get! \c Returns \c (long int) in hexadecimal */ descrToFuncMap[i].m_pFuncName="receiverversion"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSN; - i++; + ++i; /* r/w timers */ @@ -555,7 +555,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="timing"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTiming; - i++; + ++i; /*! \page timing @@ -563,70 +563,70 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="exptime"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - subexptime [i] sets/gets sub exposure time in s. Used in EIGER only in 32 bit mode. \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="subexptime"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - period [i] sets/gets frame period in s. \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="period"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - delay [i] sets/gets delay in s. Used in MYTHEN, GOTTHARD only. \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="delay"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - gates [i] sets/gets number of gates. Used in MYTHEN, GOTTHARD only. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="gates"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - frames [i] sets/gets number of frames. If \c timing is not \c auto, then it is the number of frames per cycle/trigger. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="frames"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - cycles [i] sets/gets number of triggers. Timing mode should be set appropriately. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="cycles"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - probes [i] sets/gets number of probes to accumulate. When setting, max 3! cycles should be set to 1, frames to the number of pump-probe events. Used in MYTHEN only. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="probes"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - measurements [i] sets/gets number of measurements. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="measurements"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /*! \page timing - samples [i] sets/gets number of samples expected from the jctb. Used in CHIP TEST BOARD only. \c Returns \c (long long int) */ descrToFuncMap[i].m_pFuncName="samples"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - i++; + ++i; /* read only timers */ @@ -635,74 +635,74 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="exptimel"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - periodl gets frame period left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="periodl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - delayl gets delay left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="delayl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - gatesl gets number of gates left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="gatesl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page config - framesl gets number of frames left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="framesl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - cyclesl gets number of cylces left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="cyclesl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - probesl gets number of probes left. Used in MYTHEN, GOTTHARD only. Only get! \c Returns \c (double with 9 decimal digits) */ descrToFuncMap[i].m_pFuncName="probesl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; // descrToFuncMap[i].m_pFuncName="progress"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimer; - // i++; + // ++i; /*! \page timing - now Actual time of the detector. Only get! */ descrToFuncMap[i].m_pFuncName="now"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - timestamp Last frame timestamp for MYTHEN. Only get! */ descrToFuncMap[i].m_pFuncName="timestamp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /*! \page timing - nframes ??? Only get! */ descrToFuncMap[i].m_pFuncName="nframes"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTimeLeft; - i++; + ++i; /* speed */ /*! \page config @@ -715,91 +715,91 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="clkdivider"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - setlength [i] sets/gets length of set/reset signals (in clock cycles). Used in MYTHEN only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="setlength"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - waitstates [i] sets/gets waitstates of the bus interface (in clock cycles). Used in MYTHEN only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="waitstates"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - totdivider [i] sets/gets clock divider in tot mode. Used in MYTHEN only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="totdivider"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - totdutycycle [i] sets/gets duty cycle of the tot clock. Used in MYTHEN only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="totdutycycle"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - phasestep [i] Only put for gotthard. Moves the phase of the ADC clock.\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="phasestep"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - oversampling [i] Sets/gets the number of adcsamples per clock. For the new chiptestboard.\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="oversampling"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - adcclk [i] sets/gets the ADC clock frequency in MHz. For the new chiptestboard!\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="adcclk"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - adcphase [i] Sets/gets the ADC clock frequency in MHz. For the new chiptestboard!\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="adcphase"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - adcpipeline [i] Sets/gets the pipeline of the ADC. For the new chiptestbaord!\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="adcpipeline"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - dbitclk [i] Sets/gets the clock frequency of the latching of the digital bits in MHz. For the new chiptestboard!\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="dbitclk"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - dbitphase [i] Sets/gets the phase of the clock for latching of the digital bits. For the new chiptestboard!?\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="dbitphase"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /*! \page config - dbitpipeline [i] Sets/gets the pipeline of the latching of the digital bits. For the new chiptestbaord!\c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="dbitpipeline"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSpeed; - i++; + ++i; /* settings dump/retrieve */ @@ -813,7 +813,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="config"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; - i++; + ++i; /* settings dump/retrieve */ /*! \page config @@ -821,21 +821,21 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="rx_printconfig"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; - i++; + ++i; /*! \page config - parameters [fname] sets/saves detector parameters contained in fname. Normally once per different measurement. \c Returns \c (string) fname */ descrToFuncMap[i].m_pFuncName="parameters"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; - i++; + ++i; /*! \page config - setup [fname] sets/saves detector complete setup contained in fname (extensions automatically generated), including trimfiles, ff coefficients etc. \c Returns \c (string) fname */ descrToFuncMap[i].m_pFuncName="setup"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfiguration; - i++; + ++i; @@ -851,42 +851,42 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="flatfield"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFlatField; - i++; + ++i; /*! \page data - ffdir [d] Sets/gets the directory in which the flat field file is located. \c Returns \c (string) ffdir */ descrToFuncMap[i].m_pFuncName="ffdir"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFlatField; - i++; + ++i; /*! \page data - ratecorr [ns] Returns the dead time used for rate correections in ns (int). \c put sets the deadtime correction constant in ns, -1 will set it to default tau of settings (0 unset). \c Returns \c (double with 9 decimal digit precision) */ descrToFuncMap[i].m_pFuncName="ratecorr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRateCorr; - i++; + ++i; /*! \page data - badchannels [fn] \c put sets the badchannels file to \c fn . \get returns the bad channels file name. If \fn is specified, it writes the badchannels to \c fn. \c none disables badchannel corrections. */ descrToFuncMap[i].m_pFuncName="badchannels"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdBadChannels; - i++; + ++i; /*! \page data - angconv [fn] \c put sets the angular conversion file to \c fn . \get returns the angular conversion file name. If \fn is specified, it writes the angular conversion factors to \c fn. \c none disables angular corrections. */ descrToFuncMap[i].m_pFuncName="angconv"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - globaloff [f] Sets/gets the beamline angular global offset (float). */ descrToFuncMap[i].m_pFuncName="globaloff"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - fineoff [f] Sets/gets the angular fine offset of the measurement (float). @@ -894,63 +894,63 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { //2017/08/15 descrToFuncMap[i].m_pFuncName="fineoff"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - binsize [f] Sets/gets the bin size used for the angular conversion (float). */ descrToFuncMap[i].m_pFuncName="binsize" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - angdir [i] Sets/gets the angular direction. 1 means increasing channels number as increasing angle, -1 increasing channel number decreasing angle. */ descrToFuncMap[i].m_pFuncName="angdir" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - moveflag [i] Sets/gets the flag for physically moving the detector during the acquisition of several positions. 1 sets (moves), 0 unsets. */ descrToFuncMap[i].m_pFuncName="moveflag" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - samplex [f] Sets/gets the sample displacement in th direction parallel to the beam in um. Unused! */ descrToFuncMap[i].m_pFuncName="samplex" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - sampley [f] Sets/gets the sample displacement in th direction orthogonal to the beam in um. Unused! */ descrToFuncMap[i].m_pFuncName="sampley" ;// descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; - i++; + ++i; /*! \page data - threaded [i] Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded. */ descrToFuncMap[i].m_pFuncName="threaded"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdThreaded; - i++; + ++i; /*! \page data - darkimage fn Loads the dark image to the detector from file fn (pedestal image). Cannot get. */ descrToFuncMap[i].m_pFuncName="darkimage"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdImage; - i++; + ++i; /*! \page data - gainimage fn Loads the gain image to the detector from file fn (gain map for translation into number of photons of an analog detector). Cannot get. */ descrToFuncMap[i].m_pFuncName="gainimage"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdImage; - i++; + ++i; @@ -977,27 +977,27 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="settingsdir"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettingsDir; - i++; + ++i; /*! \page settings - trimdir [dir] obsolete \c settingsdir. \c Returns \c (string) dir */ descrToFuncMap[i].m_pFuncName="trimdir"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettingsDir; - i++; + ++i; /*! \page settings - caldir [dir] Sets/gets the directory where the calibration files are located. \c Returns \c (string) dir */ descrToFuncMap[i].m_pFuncName="caldir"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdCalDir; - i++; + ++i; /*! \page settings - trimen [n e0 e1...e(n-1)] Sets/gets the number of energies n at which the detector has default trim file and their values in eV (int). \c Returns \c (int int...) n e0 e1...e(n-1) */ descrToFuncMap[i].m_pFuncName="trimen"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdTrimEn; - i++; + ++i; /* settings, threshold */ /*! \page settings @@ -1012,49 +1012,49 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="settings"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - threshold [eV] [sett] sets/gets the detector threshold in eV. sett is optional and if provided also sets the settings. Use this for Eiger instead of \c settings. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="threshold"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - thresholdnotb [eV] [sett] sets/gets the detector threshold in eV without loading trimbits. sett is optional and if provided also sets the settings. Use this for Eiger instead of \c settings. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="thresholdnotb"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - trimbits [fname] loads/stores the trimbits to/from the detector. If no extension is specified, the serial number of each module will be attached. \c Returns \c (string) fname */ descrToFuncMap[i].m_pFuncName="trimbits"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - trim:[mode] [fname] trims the detector according to mode and saves resulting trimbits to file. Mode: noise, beam, improve, fix. Used in MYTHEN only. Only put! \c Returns \c ("done") */ descrToFuncMap[i].m_pFuncName="trim"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - trimval [i] sets all trimbits to i. Used in EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="trimval"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; /*! \page settings - pedestal [i] starts acquisition for i frames, calculates pedestal and writes back to fpga. Used in GOTTHARD only. Only put! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="pedestal"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdSettings; - i++; + ++i; @@ -1069,287 +1069,287 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="vthreshold"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcalibration [i] [mv] Sets/gets the voltage of the calibration pulses. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcalibration"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vtrimbit [i] [mv] Sets/gets the voltage to set the width of the trimbits. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vtrimbit"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vpreamp [i] [mv] Sets/gets the voltage to define the preamplifier feedback resistance. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vpreamp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vhaper1 [i] [mv] Sets/gets the voltage to define the feedback resistance of the first shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vshaper1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vshaper2 [i] [mv] Sets/gets the voltage to define the feedback resistance of the second shaper. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vshaper2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vhighvoltage [i] Sets/gets the high voltage to the sensor in V. \c Returns \c (int ["mV"]). */ descrToFuncMap[i].m_pFuncName="vhighvoltage"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vapower [i] Sets/gets the analog power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vapower"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vddpower [i] Sets/gets the digital power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vddpower"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vshpower [i] Sets/gets the comparator power supply for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vshpower"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - viopower [i] Sets/gets the power supply of the FPGA I/Os for the old chiptest board in DAC units. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="viopower"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vrefds [i] [mv] Sets/gets vrefds. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vref_ds"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcascn_pb [i] [mv] Sets/gets vcascn_pb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcascn_pb"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcasc_pb [i] [mv] Sets/gets vcasc_pb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcascp_pb"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vout_cm [i] [mv] Sets/gets vout_cm. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vout_cm"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcasc_out [i] [mv] Sets/gets vcasc_out. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcasc_out"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vin_com [i] [mv] Sets/gets vin_com. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vin_cm"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vref_comp [i] [mv] Sets/gets vref_comp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vref_comp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - ib_test_c [i] [mv] Sets/gets ib_test_c. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="ib_test_c"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - dac[0..7] [i] [mv] Sets/gets dac[0..7] for MOENCH02. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="dac0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac3"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac4"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac5"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac6"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; descrToFuncMap[i].m_pFuncName="dac7"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vsvp [i] [mv] Sets/gets vsvp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vsvp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vsvn [i] [mv] Sets/gets vsvn. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vsvn"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vtr [i] [mv] Sets/gets vtr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vtr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vrf [i] [mv] Sets/gets vrf. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vrf"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vrs [i] [mv] Sets/gets vrs. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vrs"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vtgstv [i] [mv] Sets/gets vtgstv. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vtgstv"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcmp_ll [i] [mv] Sets/gets vcmp_ll. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcmp_ll"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcmp_lr [i] [mv] Sets/gets vcmp_lr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcmp_lr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcal_l [i] [mv] Sets/gets vcal_l. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcall"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcomp_rl [i] [mv] Sets/gets vcomp_rl. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcmp_rl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcomp_rr [i] [mv] Sets/gets vcomp_rr. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcmp_rr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - rxb_rb [i] [mv] Sets/gets rxb_rb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="rxb_rb"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - rxb_lb [i] [mv] Sets/gets rxb_lb. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="rxb_lb"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcp [i] [mv] Sets/gets vcp. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vcn [i] [mv] Sets/gets vcn. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vcn"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - vis [i] [mv] Sets/gets vis. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="vis"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - iodelay [i] [mv] Sets/gets iodelay. Normally in DAC units unless \c mv is specified at the end of the command line. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="iodelay"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings @@ -1357,7 +1357,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="dac"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; @@ -1366,7 +1366,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="adcvpp"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings @@ -1374,35 +1374,35 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="v_a"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - v_b [i] mv Sets/gets value for Vb on the new chiptest board. Must be in mV. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="v_b"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - v_c [i] mv Sets/gets value for Vc on the new chiptest board. Must be in mV. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="v_c"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - v_d [i] mv Sets/gets value for Vd on the new chiptest board. Must be in mV. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="v_d"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - v_io [i] mv Sets/gets value for Vio on the new chiptest board. Must be in mV. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="v_io"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings @@ -1410,14 +1410,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="v_chip"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /*! \page settings - v_limit [i] mv Sets/gets a soft limit for the power supplies and the DACs on the new chiptest board. Must be in mV. \c Returns \c (int ["mV"]) */ descrToFuncMap[i].m_pFuncName="v_limit"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDAC; - i++; + ++i; /* r/w timers */ /*! \page settings @@ -1430,49 +1430,49 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="temp_adc"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_fpga Gets the FPGA temperature. \c Returns \c EIGER,JUNGFRAU(double"°C") Others \c (int"°C") */ descrToFuncMap[i].m_pFuncName="temp_fpga"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_fpgaext Gets the external FPGA temperature. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_fpgaext"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_10ge Gets the 10Gbe temperature. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_10ge"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_dcdc Gets the temperature of the DC/DC converter. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_dcdc"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_sodl Gets the temperature of the left so-dimm memory . Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_sodl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_sodr Gets the temperature of the right so-dimm memory. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_sodr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings @@ -1480,21 +1480,21 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="adc"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_fpgal Gets the temperature of the left frontend FPGA. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_fpgafl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - temp_fpgar Gets the temperature of the right frontend FPGA. Used in EIGER only. \c Returns \c EIGER(double"°C") */ descrToFuncMap[i].m_pFuncName="temp_fpgafr"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings @@ -1502,70 +1502,70 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="i_a"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - i_b Gets the current of the power supply b on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="i_b"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - i_c Gets the current of the power supply c on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="i_c"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - i_d Gets the current of the power supply d on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="i_d"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - i_io Gets the current of the power supply io on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="i_io"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - vm_a Gets the measured voltage of the power supply a on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="vm_a"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - vm_b Gets the measured voltage of the power supply b on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="vm_b"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - vm_c Gets the measured voltage of the power supply c on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="vm_c"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - vm_d Gets the measured voltage of the power supply d on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="vm_d"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; /*! \page settings - vm_io Gets the measured voltage of the power supply io on the new chiptest board \c Returns \c (int"mV") */ descrToFuncMap[i].m_pFuncName="vm_io"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; - i++; + ++i; @@ -1581,49 +1581,49 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="outdir"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOutDir; - i++; + ++i; /*! \page output - fname [fn] Sets/gets the root of the output file name \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="fname"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; + ++i; /*! \page output - index [i] Sets/gets the current file index. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="index"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileIndex; - i++; + ++i; /*! \page output - enablefwrite [i] Enables/disables file writing. 1 enables, 0 disables. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="enablefwrite"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdEnablefwrite; - i++; + ++i; /*! \page output - overwrite [i] enables(1) /disables(0) file overwriting. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="overwrite"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOverwrite; - i++; + ++i; /*! \page output - currentfname gets the filename for the data without index and extension. MYTHEN only. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="currentfname"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; + ++i; /*! \page output - fileformat sets/gets the file format for data in receiver. Options: [ascii, binary, hdf5]. Ascii is not implemented in Receiver. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="fileformat"; //OK descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFileName; - i++; + ++i; @@ -1639,133 +1639,133 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="positions"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPositions; - i++; + ++i; /*! \page actions - startscript [s] sets/gets the script to be executed at the beginning of the acquisition. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="startscript"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - startscriptpar [s] sets/gets a string to be passed as a parameter to the startscript. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="startscriptpar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - stopscript [s] sets/gets the script to be executed at the end of the acquisition. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="stopscript"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - stopscriptpar [s] sets/gets a string to be passed as a parameter to the stopscript. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="stopscriptpar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - scriptbefore [s] sets/gets the script to be executed before starting the detector every time in the acquisition. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="scriptbefore"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - scriptbeforepar [s] sets/gets a string to be passed as a parameter to the scriptbefore. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="scriptbeforepar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - scriptafter [s] sets/gets the script to be executed after the detector has finished every time in the acquisition. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="scriptafter"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - scriptafterpar [s] sets/gets a string to be passed as a parameter to the scriptafter. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="scriptafterpar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - headerafter [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="headerafter"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - headerbefore [s] sets/gets the script to be executed for logging the detector parameters. \c none unsets. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="headerbefore"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - headerbeforepar [s] sets/gets a string to be passed as a parameter to the headerbefore script. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="headerbeforepar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - headerafterpar [s] sets/gets a string to be passed as a parameter to the headerafter script. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="headerafterpar"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - enacallog [i] enables/disables logging of the parameters necessary for the energy calibration. 1 sets, 0 unsets. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="encallog"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - angcallog [i] enables/disables logging of the parameters necessary for the angular calibration. 1 sets, 0 unsets. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="angcallog"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScripts; - i++; + ++i; /*! \page actions - scan0script [s] sets/gets the script to be executed for the scan 0 level. \c none unsets. */ descrToFuncMap[i].m_pFuncName="scan0script"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan0par [s] sets/gets a string to be passed as a parameter to the scan0script */ descrToFuncMap[i].m_pFuncName="scan0par"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan0prec [i] sets/gets number of digits to be used for the scan0 variable in the file name. */ descrToFuncMap[i].m_pFuncName="scan0prec"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan0steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan0 level and their values (float). */ descrToFuncMap[i].m_pFuncName="scan0steps"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions @@ -1773,42 +1773,42 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="scan0range"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan1script [s] sets/gets the script to be executed for the scan1 level. \c none unsets. */ descrToFuncMap[i].m_pFuncName="scan1script"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan1par [s] sets/gets a string to be passed as a parameter to the scan1script */ descrToFuncMap[i].m_pFuncName="scan1par"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan1prec [i] sets/gets number of digits to be used for the scan1 variable in the file name. */ descrToFuncMap[i].m_pFuncName="scan1prec"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan1steps [i [s0..sn-1]] sets/gets number of steps (int) of the scan1 level and their values (float). */ descrToFuncMap[i].m_pFuncName="scan1steps"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; /*! \page actions - scan1range [smin smax sstep] sets scan1 min, max and step, returns the number of steps and their values as scan1steps. */ descrToFuncMap[i].m_pFuncName="scan1range"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdScans; - i++; + ++i; @@ -1822,111 +1822,111 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="rx_hostname"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - rx_udpip [ip] sets/gets the ip address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). Used if different from eth0. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="rx_udpip"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - rx_udpmac [mac] sets/gets the mac address of the receiver UDP interface where the data from the detector will be streamed to. Normally used for single detectors (Can be multi-detector). \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="rx_udpmac"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - rx_udpport [port] sets/gets the port of the receiver UDP interface where the data from the detector will be streamed to. Use single-detector command. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="rx_udpport"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - rx_udpport2 [port] sets/gets the second port of the receiver UDP interface where the data from the second half of the detector will be streamed to. Use single-detector command. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="rx_udpport2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - detectormac [mac] sets/gets the mac address of the detector UDP interface from where the detector will stream data. Use single-detector command. Normally unused. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="detectormac"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - detectorip [ip] sets/gets the ip address of the detector UDP interface from where the detector will stream data. Use single-detector command. Keep in same subnet as rx_udpip (if rx_udpip specified). \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="detectorip"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - txndelay_left [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's left UDP port. Use single-detector command. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="txndelay_left"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - txndelay_right [delay] sets/gets the transmission delay of first packet in an image being streamed out from the detector's right UDP port. Use single-detector command. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="txndelay_right"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - txndelay_frame [delay] sets/gets the transmission frame period of entire frame being streamed out from the detector for both ports. Use single-detector command. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="txndelay_frame"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - flowcontrol_10g [delay] Enables/disables 10 GbE flow control. 1 enables, 0 disables. Used for EIGER only. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="flowcontrol_10g"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - zmqport [port] sets/gets the 0MQ (TCP) port of the receiver from where data is streamed to the client. Use single-detector command to set individually or multi-detector command to calculate based on \c port for the rest. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="zmqport"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdNetworkParameter; - i++; + ++i; /*! \page network - configuremac [i] configures the MAC of the detector with these parameters: detectorip, detectormac, rx_udpip, rx_udpmac, rx_udpport, rx_udpport2 (if applicable). This command is already included in \c rx_hsotname. Only put!. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="configuremac"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdConfigureMac; - i++; + ++i; /*! \page network - rx_tcpport [port] sets/gets the port of the client-receiver TCP interface. Use single-detector command. Is different for each detector if same \c rx_hostname used. Must be first command to communicate with receiver. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="rx_tcpport"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; + ++i; /*! \page network - port [port] sets/gets the port of the client-detector control server TCP interface. Use single-detector command. Default value is 1952 for all detectors. Normally not changed. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="port"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; + ++i; /*! \page network - stopport [port] sets/gets the port of the client-detector stop server TCP interface. Use single-detector command. Default value is 1953 for all detectors. Normally not changed. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="stopport"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPort; - i++; + ++i; /*! \page network @@ -1934,14 +1934,14 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="lock"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLock; - i++; + ++i; /*! \page network - lastclient Gets the last client communicating with the detector. Cannot put!. \c Returns \c (string) */ descrToFuncMap[i].m_pFuncName="lastclient"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLastClient; - i++; + ++i; @@ -1967,21 +1967,21 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="receiver"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /*! \page receiver - r_online [i] sets/gets the receiver in online/offline mode. 1 is online, 0 is offline. Get is from shared memory. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="r_online"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline; - i++; + ++i; /*! \page receiver - r_checkonline Checks the receiver if it is online/offline mode. Only get! \c Returns (string) "All online" or "[list of offline hostnames] : Not online". */ descrToFuncMap[i].m_pFuncName="r_checkonline"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdOnline; - i++; + ++i; /*! \page receiver @@ -1989,49 +1989,49 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="framescaught"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /*! \page receiver - resetframescaught [i] resets the number of frames caught to 0. i can be any number. Use this if using status start, instead of acquire (this command is included). Only put! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="resetframescaught"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /*! \page receiver - frameindex [i] gets the current frame index of receiver. Average of all for multi-detector command. Only get! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="frameindex"; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /*! \page receiver - r_lock [i] locks/unlocks the receiver to communicate with only this client. 1 locks, 0 unlocks. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="r_lock"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLock; - i++; + ++i; /*! \page receiver - r_lastclient gets the last client communicating with the receiver. Only get! \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="r_lastclient"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdLastClient; - i++; + ++i; /*! \page receiver - r_readfreq [i] sets/gets the stream frequency of data from receiver to client. i > 0 is the nth frame being streamed. 0 sets frequency to a default timer (200ms). \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="r_readfreq"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; /*! \page receiver - rx_fifodepth [i] sets/gets receiver fifo (between Listener and Writer Threads) depth to i number of frames. Can improve listener packet loss (loss due to packet processing time in Listener threads), not if limited by writing. \c Returns \c (int) */ descrToFuncMap[i].m_pFuncName="rx_fifodepth"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdReceiver; - i++; + ++i; @@ -2046,140 +2046,140 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { */ descrToFuncMap[i].m_pFuncName="adcinvert"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - adcdisable [mask] Sets/gets ADC disable mask (8 digits hex format) */ descrToFuncMap[i].m_pFuncName="adcdisable"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - pattern fn loads binary pattern file fn */ descrToFuncMap[i].m_pFuncName="pattern"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patword addr [word] sets/gets 64 bit word at address addr of pattern memory. Both address and word in hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patword"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patioctrl [word] sets/gets 64 bit mask defining input (0) and output (1) signals. hex format. */ descrToFuncMap[i].m_pFuncName="patioctrl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patclkctrl [word] sets/gets 64 bit mask defining if output signal is a clock and runs. hex format. Unused at the moment. */ descrToFuncMap[i].m_pFuncName="patclkctrl"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patlimits [addr1 addr2] sets/gets the start and stop limits of the pattern to be executed. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patlimits"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patloop0 [addr1 addr2] sets/gets the start and stop limits of the level 0 loop. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patloop0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patnloop0 [n] sets/gets the number of cyclesof the level 0 loop (int). */ descrToFuncMap[i].m_pFuncName="patnloop0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwait0 [addr] sets/gets the address of the level 0 wait point. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patwait0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwaittime0 [n] sets/gets the duration of the witing of the 0 waiting point in clock cycles (int). */ descrToFuncMap[i].m_pFuncName="patwaittime0"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patloop1 [addr1 addr2] sets/gets the start and stop limits of the level 1 loop. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patloop1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patnloop1 [n] sets/gets the number of cyclesof the level 1 loop (int). */ descrToFuncMap[i].m_pFuncName="patnloop1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwait1 [addr] sets/gets the address of the level 1 wait point. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patwait1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwaittime1 [n] sets/gets the duration of the witing of the 1 waiting point in clock cycles (int). */ descrToFuncMap[i].m_pFuncName="patwaittime1"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patloop2 [addr1 addr2] sets/gets the start and stop limits of the level 2 loop. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patloop2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patnloop2 [n] sets/gets the number of cyclesof the level 2 loop (int). */ descrToFuncMap[i].m_pFuncName="patnloop2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwait2 [addr] sets/gets the address of the level 2 wait point. hex format. Advanced! */ descrToFuncMap[i].m_pFuncName="patwait2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - patwaittime2 [n] sets/gets the duration of the waiting of the 2 waiting point in clock cycles (int). */ descrToFuncMap[i].m_pFuncName="patwaittime2"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; /*! \page ctb - dut_clk [i] sets/gets the signal to be used as a clock for the digital data coming from the device under test. Advanced! */ descrToFuncMap[i].m_pFuncName="dut_clk"; // descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdPattern; - i++; + ++i; @@ -2624,7 +2624,7 @@ string slsDetectorCommand::cmdHostname(int narg, char *args[], int action){ //add by type if (ivar==-1) { strcpy(hostname,""); - for (int id=1; id2) strcat(hostname,"+"); @@ -2640,7 +2640,7 @@ string slsDetectorCommand::cmdHostname(int narg, char *args[], int action){ //add by hostname if (ivar==-1) { strcpy(hostname,""); - for (int id=1; id2) strcat(hostname,"+"); @@ -2906,7 +2906,7 @@ string slsDetectorCommand::cmdTrimEn(int narg, char *args[], int action){ if (action==PUT_ACTION) { if (sscanf(args[1],"%d",&ival)) { int pos[ival]; - for (ip=0; ipgetTrimEn(opos); - for (int ip=0; ipgetPositions(opos); - for (int ip=0; ip=(i+2)) { if (sscanf(args[i+2],"%lf",values+i)) - ns++; + ++ns; else break; } else @@ -3746,7 +3746,7 @@ string slsDetectorCommand::cmdScans(int narg, char *args[], int action) { int p=myDet->getScanPrecision(is); char format[1000]; sprintf(format, "%%s %%0.%df",p); - for (int i=0; iMAX_SCAN_STEPS) return string("too many steps required!"); @@ -3800,7 +3800,7 @@ string slsDetectorCommand::cmdScans(int narg, char *args[], int action) { values=new double[ns]; - for (int i=0; isetScanSteps(is, ns, values); @@ -3814,7 +3814,7 @@ string slsDetectorCommand::cmdScans(int narg, char *args[], int action) { char format[1000]; sprintf(format, "%%s %%0.%df",p); sprintf(answer,"%d ",ns); - for (int i=0; isetROI(val,allroi); @@ -6515,12 +6515,12 @@ string slsDetectorCommand::cmdPattern(int narg, char *args[], int action) { //int mask=1; int ii=0; while (ii<32) { - nroi++; + ++nroi; roiLimits[nroi-1].xmin=ii; roiLimits[nroi-1].ymin=0; roiLimits[nroi-1].ymax=0; while ((addr&(1<=32) break; } @@ -6532,14 +6532,14 @@ string slsDetectorCommand::cmdPattern(int narg, char *args[], int action) { } roiLimits[nroi-1].xmin=ii; while ((addr&(1<=32) break; } roiLimits[nroi-1].xmax=ii-1; if (ii>=32) { cout << "ROI "<< nroi << " xmin "<xmin<< " xmax "<< (aa+iroi)->xmax<< endl; - for (int ich=(aa+iroi)->xmin; ich<=(aa+iroi)->xmax; ich++) { + for (int ich=(aa+iroi)->xmin; ich<=(aa+iroi)->xmax; ++ich) { reg&=~(1<