mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-24 23:30:03 +02:00
Merge branch 'master' of gitorious.psi.ch:sls_det_software/sls_detector_software
This commit is contained in:
commit
faca56f2e3
@ -1027,7 +1027,7 @@ int Feb_Control_SetTrimbits(unsigned int module_num, unsigned int *trimbits){
|
||||
for(i=0;i<8;i++){ // column loop i
|
||||
//printf("i:%d\t\t",i);
|
||||
|
||||
if(Module_TopAddressIsValid(&modules[0])){
|
||||
if(Module_TopAddressIsValid(&modules[1])){
|
||||
trimbits_to_load_l[offset+chip_sc] |= ( 0x7 & trimbits[row_set*16480+super_column_start_position_l+i])<<((7-i)*4);//low
|
||||
trimbits_to_load_l[offset+chip_sc+32] |= ((0x38 & trimbits[row_set*16480+super_column_start_position_l+i])>>3)<<((7-i)*4);//upper
|
||||
trimbits_to_load_r[offset+chip_sc] |= ( 0x7 & trimbits[row_set*16480+super_column_start_position_r+i])<<((7-i)*4);//low
|
||||
@ -1043,7 +1043,7 @@ int Feb_Control_SetTrimbits(unsigned int module_num, unsigned int *trimbits){
|
||||
} //end supercolumn loop sc
|
||||
} //end row loop
|
||||
|
||||
if(Module_TopAddressIsValid(&modules[0])){
|
||||
if(Module_TopAddressIsValid(&modules[1])){
|
||||
if(!Feb_Interface_WriteMemoryInLoops(Module_GetTopLeftAddress(&modules[Feb_Control_current_index]),0,0,1024,trimbits_to_load_r)||
|
||||
!Feb_Interface_WriteMemoryInLoops(Module_GetTopRightAddress(&modules[Feb_Control_current_index]),0,0,1024,trimbits_to_load_l)||
|
||||
//if(!Feb_Interface_WriteMemory(Module_GetTopLeftAddress(&modules[0]),0,0,1023,trimbits_to_load_r)||
|
||||
|
Binary file not shown.
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/eigerDetectorServer
|
||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/eigerDetectorServer
|
||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repsitory UUID: ce7cd6255b7b3abf1c046e9703ae8288ec55135a
|
||||
Revision: 97
|
||||
Branch: master
|
||||
Repsitory UUID: eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3
|
||||
Revision: 107
|
||||
Branch: gemma
|
||||
Last Changed Author: Maliakal_Dhanya
|
||||
Last Changed Rev: 282
|
||||
Last Changed Date: 2014-10-16 13:49:56 +0200
|
||||
Last Changed Rev: 288
|
||||
Last Changed Date: 2014-12-08 10:16:31 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/eigerDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "ce7cd6255b7b3abf1c046e9703ae8288ec55135a"
|
||||
//#define SVNREV 0x282
|
||||
#define SVNREPUUID "eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3"
|
||||
//#define SVNREV 0x288
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Maliakal_Dhanya"
|
||||
#define SVNREV 0x282
|
||||
#define SVNDATE 0x20141016
|
||||
#define SVNREV 0x288
|
||||
#define SVNDATE 0x20141208
|
||||
//
|
||||
|
@ -51,7 +51,9 @@ unsigned int nimages_per_request=1;
|
||||
int on_dst=0;
|
||||
int dst_requested[32] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
|
||||
int default_dac_values[16] = {0,2000,2000,1250,700,1278,500,500,2000,500,500,550,550,100,1000,775};
|
||||
//char Module_dac_names[16][10]= {"SvP","Vtr","Vrf","Vrs","SvN","Vtgstv","Vcmp_ll","Vcmp_lr","cal","Vcmp_rl","rxb_rb","rxb_lb","Vcmp_rr","Vcp","Vcn","Vis"};;
|
||||
|
||||
int default_dac_values[16] = {0,2480,3300,1400,4000,2556,1000,1000,4000,1000,1000,1000,1000,200,2000,1550};
|
||||
|
||||
|
||||
enum masterFlags masterMode=NO_MASTER;
|
||||
@ -141,7 +143,11 @@ int initDetector(){
|
||||
Feb_Control_CheckSetup();
|
||||
|
||||
//top or bottom
|
||||
bottom = Feb_Control_IsBottomModule();
|
||||
//bottom = Feb_Control_IsBottomModule();
|
||||
if(getDetectorNumber()==0xbeb031)
|
||||
bottom = 0;
|
||||
else bottom = 1;
|
||||
|
||||
if(bottom)
|
||||
printf("BOTTOM ***************\n");
|
||||
else
|
||||
@ -478,7 +484,7 @@ enum detectorSettings setSettings(enum detectorSettings sett, int imod){
|
||||
|
||||
int startReceiver(int d){
|
||||
//if(trialMasterMode == IS_MASTER)
|
||||
//if(!bottom)
|
||||
if(!bottom)
|
||||
Feb_Control_PrepareForAcquisition();
|
||||
return OK;
|
||||
}
|
||||
@ -487,10 +493,10 @@ int startReceiver(int d){
|
||||
int startStateMachine(){
|
||||
int ret;int i=0;
|
||||
//if(trialMasterMode == IS_MASTER){
|
||||
//if(!bottom){
|
||||
if(!bottom){
|
||||
printf("Going to start acquisition\n");
|
||||
Feb_Control_StartAcquisition();
|
||||
//}
|
||||
}
|
||||
|
||||
//do not read status here, cannot get images then
|
||||
|
||||
@ -499,8 +505,9 @@ int ret;int i=0;
|
||||
ret = startReadOut();
|
||||
////}
|
||||
//if(trialMasterMode == IS_MASTER){
|
||||
//if(!bottom){
|
||||
|
||||
|
||||
if(!bottom){
|
||||
/*
|
||||
if(getRunStatus() == IDLE){
|
||||
for(i=0;i<100000;i++){
|
||||
@ -521,7 +528,7 @@ int ret;int i=0;
|
||||
printf("*****Acquiring...\n");
|
||||
|
||||
|
||||
//}
|
||||
}
|
||||
/*else usleep(1000000);
|
||||
printf("****Returning\n");*/
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware
|
||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repsitory UUID: ce7cd6255b7b3abf1c046e9703ae8288ec55135a
|
||||
Revision: 865
|
||||
Branch: master
|
||||
Repsitory UUID: eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3
|
||||
Revision: 882
|
||||
Branch: gemma
|
||||
Last Changed Author: Maliakal_Dhanya
|
||||
Last Changed Rev: 865
|
||||
Last Changed Date: 2014-10-16 13:49:56 +0200
|
||||
Last Changed Rev: 882
|
||||
Last Changed Date: 2014-12-08 10:16:31 +0100
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer
|
||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/gotthardDetectorServer
|
||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repsitory UUID: ce7cd6255b7b3abf1c046e9703ae8288ec55135a
|
||||
Revision: 175
|
||||
Branch: master
|
||||
Repsitory UUID: eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3
|
||||
Revision: 177
|
||||
Branch: gemma
|
||||
Last Changed Author: Maliakal_Dhanya
|
||||
Last Changed Rev: 282
|
||||
Last Changed Date: 2014-10-16 13:49:56 +0200
|
||||
Last Changed Rev: 288
|
||||
Last Changed Date: 2014-12-08 10:16:31 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/gotthardDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "ce7cd6255b7b3abf1c046e9703ae8288ec55135a"
|
||||
//#define SVNREV 0x282
|
||||
#define SVNREPUUID "eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3"
|
||||
//#define SVNREV 0x288
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Maliakal_Dhanya"
|
||||
#define SVNREV 0x282
|
||||
#define SVNDATE 0x20141016
|
||||
#define SVNREV 0x288
|
||||
#define SVNDATE 0x20141208
|
||||
//
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/moenchDetectorServer
|
||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/moenchDetectorServer
|
||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repsitory UUID: ce7cd6255b7b3abf1c046e9703ae8288ec55135a
|
||||
Revision: 62
|
||||
Branch: master
|
||||
Repsitory UUID: eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3
|
||||
Revision: 64
|
||||
Branch: gemma
|
||||
Last Changed Author: Maliakal_Dhanya
|
||||
Last Changed Rev: 282
|
||||
Last Changed Date: 2014-10-16 13:49:56 +0200
|
||||
Last Changed Rev: 288
|
||||
Last Changed Date: 2014-12-08 10:16:31 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/moenchDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "ce7cd6255b7b3abf1c046e9703ae8288ec55135a"
|
||||
//#define SVNREV 0x282
|
||||
#define SVNREPUUID "eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3"
|
||||
//#define SVNREV 0x288
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Maliakal_Dhanya"
|
||||
#define SVNREV 0x282
|
||||
#define SVNDATE 0x20141016
|
||||
#define SVNREV 0x288
|
||||
#define SVNDATE 0x20141208
|
||||
//
|
||||
|
@ -376,32 +376,33 @@ void multiSlsDetector::updateOffsets(){
|
||||
|
||||
for (int i=1; i<thisMultiDetector->numberOfDetectors; i++) {
|
||||
if (detectors[i]) {
|
||||
//incrementing in x direction
|
||||
if ((maxChanX == -1) || ((maxChanX > 0) && ((offsetX + numX) < maxChanX))){
|
||||
offsetX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
maxX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
numX += detectors[i]->getTotalNumberOfChannels(X);
|
||||
//incrementing in y direction
|
||||
if ((maxChanY == -1) || ((maxChanY > 0) && ((offsetY + numY) < maxChanY))){
|
||||
offsetY += detectors[i]->getMaxNumberOfChannels(Y);
|
||||
maxY += detectors[i]->getMaxNumberOfChannels(Y);
|
||||
numY += detectors[i]->getTotalNumberOfChannels(Y);
|
||||
}
|
||||
//incrementing in y direction
|
||||
else{
|
||||
offsetX = 0;
|
||||
numX = 0;
|
||||
maxX = 0;
|
||||
thisMultiDetector->maxNumberOfChannel[X] = 0;
|
||||
offsetY += detectors[i]->getMaxNumberOfChannels(Y);
|
||||
if ((maxChanY == -1) || ((maxChanY > 0) && (offsetY <= maxChanY))){
|
||||
numY += detectors[i]->getTotalNumberOfChannels(Y);
|
||||
maxY += detectors[i]->getMaxNumberOfChannels(Y);
|
||||
offsetY = 0;
|
||||
numY = 0;
|
||||
maxY = 0;
|
||||
thisMultiDetector->maxNumberOfChannel[Y] = 0;
|
||||
if ((maxChanX == -1) || ((maxChanX > 0) && (offsetX <= maxChanX))){
|
||||
offsetX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
numX += detectors[i]->getTotalNumberOfChannels(X);
|
||||
maxX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
}else{
|
||||
cout<<"Detector at position " << i << "exceeds maximum channels allowed for complete detector set in y dimension also!" << endl;
|
||||
numY += detectors[i]->getTotalNumberOfChannels(Y);
|
||||
maxY += detectors[i]->getMaxNumberOfChannels(Y);
|
||||
offsetX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
numX += detectors[i]->getTotalNumberOfChannels(X);
|
||||
maxX += detectors[i]->getMaxNumberOfChannels(X);
|
||||
cout<<"Detector at position " << i << "exceeds maximum channels allowed for complete detector set in X dimension also!" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
thisMultiDetector->offsetX[i] = offsetX;
|
||||
thisMultiDetector->offsetY[i] = offsetY;
|
||||
cout << "Detector at position: " << i << " x offset:" << thisMultiDetector->offsetX[i] << " y offset:" << thisMultiDetector->offsetY[i] << endl;
|
||||
cout << "Detector at position" << i << ": x offset:" << thisMultiDetector->offsetX[i] << " y offset:" << thisMultiDetector->offsetY[i] << endl;
|
||||
if(numX > thisMultiDetector->numberOfChannel[X])
|
||||
thisMultiDetector->numberOfChannel[X] = numX;
|
||||
if(numY > thisMultiDetector->numberOfChannel[Y])
|
||||
@ -4539,11 +4540,17 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
||||
}
|
||||
|
||||
int n;
|
||||
int i,k,offsetX, offsetY, maxX, maxY;;
|
||||
int* retval=new int[nel];
|
||||
int *retdet, *p=retval;
|
||||
string fullFName="";
|
||||
string ext="";
|
||||
|
||||
if(getDetectorsType() == EIGER){
|
||||
maxX = thisMultiDetector->numberOfChannel[X];
|
||||
maxY = thisMultiDetector->numberOfChannel[Y];
|
||||
}
|
||||
|
||||
|
||||
for (int id=0; id<thisMultiDetector->numberOfDetectors; id++) {
|
||||
if (detectors[id]) {
|
||||
@ -4552,9 +4559,20 @@ int* multiSlsDetector::readFrameFromReceiver(char* fName, int &fIndex){
|
||||
setErrorMask(getErrorMask()|(1<<id));
|
||||
if (retdet) {
|
||||
n=detectors[id]->getDataBytes();
|
||||
memcpy(p,retdet,n);
|
||||
|
||||
if(getDetectorsType() == EIGER){
|
||||
k=detectors[id]->getMaxNumberOfChannels(X)*2;/**bit mode*/
|
||||
offsetY = ((maxY - (thisMultiDetector->offsetY[id] + detectors[id]->getMaxNumberOfChannels(Y))) * maxX)*2;/**bit mode*/
|
||||
offsetX = thisMultiDetector->offsetX[id]*2;
|
||||
for(i=0; i< 256;i++){
|
||||
memcpy((((char*)p) + offsetY + offsetX + (i*maxX*2)/**bit mode*/) ,(((char*)retdet) + (i*k)),k);
|
||||
}
|
||||
}
|
||||
else{
|
||||
memcpy(p,retdet,n);
|
||||
p+=n/sizeof(int);
|
||||
}
|
||||
delete [] retdet;
|
||||
p+=n/sizeof(int);
|
||||
//concatenate filenames
|
||||
if(!fullFName.length()){
|
||||
fullFName.assign(fileIO::getFileName());
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/mythenDetectorServer
|
||||
URL: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/mythenDetectorServer
|
||||
Repository Root: origin git@gitorious.psi.ch:sls_det_software/sls_detector_software.git
|
||||
Repsitory UUID: ce7cd6255b7b3abf1c046e9703ae8288ec55135a
|
||||
Revision: 91
|
||||
Branch: master
|
||||
Repsitory UUID: eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3
|
||||
Revision: 93
|
||||
Branch: gemma
|
||||
Last Changed Author: Maliakal_Dhanya
|
||||
Last Changed Rev: 282
|
||||
Last Changed Date: 2014-10-16 13:49:56 +0200
|
||||
Last Changed Rev: 288
|
||||
Last Changed Date: 2014-12-08 10:16:31 +0100
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURL "git@gitorious.psi.ch:sls_det_software/sls_detector_software.git/mythenDetectorServer"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "ce7cd6255b7b3abf1c046e9703ae8288ec55135a"
|
||||
//#define SVNREV 0x282
|
||||
#define SVNREPUUID "eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3"
|
||||
//#define SVNREV 0x288
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "Maliakal_Dhanya"
|
||||
#define SVNREV 0x282
|
||||
#define SVNDATE 0x20141016
|
||||
#define SVNREV 0x288
|
||||
#define SVNDATE 0x20141208
|
||||
//
|
||||
|
@ -1,11 +1,11 @@
|
||||
//#define SVNPATH ""
|
||||
#define SVNURLLIB "git@gitorious.psi.ch:sls_det_software/sls_detector_software.git"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUIDLIB "ce7cd6255b7b3abf1c046e9703ae8288ec55135a"
|
||||
//#define SVNREV 0x865
|
||||
#define SVNREPUUIDLIB "eff6ffc4c32edd46844d2cd1670cd4d4e7d05ca3"
|
||||
//#define SVNREV 0x882
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTHLIB "Maliakal_Dhanya"
|
||||
#define SVNREVLIB 0x865
|
||||
#define SVNDATELIB 0x20141016
|
||||
#define SVNREVLIB 0x882
|
||||
#define SVNDATELIB 0x20141208
|
||||
//
|
||||
|
@ -472,7 +472,7 @@ void* postProcessing::processData(int delflag) {
|
||||
|
||||
//if nth frame
|
||||
if(nthframe){
|
||||
newData = true;
|
||||
/*newData = true;//unnecessary to read every data, 09.12.2014**/
|
||||
//and no gui
|
||||
if(!dataReady){
|
||||
std::cout << "Error: receiver read freq is set to " << nthframe << " but should be > 0 only when using gui." << std::endl;
|
||||
@ -543,7 +543,7 @@ void* postProcessing::processData(int delflag) {
|
||||
delete thisData;
|
||||
fdata = NULL;
|
||||
progress = currentfIndex;
|
||||
if(!nthframe)
|
||||
/*if(!nthframe) //unnecessary to read every data, 09.12.2014**/
|
||||
newData = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user