mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
adding conf gain member to sls detector and change a bit in setSettings to read this back
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@60 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -2567,7 +2567,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
||||
|
||||
|
||||
|
||||
detectorSettings slsDetector::setSettings( detectorSettings isettings, int imod){
|
||||
detectorSettings slsDetector::setSettings( detectorSettings isettings, int imod){
|
||||
#ifdef VERBOSE
|
||||
std::cout<< "slsDetector setSettings "<< std::endl;
|
||||
#endif
|
||||
@ -2578,7 +2578,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
||||
detectorSettings minsettings, maxsettings;
|
||||
|
||||
switch(thisDetector->myDetectorType){
|
||||
case GOTTHARD:
|
||||
case GOTTHARD:
|
||||
minsettings = HIGHGAIN;
|
||||
maxsettings = GAIN3;
|
||||
break;
|
||||
@ -2638,13 +2638,11 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
||||
#ifdef VERBOSE
|
||||
std::cout<< thisDetector->settingsDir<<endl<< thisDetector->calDir <<endl;
|
||||
#endif
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
ostfn << thisDetector->settingsDir << ssettings <<"/noise.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);
|
||||
|
||||
settingsfname=ostfn.str();
|
||||
#ifdef VERBOSE
|
||||
cout << "the settings name is "<<settingsfname << endl;
|
||||
@ -2678,19 +2676,24 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
||||
setModule(*myMod);
|
||||
}
|
||||
}
|
||||
//all mods set gain here
|
||||
setDAC(thisDetector->confGain,G_CONF_GAIN);
|
||||
|
||||
}
|
||||
}
|
||||
deleteModule(myMod);
|
||||
/*
|
||||
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
||||
int isett=getSettings(imod);
|
||||
float t[]=defaultTDead;
|
||||
if (isett>-1 && isett<3) {
|
||||
thisDetector->tDead=t[isett];
|
||||
switch(thisDetector->myDetectorType){
|
||||
case GOTTHARD:
|
||||
break;
|
||||
default:
|
||||
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
||||
int isett=getSettings(imod);
|
||||
float t[]=defaultTDead;
|
||||
if (isett>-1 && isett<3) {
|
||||
thisDetector->tDead=t[isett];
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return getSettings(imod);
|
||||
};
|
||||
|
||||
|
@ -149,10 +149,6 @@ typedef struct sharedSlsDetector {
|
||||
|
||||
/** is the hostname (or IP address) of the detector. needs to be set before startin the communication */
|
||||
char hostname[MAX_STR_LENGTH];
|
||||
/** is the ip address of the client for gotthard to send data to **/
|
||||
char clientIPAddress[MAX_STR_LENGTH];
|
||||
/** is the mac address of the client for gotthard to send data to **/
|
||||
char clientMacAddress[MAX_STR_LENGTH];
|
||||
|
||||
/** is the port used for control functions normally it should not be changed*/
|
||||
int controlPort;
|
||||
@ -303,6 +299,16 @@ typedef struct sharedSlsDetector {
|
||||
/** memory offsets for the channel register arrays */
|
||||
int chanoff;
|
||||
|
||||
|
||||
/*extra gotthard members*/
|
||||
/** is the ip address of the client for gotthard; read from settings file **/
|
||||
char clientIPAddress[MAX_STR_LENGTH];
|
||||
/** is the mac address of the client for gotthard; read from settings file **/
|
||||
char clientMacAddress[MAX_STR_LENGTH];
|
||||
/** gain for gotthard read from settings file**/
|
||||
int confGain;
|
||||
|
||||
|
||||
} sharedSlsDetector;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user