mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-14 22:07:12 +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:
@ -254,7 +254,7 @@ enum dacIndex {
|
|||||||
VDD_POT, /**< chiptest board power supply vdd */
|
VDD_POT, /**< chiptest board power supply vdd */
|
||||||
VSH_POT, /**< chiptest board power supply vsh */
|
VSH_POT, /**< chiptest board power supply vsh */
|
||||||
VIO_POT, /**< chiptest board power supply va */
|
VIO_POT, /**< chiptest board power supply va */
|
||||||
HV_POT, /**< Gotthard, chiptest board high voltage */
|
HV_POT, /**< gotthard, chiptest board high voltage */
|
||||||
G_VREF_DS, /**< gotthard */
|
G_VREF_DS, /**< gotthard */
|
||||||
G_VCASCN_PB, /**< gotthard */
|
G_VCASCN_PB, /**< gotthard */
|
||||||
G_VCASCP_PB, /**< gotthard */
|
G_VCASCP_PB, /**< gotthard */
|
||||||
@ -262,7 +262,8 @@ enum dacIndex {
|
|||||||
G_VCASC_OUT, /**< gotthard */
|
G_VCASC_OUT, /**< gotthard */
|
||||||
G_VIN_CM, /**< gotthard */
|
G_VIN_CM, /**< gotthard */
|
||||||
G_VREF_COMP, /**< gotthard */
|
G_VREF_COMP, /**< gotthard */
|
||||||
G_IB_TESTC /**< gotthard */
|
G_IB_TESTC, /**< gotthard */
|
||||||
|
G_CONF_GAIN /**< gotthard gain for the dacs */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -402,7 +402,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
|
|||||||
idac++;
|
idac++;
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------config---------------
|
//---------------gain---------------
|
||||||
getline(infile,str);
|
getline(infile,str);
|
||||||
iline++;
|
iline++;
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
@ -413,7 +413,7 @@ int gotthardDetector::retrieveDetectorSetup(string fname1, int level){
|
|||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
std::cout<< sargname << " is " << ival << std::endl;
|
std::cout<< sargname << " is " << ival << std::endl;
|
||||||
#endif
|
#endif
|
||||||
int configval = ival;//myMod->dacs[idac]=ival;
|
thisDetector->confGain = ival;
|
||||||
|
|
||||||
//---------------mac address----------
|
//---------------mac address----------
|
||||||
getline(infile,str);
|
getline(infile,str);
|
||||||
|
@ -2643,8 +2643,6 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
|||||||
ostfn << thisDetector->settingsDir << ssettings <<"/noise.sn" << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10);
|
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);
|
||||||
}
|
}
|
||||||
//oscfn << thisDetector->calDir << ssettings << "/calibration.sn" << setfill('0') << setw(3) << hex << getId(MODULE_SERIAL_NUMBER, im) << setbase(10);
|
|
||||||
|
|
||||||
settingsfname=ostfn.str();
|
settingsfname=ostfn.str();
|
||||||
#ifdef VERBOSE
|
#ifdef VERBOSE
|
||||||
cout << "the settings name is "<<settingsfname << endl;
|
cout << "the settings name is "<<settingsfname << endl;
|
||||||
@ -2678,10 +2676,16 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
|||||||
setModule(*myMod);
|
setModule(*myMod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//all mods set gain here
|
||||||
|
setDAC(thisDetector->confGain,G_CONF_GAIN);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
deleteModule(myMod);
|
deleteModule(myMod);
|
||||||
/*
|
switch(thisDetector->myDetectorType){
|
||||||
|
case GOTTHARD:
|
||||||
|
break;
|
||||||
|
default:
|
||||||
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
if (thisDetector->correctionMask&(1<<RATE_CORRECTION)) {
|
||||||
int isett=getSettings(imod);
|
int isett=getSettings(imod);
|
||||||
float t[]=defaultTDead;
|
float t[]=defaultTDead;
|
||||||
@ -2689,8 +2693,7 @@ int slsDetector::setThresholdEnergy(int e_eV, int imod, detectorSettings isetti
|
|||||||
thisDetector->tDead=t[isett];
|
thisDetector->tDead=t[isett];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
}
|
||||||
|
|
||||||
return getSettings(imod);
|
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 */
|
/** is the hostname (or IP address) of the detector. needs to be set before startin the communication */
|
||||||
char hostname[MAX_STR_LENGTH];
|
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*/
|
/** is the port used for control functions normally it should not be changed*/
|
||||||
int controlPort;
|
int controlPort;
|
||||||
@ -303,6 +299,16 @@ typedef struct sharedSlsDetector {
|
|||||||
/** memory offsets for the channel register arrays */
|
/** memory offsets for the channel register arrays */
|
||||||
int chanoff;
|
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;
|
} sharedSlsDetector;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user