mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-11 23:20:03 +02:00
WIP, new eiger serveR
This commit is contained in:
parent
0bd6563e45
commit
5a483eaf29
Binary file not shown.
@ -116,7 +116,6 @@ const char* getTimerName(enum timerIndex ind) {
|
||||
case ACQUISITION_TIME: return "acquisition_time";
|
||||
case FRAME_PERIOD: return "frame_period";
|
||||
case DELAY_AFTER_TRIGGER: return "delay_after_trigger";
|
||||
case GATES_NUMBER: return "gates_number";
|
||||
case CYCLES_NUMBER: return "cycles_number";
|
||||
case ACTUAL_TIME: return "actual_time";
|
||||
case MEASUREMENT_TIME: return "measurement_time";
|
||||
|
@ -495,7 +495,115 @@ class Detector {
|
||||
* @param pos detector position
|
||||
*/
|
||||
void configureMAC(Positions pos = {});
|
||||
|
||||
|
||||
/**
|
||||
* Get number of Frames
|
||||
* @returns number of Frames
|
||||
*/
|
||||
Result<int64_t> getNumberOfFrames() const;
|
||||
|
||||
/**
|
||||
* Set number of Frames
|
||||
* @param value number of Frames
|
||||
*/
|
||||
void setNumberOfFrames(int64_t value);
|
||||
|
||||
/**
|
||||
* Get number of Cycles
|
||||
* @returns number of Cycles
|
||||
*/
|
||||
Result<int64_t> getNumberOfCycles() const;
|
||||
|
||||
/**
|
||||
* Set number of Cycles
|
||||
* @param value number of Cycles
|
||||
*/
|
||||
void setNumberOfCycles(int64_t value);
|
||||
|
||||
/**
|
||||
* Get number of additional storage cells (Jungfrau)
|
||||
* @returns number of additional storage cells
|
||||
*/
|
||||
Result<int64_t> getNumberOfStorageCells() const;
|
||||
|
||||
/**
|
||||
* Set number of additional storage cells (Jungfrau)
|
||||
* @param value number of additional storage cells
|
||||
*/
|
||||
void setNumberOfStorageCells(int64_t value);
|
||||
|
||||
/**
|
||||
* Get number of analog samples (CTB)
|
||||
* @param pos detector position
|
||||
* @returns number of analog samples
|
||||
*/
|
||||
Result<int64_t> getNumberOfAnalogSamples(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set number of analog samples (CTB)
|
||||
* @param value number of analog samples (CTB)
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setNumberOfAnalogSamples(int64_t value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get number of digital samples (CTB)
|
||||
* @param pos detector position
|
||||
* @returns number of digital samples
|
||||
*/
|
||||
Result<int64_t> getNumberOfDigitalSamples(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set number of digital samples (CTB)
|
||||
* @param value number of digital samples (CTB)
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setNumberOfDigitalSamples(int64_t value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get delay after trigger in ns(Gotthard, Jungfrau)
|
||||
* @param pos detector position
|
||||
* @returns delay after trigger in ns
|
||||
*/
|
||||
Result<ns> getDelayAfterTrigger(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set delay after trigger (Gotthard, Jungfrau)
|
||||
* @param value delay after trigger in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get sub frame dead time in ns (Eiger in 32 bit mode)
|
||||
* @param pos detector position
|
||||
* @returns delay after trigger in ns
|
||||
*/
|
||||
Result<ns> getSubFrameDeadTime(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set sub frame dead time after trigger (Eiger in 32 bit mode)
|
||||
* @param value delay after trigger in ns
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setSubFrameDeadTime(ns value, Positions pos = {});
|
||||
|
||||
/**
|
||||
* Get storage cell delay (Jungfrau)
|
||||
* @param pos detector position
|
||||
* @returns storage cell delay in ns. Range: (0-1638375 ns (resolution of
|
||||
* 25ns)
|
||||
*/
|
||||
Result<ns> getStorageCellDelay(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* Set storage cell delay (Jungfrau)
|
||||
* @param value storage cell delay in ns. Range: (0-1638375 ns (resolution
|
||||
* of 25ns)
|
||||
* @param pos detector position
|
||||
*/
|
||||
void setStorageCellDelay(ns value, Positions pos = {});
|
||||
|
||||
// Erik
|
||||
|
||||
Result<int> getFramesCaughtByReceiver(Positions pos = {}) const;
|
||||
|
@ -15,7 +15,7 @@ class detectorData;
|
||||
#include <thread>
|
||||
#include <vector>
|
||||
|
||||
#define MULTI_SHMAPIVERSION 0x190807
|
||||
#define MULTI_SHMAPIVERSION 0x190809
|
||||
#define MULTI_SHMVERSION 0x190807
|
||||
#define SHORT_STRING_LENGTH 50
|
||||
#define DATE_LENGTH 30
|
||||
@ -84,9 +84,6 @@ struct sharedMultiSlsDetector {
|
||||
* one dimension */
|
||||
int maxNumberOfChannelsPerDetector[2];
|
||||
|
||||
/** timer values */
|
||||
int64_t timerValue[slsDetectorDefs::timerIndex::MAX_TIMERS];
|
||||
|
||||
/** flag for acquiring */
|
||||
bool acquiringFlag;
|
||||
|
||||
@ -712,7 +709,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* Configures in detector the destination for UDP packets
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void configureMAC(int detPos = -1);
|
||||
void configureMAC(int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Set starting frame number for the next acquisition
|
||||
@ -731,12 +728,12 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
/**
|
||||
* Set/get timer value (not all implemented for all detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, gates, probes)
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns timer set value in ns or number of...(e.g. frames, gates,
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t setTimer(timerIndex index, int64_t t = -1, int detPos = -1);
|
||||
int64_t setTimer(timerIndex index, int64_t t = -1, int detPos = -1); //
|
||||
|
||||
/**
|
||||
* Set/get exposure time
|
||||
@ -766,7 +763,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns delay after trigger in ns, or s if specified
|
||||
*/
|
||||
double setDelayAfterTrigger(double t = -1, bool inseconds = false,
|
||||
int detPos = -1);
|
||||
int detPos = -1);//
|
||||
|
||||
/**
|
||||
* (Advanced users)
|
||||
@ -788,7 +785,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @returns sub frame dead time in ns, or s if specified
|
||||
*/
|
||||
double setSubFrameExposureDeadTime(double t = -1, bool inseconds = false,
|
||||
int detPos = -1);
|
||||
int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Set/get number of frames
|
||||
@ -796,7 +793,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of frames
|
||||
*/
|
||||
int64_t setNumberOfFrames(int64_t t = -1, int detPos = -1);
|
||||
int64_t setNumberOfFrames(int64_t t = -1, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Set/get number of cycles
|
||||
@ -804,15 +801,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of cycles
|
||||
*/
|
||||
int64_t setNumberOfCycles(int64_t t = -1, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Set/get number of gates (none of the detectors at the moment)
|
||||
* @param t number of gates (-1 gets)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of gates
|
||||
*/
|
||||
int64_t setNumberOfGates(int64_t t = -1, int detPos = -1);
|
||||
int64_t setNumberOfCycles(int64_t t = -1, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Set/get number of additional storage cells (Jungfrau)
|
||||
@ -820,7 +809,7 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of additional storage cells
|
||||
*/
|
||||
int64_t setNumberOfStorageCells(int64_t t = -1, int detPos = -1);
|
||||
int64_t setNumberOfStorageCells(int64_t t = -1, int detPos = -1);//
|
||||
|
||||
/**
|
||||
* Get measured period between previous two frames (EIGER)
|
||||
@ -844,9 +833,9 @@ class multiSlsDetector : public virtual slsDetectorDefs {
|
||||
* Set/get timer value left in acquisition (not all implemented for all
|
||||
* detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, gates, probes)
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns timer set value in ns or number of...(e.g. frames, gates,
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t getTimeLeft(timerIndex index, int detPos = -1);
|
||||
|
@ -658,8 +658,8 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
/**
|
||||
* Set/get timer value (not all implemented for all detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, gates, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames, gates,
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t setTimer(timerIndex index, int64_t t = -1);
|
||||
@ -668,8 +668,8 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
* Set/get timer value left in acquisition (not all implemented for all
|
||||
* detectors)
|
||||
* @param index timer index
|
||||
* @param t time in ns or number of...(e.g. frames, gates, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames, gates,
|
||||
* @param t time in ns or number of...(e.g. frames, probes)
|
||||
* @returns timer set value in ns or number of...(e.g. frames,
|
||||
* probes)
|
||||
*/
|
||||
int64_t getTimeLeft(timerIndex index) const;
|
||||
|
@ -358,14 +358,6 @@ public:
|
||||
*/
|
||||
int64_t setNumberOfCycles(int64_t t = -1, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Set/get number of gates (none of the detectors at the moment)
|
||||
* @param t number of gates (-1 gets)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns number of gates
|
||||
*/
|
||||
int64_t setNumberOfGates(int64_t t = -1, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Set/get number of additional storage cells (Jungfrau)
|
||||
* @param t number of additional storage cells. Default is 0. (-1 gets)
|
||||
@ -396,7 +388,7 @@ public:
|
||||
* Set/get timing mode
|
||||
* @param pol timing mode (-1 gets)
|
||||
* Options (slsDetectorDefs::externalCommunicationMode)
|
||||
* (Eiger: AUTO_TIMING, TRIGGER_EXPOSURE, BURST_TRIGGER, GATE_FIX_NUMBER)
|
||||
* (Eiger: AUTO_TIMING, TRIGGER_EXPOSURE, BURST_TRIGGER, GATED)
|
||||
* (Jungfrau: AUTO_TIMING, TRIGGER_EXPOSURE)
|
||||
* (Gotthard: AUTO_TIMING, TRIGGER_EXPOSURE)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
|
@ -326,9 +326,7 @@ void Detector::startAcquisition() {
|
||||
pimpl->Parallel(&slsDetector::startAcquisition, {});
|
||||
}
|
||||
|
||||
void Detector::stopAcquisition() {
|
||||
pimpl->Parallel(&slsDetector::stopAcquisition, {});
|
||||
}
|
||||
void Detector::stopAcquisition() { pimpl->stopAcquisition(); }
|
||||
|
||||
void Detector::sendSoftwareTrigger(Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::sendSoftwareTrigger, pos);
|
||||
@ -345,14 +343,82 @@ void Detector::startReadOut() {
|
||||
pimpl->Parallel(&slsDetector::startReadOut, {});
|
||||
}
|
||||
|
||||
void Detector::readAll() {
|
||||
pimpl->Parallel(&slsDetector::readAll, {});
|
||||
}
|
||||
void Detector::readAll() { pimpl->Parallel(&slsDetector::readAll, {}); }
|
||||
|
||||
void Detector::configureMAC(Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::configureMAC, pos);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfFrames() const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, {}, defs::FRAME_NUMBER, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfFrames(int64_t value) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, {}, defs::FRAME_NUMBER, value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfCycles() const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, {}, defs::CYCLES_NUMBER, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfCycles(int64_t value) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, {}, defs::CYCLES_NUMBER, value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfStorageCells() const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, {}, defs::STORAGE_CELL_NUMBER, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfStorageCells(int64_t value) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, {}, defs::STORAGE_CELL_NUMBER, value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfAnalogSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::ANALOG_SAMPLES, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfAnalogSamples(int64_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::ANALOG_SAMPLES, value);
|
||||
}
|
||||
|
||||
Result<int64_t> Detector::getNumberOfDigitalSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::DIGITAL_SAMPLES, -1);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfDigitalSamples(int64_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::DIGITAL_SAMPLES, value);
|
||||
}
|
||||
|
||||
Result<ns> Detector::getDelayAfterTrigger(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::DELAY_AFTER_TRIGGER, -1);
|
||||
}
|
||||
|
||||
void Detector::setDelayAfterTrigger(ns value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::DELAY_AFTER_TRIGGER,
|
||||
value.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getSubFrameDeadTime(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos, defs::SUBFRAME_DEADTIME,
|
||||
-1);
|
||||
}
|
||||
|
||||
void Detector::setSubFrameDeadTime(ns value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::SUBFRAME_DEADTIME,
|
||||
value.count());
|
||||
}
|
||||
|
||||
Result<ns> Detector::getStorageCellDelay(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setTimer, pos,
|
||||
defs::STORAGE_CELL_DELAY, -1);
|
||||
}
|
||||
|
||||
void Detector::setStorageCellDelay(ns value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTimer, pos, defs::STORAGE_CELL_DELAY,
|
||||
value.count());
|
||||
}
|
||||
|
||||
// Erik
|
||||
Result<int> Detector::getFramesCaughtByReceiver(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getFramesCaughtByReceiver, pos);
|
||||
@ -683,12 +749,12 @@ Result<bool> Detector::getRxPadDeactivatedMod(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::setDeactivatedRxrPaddingMode, pos, -1);
|
||||
}
|
||||
|
||||
void Detector::setActive(bool active, Positions pos){
|
||||
void Detector::setActive(bool active, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::activate, pos, static_cast<int>(active));
|
||||
}
|
||||
|
||||
Result<bool> Detector::getActive(Positions pos) const{
|
||||
pimpl->Parallel(&slsDetector::activate, pos, -1);
|
||||
Result<bool> Detector::getActive(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::activate, pos, -1);
|
||||
}
|
||||
|
||||
} // namespace sls
|
@ -287,10 +287,6 @@ void multiSlsDetector::initializeDetectorStructure() {
|
||||
multi_shm()->numberOfChannelInclGapPixels[Y] = 0;
|
||||
multi_shm()->maxNumberOfChannelsPerDetector[X] = 0;
|
||||
multi_shm()->maxNumberOfChannelsPerDetector[Y] = 0;
|
||||
for (int64_t &i : multi_shm()->timerValue) {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
multi_shm()->acquiringFlag = false;
|
||||
multi_shm()->receiver_upstream = false;
|
||||
}
|
||||
@ -1144,41 +1140,12 @@ uint64_t multiSlsDetector::getStartingFrameNumber(int detPos) {
|
||||
int64_t multiSlsDetector::setTimer(timerIndex index, int64_t t, int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
// error for setting values individually
|
||||
// FIXME: what else? and error code
|
||||
if (t != -1) {
|
||||
switch (index) {
|
||||
case FRAME_NUMBER:
|
||||
case CYCLES_NUMBER:
|
||||
case STORAGE_CELL_NUMBER:
|
||||
throw RuntimeError("Cannot set number of frames, cycles or "
|
||||
"storage cells individually.");
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
return detectors[detPos]->setTimer(index, t);
|
||||
}
|
||||
|
||||
// multi
|
||||
auto r = parallelCall(&slsDetector::setTimer, index, t);
|
||||
int64_t ret = sls::minusOneIfDifferent(r);
|
||||
|
||||
// set progress
|
||||
if (t != -1) {
|
||||
switch (index) {
|
||||
case FRAME_NUMBER:
|
||||
case CYCLES_NUMBER:
|
||||
case STORAGE_CELL_NUMBER:
|
||||
setTotalProgress();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
multi_shm()->timerValue[index] = ret;
|
||||
return ret;
|
||||
return sls::minusOneIfDifferent(r);
|
||||
}
|
||||
|
||||
int64_t multiSlsDetector::secondsToNanoSeconds(double t) {
|
||||
@ -1239,10 +1206,6 @@ int64_t multiSlsDetector::setNumberOfCycles(int64_t t, int detPos) {
|
||||
return setTimer(CYCLES_NUMBER, t, detPos);
|
||||
}
|
||||
|
||||
int64_t multiSlsDetector::setNumberOfGates(int64_t t, int detPos) {
|
||||
return setTimer(GATES_NUMBER, t, detPos);
|
||||
}
|
||||
|
||||
int64_t multiSlsDetector::setNumberOfStorageCells(int64_t t, int detPos) {
|
||||
return setTimer(STORAGE_CELL_NUMBER, t, detPos);
|
||||
}
|
||||
@ -4189,16 +4152,28 @@ void multiSlsDetector::registerDataCallback(
|
||||
int multiSlsDetector::setTotalProgress() {
|
||||
int nf = 1, nc = 1, ns = 1;
|
||||
|
||||
if (multi_shm()->timerValue[FRAME_NUMBER] != 0) {
|
||||
nf = multi_shm()->timerValue[FRAME_NUMBER];
|
||||
Result<int64_t> temp = Parallel(&slsDetector::setTimer, {}, FRAME_NUMBER, -1);
|
||||
if (!temp.equal()) {
|
||||
throw RuntimeError("Inconsistent number of frames");
|
||||
}
|
||||
nf = temp.squash();
|
||||
|
||||
temp = Parallel(&slsDetector::setTimer, {}, CYCLES_NUMBER, -1);
|
||||
if (!temp.equal()) {
|
||||
throw RuntimeError("Inconsistent number of cycles");
|
||||
}
|
||||
nc = temp.squash();
|
||||
|
||||
if (getDetectorTypeAsEnum() == JUNGFRAU) {
|
||||
temp = Parallel(&slsDetector::setTimer, {}, STORAGE_CELL_NUMBER, -1);
|
||||
if (!temp.equal()) {
|
||||
throw RuntimeError("Inconsistent number of additional storage cells");
|
||||
}
|
||||
ns = temp.squash() + 1;
|
||||
}
|
||||
|
||||
if (multi_shm()->timerValue[CYCLES_NUMBER] > 0) {
|
||||
nc = multi_shm()->timerValue[CYCLES_NUMBER];
|
||||
}
|
||||
|
||||
if (multi_shm()->timerValue[STORAGE_CELL_NUMBER] > 0) {
|
||||
ns = multi_shm()->timerValue[STORAGE_CELL_NUMBER] + 1;
|
||||
if (nf == 0 || nc == 0) {
|
||||
throw RuntimeError("Number of frames or cycles is 0");
|
||||
}
|
||||
|
||||
totalProgress = nf * nc * ns;
|
||||
@ -4259,6 +4234,7 @@ int multiSlsDetector::acquire() {
|
||||
stopReceiver();
|
||||
}
|
||||
}
|
||||
setTotalProgress();
|
||||
|
||||
startProcessingThread();
|
||||
|
||||
|
@ -325,7 +325,6 @@ void slsDetector::initializeDetectorStructure(detectorType type) {
|
||||
shm()->timerValue[ACQUISITION_TIME] = 0;
|
||||
shm()->timerValue[FRAME_PERIOD] = 0;
|
||||
shm()->timerValue[DELAY_AFTER_TRIGGER] = 0;
|
||||
shm()->timerValue[GATES_NUMBER] = 0;
|
||||
shm()->timerValue[CYCLES_NUMBER] = 1;
|
||||
shm()->timerValue[ACTUAL_TIME] = 0;
|
||||
shm()->timerValue[MEASUREMENT_TIME] = 0;
|
||||
|
@ -378,9 +378,8 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
|
||||
++i;
|
||||
|
||||
/*! \page config
|
||||
- <b>extsig [flag]</b> sets/gets the mode of the external signal. Options: \c off, \c gate_in_active_high, \c gate_in_active_low, \c trigger_in_rising_edge, \c trigger_in_falling_edge,
|
||||
\c ro_trigger_in_rising_edge, \c ro_trigger_in_falling_edge, \c gate_out_active_high, \c gate_out_active_low, \c trigger_out_rising_edge, \c trigger_out_falling_edge, \c ro_trigger_out_rising_edge,
|
||||
\c ro_trigger_out_falling_edge. \n Used in GOTTHARDonly. \c Returns \c (string)
|
||||
- <b>extsig [flag]</b> sets/gets the mode of the external signal. Options: \c off, \c trigger_in_rising_edge, \c trigger_in_falling_edge,
|
||||
\c trigger_out_rising_edge, \c trigger_out_falling_edge\n Used in GOTTHARDonly. \c Returns \c (string)
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName = "extsig"; /* find command! */
|
||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdAdvanced;
|
||||
@ -577,13 +576,6 @@ slsDetectorCommand::slsDetectorCommand(multiSlsDetector *det) {
|
||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdTimer;
|
||||
++i;
|
||||
|
||||
/*! \page timing
|
||||
- <b>gates [i]</b> sets/gets number of gates. Used in GOTTHARD only. \c Returns \c (long long int)
|
||||
*/
|
||||
descrToFuncMap[i].m_pFuncName = "gates";
|
||||
descrToFuncMap[i].m_pFuncPtr = &slsDetectorCommand::cmdTimer;
|
||||
++i;
|
||||
|
||||
/*! \page timing
|
||||
- <b>frames [i]</b> sets/gets number of frames. If \c timing is not \c auto, then it is the number of frames per cycle/trigger. \c Returns \c (long long int)
|
||||
*/
|
||||
@ -4333,8 +4325,6 @@ std::string slsDetectorCommand::cmdTimer(int narg, const char * const args[], in
|
||||
index = SUBFRAME_DEADTIME;
|
||||
else if (cmd == "delay")
|
||||
index = DELAY_AFTER_TRIGGER;
|
||||
else if (cmd == "gates")
|
||||
index = GATES_NUMBER;
|
||||
else if (cmd == "frames")
|
||||
index = FRAME_NUMBER;
|
||||
else if (cmd == "cycles")
|
||||
@ -4825,7 +4815,7 @@ std::string slsDetectorCommand::helpAdvanced(int action) {
|
||||
std::ostringstream os;
|
||||
if (action == PUT_ACTION || action == HELP_ACTION) {
|
||||
|
||||
os << "extsig mode \t sets the mode of the external signal. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
|
||||
os << "extsig mode \t sets the mode of the external signal. can be \n \t \t \t off, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge" << std::endl;
|
||||
os << "flags mode \t sets the readout flags to mode. can be none, storeinram, tot, continous, parallel, nonparallel, digital, analog_digital, overlow, nooverflow, unknown." << std::endl;
|
||||
os << "interruptsubframe flag \t sets the interrupt subframe flag. Setting it to 1 will interrupt the last subframe at the required exposure time. By default, this is disabled and set to 0, ie. it will wait for the last sub frame to finish exposing. Used for EIGER in 32 bit mode only." << std::endl;
|
||||
os << "readnlines f \t sets the number of rows to read out per half module. Options: 1 - 256 (Not all values as it depends on dynamic range and 10GbE enabled). Used for EIGER only. " << std::endl;
|
||||
@ -4841,7 +4831,7 @@ std::string slsDetectorCommand::helpAdvanced(int action) {
|
||||
}
|
||||
if (action == GET_ACTION || action == HELP_ACTION) {
|
||||
|
||||
os << "extsig \t gets the mode of the external signal. can be \n \t \t \t off, \n \t \t \t gate_in_active_high, \n \t \t \t gate_in_active_low, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t ro_trigger_in_rising_edge, \n \t \t \t ro_trigger_in_falling_edge, \n \t \t \t gate_out_active_high, \n \t \t \t gate_out_active_low, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge, \n \t \t \t ro_trigger_out_rising_edge, \n \t \t \t ro_trigger_out_falling_edge" << std::endl;
|
||||
os << "extsig \t gets the mode of the external signal. can be \n \t \t \t off, \n \t \t \t trigger_in_rising_edge, \n \t \t \t trigger_in_falling_edge, \n \t \t \t trigger_out_rising_edge, \n \t \t \t trigger_out_falling_edge" << std::endl;
|
||||
os << "flags \t gets the readout flags. can be none, storeinram, tot, continous, parallel, nonparallel, digital, analog_digital, overflow, nooverflow, unknown" << std::endl;
|
||||
os << "interruptsubframe \t gets the interrupt subframe flag. Setting it to 1 will interrupt the last subframe at the required exposure time. By default, this is disabled and set to 0, ie. it will wait for the last sub frame to finish exposing. Used for EIGER in 32 bit mode only." << std::endl;
|
||||
os << "readnlines \t gets the number of rows to read out per half module. Used for EIGER only. " << std::endl;
|
||||
|
@ -159,10 +159,6 @@ int64_t slsDetectorUsers::setNumberOfCycles(int64_t t, int detPos){
|
||||
return detector.setNumberOfCycles(t, detPos);
|
||||
}
|
||||
|
||||
int64_t slsDetectorUsers::setNumberOfGates(int64_t t, int detPos){
|
||||
return detector.setNumberOfGates(t, detPos);
|
||||
}
|
||||
|
||||
int64_t slsDetectorUsers::setNumberOfStorageCells(int64_t t, int detPos) {
|
||||
return detector.setNumberOfStorageCells(t, detPos);
|
||||
}
|
||||
|
@ -106,7 +106,6 @@ class slsDetectorDefs {
|
||||
FRAME_PERIOD, /**< period between exposures */
|
||||
DELAY_AFTER_TRIGGER, /**< delay between trigger and start of exposure or
|
||||
readout (in triggered mode) */
|
||||
GATES_NUMBER, /**< number of gates per frame (in gated mode) */
|
||||
CYCLES_NUMBER, /**< number of cycles: total number of acquisitions is
|
||||
number or frames*number of cycles */
|
||||
ACTUAL_TIME, /**< Actual time of the detector's internal timer */
|
||||
@ -918,12 +917,12 @@ format
|
||||
|
||||
/** returns std::string from timer index
|
||||
\param s can be FRAME_NUMBER,ACQUISITION_TIME,FRAME_PERIOD,
|
||||
DELAY_AFTER_TRIGGER,GATES_NUMBER, CYCLES_NUMBER,
|
||||
DELAY_AFTER_TRIGGER, CYCLES_NUMBER,
|
||||
ACTUAL_TIME,MEASUREMENT_TIME,
|
||||
PROGRESS,FRAMES_FROM_START,FRAMES_FROM_START_PG,ANALOG_SAMPLES,DIGITAL_SAMPLES,SUBFRAME_ACQUISITION_TIME,STORAGE_CELL_NUMBER,
|
||||
SUBFRAME_DEADTIME \returns std::string
|
||||
frame_number,acquisition_time,frame_period,
|
||||
delay_after_trigger,gates_number, cycles_number,
|
||||
delay_after_trigger, cycles_number,
|
||||
actual_time,measurement_time,
|
||||
progress,frames_from_start,frames_from_start_pg,analog_samples, digital_samples,subframe_acquisition_time,storage_cell_number,
|
||||
SUBFRAME_DEADTIME
|
||||
@ -938,8 +937,6 @@ format
|
||||
return std::string("frame_period");
|
||||
case DELAY_AFTER_TRIGGER:
|
||||
return std::string("delay_after_trigger");
|
||||
case GATES_NUMBER:
|
||||
return std::string("gates_number");
|
||||
case CYCLES_NUMBER:
|
||||
return std::string("cycles_number");
|
||||
case ACTUAL_TIME:
|
||||
|
@ -7,4 +7,4 @@
|
||||
#define APIRECEIVER 0x190722
|
||||
#define APIGUI 0x190723
|
||||
#define APIJUNGFRAU 0x190730
|
||||
#define APIEIGER 0x190806
|
||||
#define APIEIGER 0x190807
|
||||
|
Loading…
x
Reference in New Issue
Block a user