changed number of adcs to be 0 for eiger and a temporary chan chip trimbit for setsettings

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@614 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2013-06-19 09:33:10 +00:00
parent 157292ac68
commit b661b37b03

View File

@ -542,7 +542,7 @@ int slsDetector::initializeDetectorSize(detectorType type) {
thisDetector->nChip[X]=4; thisDetector->nChip[X]=4;
thisDetector->nChip[Y]=1; thisDetector->nChip[Y]=1;
thisDetector->nDacs=16; thisDetector->nDacs=16;
thisDetector->nAdcs=1; thisDetector->nAdcs=0;
thisDetector->nModMax[X]=1; thisDetector->nModMax[X]=1;
thisDetector->nModMax[Y]=1; thisDetector->nModMax[Y]=1;
thisDetector->dynamicRange=16; thisDetector->dynamicRange=16;
@ -833,11 +833,11 @@ slsDetectorDefs::sls_detector_module* slsDetector::createModule(detectorType t)
na=5; na=5;
break; break;
case EIGER: case EIGER:
nch=65536; // one EIGER half module nch=256*256; // one EIGER half module
nm=1; //modules/detector nm=1; //modules/detector
nc=4; //chips nc=4*1; //chips
nd=16; //dacs nd=16; //dacs
na=16; na=0;
break; break;
case MOENCH: case MOENCH:
nch=160*160; nch=160*160;
@ -1093,7 +1093,6 @@ string slsDetector::checkOnline() {
int slsDetector::setTCPSocket(string const name, int const control_port, int const stop_port){ int slsDetector::setTCPSocket(string const name, int const control_port, int const stop_port){
char thisName[MAX_STR_LENGTH]; char thisName[MAX_STR_LENGTH];
int thisCP, thisSP; int thisCP, thisSP;
int retval=OK; int retval=OK;
@ -1172,7 +1171,6 @@ int slsDetector::setTCPSocket(string const name, int const control_port, int con
std::cout<< "Stop socket connected " << thisName << " " << thisSP << std::endl; std::cout<< "Stop socket connected " << thisName << " " << thisSP << std::endl;
#endif #endif
} }
if (retval!=FAIL) { if (retval!=FAIL) {
checkOnline(); checkOnline();
} else { } else {
@ -2489,7 +2487,6 @@ int slsDetector::setModule(sls_detector_module module){
std::cout << "slsDetector set module " << std::endl; std::cout << "slsDetector set module " << std::endl;
#endif #endif
if (thisDetector->onlineFlag==ONLINE_FLAG) { if (thisDetector->onlineFlag==ONLINE_FLAG) {
if (connectControl() == OK){ if (connectControl() == OK){
controlSocket->SendDataOnly(&fnum,sizeof(fnum)); controlSocket->SendDataOnly(&fnum,sizeof(fnum));
@ -2803,6 +2800,7 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise
int modmi=imod, modma=imod+1, im=imod; int modmi=imod, modma=imod+1, im=imod;
string settingsfname, calfname; string settingsfname, calfname;
string ssettings; string ssettings;
int ichip,ichan,nch;
switch (isettings) { switch (isettings) {
case STANDARD: case STANDARD:
@ -2879,7 +2877,16 @@ slsDetectorDefs::detectorSettings slsDetector::setSettings( detectorSettings ise
case EIGER: case EIGER:
ostfn << thisDetector->settingsDir << ssettings <<"/settings.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10); ostfn << thisDetector->settingsDir << ssettings <<"/settings.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10);
oscfn << thisDetector->calDir << ssettings << "/calibration.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10); oscfn << thisDetector->calDir << ssettings << "/calibration.sn";// << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10);
//add the trimbits binary file
//add the trimbits binary file - temp solution
nch=((myMod->nchan)/(myMod->nchip));
for (ichip=0; ichip<myMod->nchip; ichip++) {
myMod->chipregs[ichip]=0;
for (ichan=0; ichan<nch; ichan++){
myMod->chanregs[ichip*nch+ichan]=0;
}
}
break; break;
case MOENCH: case MOENCH:
case GOTTHARD: case GOTTHARD: