From a154d0a0886ff37dc6736ce39b3a7148ac36290c Mon Sep 17 00:00:00 2001 From: Dhanya Thattil Date: Wed, 23 May 2018 16:39:52 +0200 Subject: [PATCH] slsDetectorUsers: added setthreshold without trimbits for eiger --- slsDetectorSoftware/slsDetector/slsDetectorBase.h | 1 + slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp | 4 ++++ slsDetectorSoftware/slsDetector/slsDetectorUsers.h | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/slsDetectorSoftware/slsDetector/slsDetectorBase.h b/slsDetectorSoftware/slsDetector/slsDetectorBase.h index c2c47af43..1f49eb2ef 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorBase.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorBase.h @@ -518,6 +518,7 @@ class slsDetectorBase : public virtual slsDetectorDefs, public virtual errorDef virtual int setThresholdEnergy(int e_eV, int imod, detectorSettings isettings=GET_SETTINGS, int tb=1)=0; int setThresholdEnergy(int e_eV){return setThresholdEnergy(e_eV,-1);}; + int setThresholdEnergy(int e_ev, int tb, int isettings, int id){return setThresholdEnergy(e_ev, id, (detectorSettings)isettings, tb);} /** diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp index 6e3f58e42..475358643 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.cpp @@ -151,6 +151,10 @@ int slsDetectorUsers::setThresholdEnergy(int e_eV){ return myDetector->setThresholdEnergy(e_eV); } +int slsDetectorUsers::setThresholdEnergy(int e_ev, int tb, int isettings, int id) { + return myDetector->slsDetectorBase::setThresholdEnergy(e_ev, tb, isettings, id); +} + double slsDetectorUsers::setExposureTime(double t, bool inseconds){ int64_t tms = (int64_t)(t * (1E+9)); if (t < 0) tms = -1; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h index bf1e980c9..a2629e05b 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorUsers.h +++ b/slsDetectorSoftware/slsDetector/slsDetectorUsers.h @@ -310,6 +310,16 @@ class slsDetectorUsers */ int setThresholdEnergy(int e_eV); + /** + @short set threshold energy with choice to load trimbits (eiger only) + \param e_ev threshold in ev + \param tb 1 loads trimbits, 0 does not load trimbits + \param isettings settings index (-1 uses current setting) + \param id module index (-1 for all) + \returns current threshold value in ev (-1 failed) + */ + int setThresholdEnergy(int e_ev, int tb, int isettings = -1, int id = -1); + /** @short set/get exposure time value