mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
Merge branch 'apidhanya' of github.com:slsdetectorgroup/slsDetectorPackage into apidhanya
This commit is contained in:
@ -115,14 +115,6 @@ class Detector {
|
||||
Result<bool> getFileOverWrite(Positions pos = {}) const;
|
||||
void setFileOverWrite(bool value, Positions pos = {});
|
||||
|
||||
// Time
|
||||
Result<ns> getExptime(Positions pos = {}) const;
|
||||
void setExptime(ns t, Positions pos = {});
|
||||
Result<ns> getSubExptime(Positions pos = {}) const;
|
||||
void setSubExptime(ns t, Positions pos = {});
|
||||
Result<ns> getPeriod(Positions pos = {}) const;
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
|
||||
// dhanya
|
||||
/**
|
||||
* Get multidetector Id
|
||||
@ -213,7 +205,7 @@ class Detector {
|
||||
* Returns the total number of detectors in the multidetector structure
|
||||
* @returns total number of detectors in the multidetector structure
|
||||
*/
|
||||
int getTotalNumberOfDetectors() const;
|
||||
int size() const;
|
||||
|
||||
/**
|
||||
* Returns the number of detectors in the multidetector structure
|
||||
@ -560,6 +552,33 @@ class Detector {
|
||||
*/
|
||||
void setNumberOfDigitalSamples(int64_t value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get exposure time in ns
|
||||
* @param pos detector position
|
||||
* @returns exposure time in ns
|
||||
*/
|
||||
Result<ns> getExptime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set exposure time in ns
|
||||
* @param value exposure time in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setExptime(ns t, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get period in ns
|
||||
* @param pos detector position
|
||||
* @returns period in ns
|
||||
*/
|
||||
Result<ns> getPeriod(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set period in ns
|
||||
* @param value period in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setPeriod(ns t, Positions pos = {});
|
||||
/**
|
||||
* Get delay after trigger in ns(Gotthard, Jungfrau)
|
||||
* @param pos detector position
|
||||
@ -574,19 +593,32 @@ class Detector {
|
||||
*/
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get sub frame exposure time in ns (Eiger in 32 bit mode)
|
||||
* @param pos detector position
|
||||
* @returns sub frame exposure time in ns
|
||||
*/
|
||||
Result<ns> getSubExptime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set sub frame exposure time after trigger (Eiger in 32 bit mode)
|
||||
* @param value sub frame exposure time in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setSubExptime(ns t, Positions pos = {});
|
||||
/**
|
||||
* Get sub frame dead time in ns (Eiger in 32 bit mode)
|
||||
* @param pos detector position
|
||||
* @returns delay after trigger in ns
|
||||
* @returns sub frame dead time in ns
|
||||
*/
|
||||
Result<ns> getSubFrameDeadTime(Positions pos = {}) const;
|
||||
Result<ns> getSubDeadTime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set sub frame dead time after trigger (Eiger in 32 bit mode)
|
||||
* @param value delay after trigger in ns
|
||||
* @param value sub frame dead time in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setSubFrameDeadTime(ns value, Positions pos = {});
|
||||
void setSubDeadTime(ns value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get storage cell delay (Jungfrau)
|
||||
@ -604,6 +636,76 @@ class Detector {
|
||||
*/
|
||||
void setStorageCellDelay(ns value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get number of Frames left (Gotthard, Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns number of Frames left
|
||||
*/
|
||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get number of Cycles left (Gotthard, Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns number of Cycles left
|
||||
*/
|
||||
Result<int64_t> getNumberOfCyclesLeft(Positions pos = {}) const;
|
||||
/**
|
||||
* Get exposure time left in ns (Gotthard)
|
||||
* @param pos detector position
|
||||
* @returns exposure time left in ns
|
||||
*/
|
||||
Result<ns> getExptimeLeft(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get period left in ns (Gotthard, Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns period left in ns
|
||||
*/
|
||||
Result<ns> getPeriodLeft(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get delay after trigger left in ns(Gotthard, Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns delay after trigger left in ns
|
||||
*/
|
||||
Result<ns> getDelayAfterTriggerLeft(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get number of frames from start up of detector (Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns number of frames from start up of detector
|
||||
*/
|
||||
Result<int64_t> getNumberOfFramesFromStart(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get time from detector start in ns (Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns time from detector start in ns
|
||||
*/
|
||||
Result<ns> getActualTime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get timestamp at a frame start in ns(Jungfrau, CTB)
|
||||
* @param pos detector position
|
||||
* @returns timestamp at a frame start in ns
|
||||
*/
|
||||
Result<ns> getMeasurementTime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get measured period between previous two frames in ns (Eiger)
|
||||
* @param pos detector position
|
||||
* @returns measured period between previous two frames in ns
|
||||
*/
|
||||
Result<ns> getMeasuredPeriod(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Get measured sub frame period between previous two frames in ns (Eiger in
|
||||
* 32 bit mode)
|
||||
* @param pos detector position
|
||||
* @returns measured sub frame period between previous two frames in ns
|
||||
*/
|
||||
Result<ns> getMeasuredSubFramePeriod(Positions pos = {}) const;
|
||||
|
||||
// Erik
|
||||
|
||||
Result<int> getFramesCaughtByReceiver(Positions pos = {}) const;
|
||||
|
@ -107,6 +107,10 @@ template <class T, class Allocator = std::allocator<T>> class Result {
|
||||
*/
|
||||
T squash() const { return Squash(vec); }
|
||||
|
||||
/**
|
||||
* If all elements are equal it returns the front value
|
||||
* otherwise throws an exception with custom message provided
|
||||
*/
|
||||
T tsquash(const std::string &error_msg) {
|
||||
if (equal())
|
||||
return vec.front();
|
||||
|
@ -381,7 +381,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* Returns the number of detectors in the multidetector structure
|
||||
* @returns number of detectors
|
||||
*/
|
||||
int getNumberOfDetectors() const;//
|
||||
int size() const;//
|
||||
|
||||
/**
|
||||
* Returns number of detectors in dimension d
|
||||
@ -819,7 +819,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns sub frame dead time in ns, or s if specified
|
||||
*/
|
||||
double getMeasuredPeriod(bool inseconds = false, int detPos = -1);
|
||||
double getMeasuredPeriod(bool inseconds = false, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Get sub period between previous two sub frames in 32 bit mode (EIGER)
|
||||
@ -828,7 +828,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns sub frame dead time in ns, or s if specified
|
||||
*/
|
||||
double getMeasuredSubFramePeriod(bool inseconds = false, int detPos = -1);
|
||||
double getMeasuredSubFramePeriod(bool inseconds = false, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Set/get timer value left in acquisition (not all implemented for all
|
||||
@ -839,7 +839,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t getTimeLeft(timerIndex index, int detPos = -1);
|
||||
int64_t getTimeLeft(timerIndex index, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Set speed
|
||||
@ -872,10 +872,6 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int getDataBytes(int detPos = -1);
|
||||
|
||||
/**
|
||||
* Returns the number of detectors in the multi structure*/
|
||||
size_t size() const { return detectors.size(); }
|
||||
|
||||
/**
|
||||
* Set/get dacs value
|
||||
* @param val value (in V)
|
||||
|
@ -101,7 +101,7 @@ class multiSlsDetectorClient {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (parser.detector_id() >= detPtr->getNumberOfDetectors()) {
|
||||
if (parser.detector_id() >= detPtr->size()) {
|
||||
os << "position is out of bounds.\n";
|
||||
return;
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public:
|
||||
* Returns the number of detectors in the multidetector structure
|
||||
* @returns number of detectors
|
||||
*/
|
||||
int getNumberOfDetectors() const;
|
||||
int size() const;
|
||||
|
||||
/**
|
||||
* Returns the maximum number of channels of all detectors
|
||||
|
Reference in New Issue
Block a user