merge vetoheader

This commit is contained in:
2020-05-29 10:50:33 +02:00
25 changed files with 600 additions and 174 deletions

View File

@ -385,8 +385,8 @@ class Detector {
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
/** [Jungfrau][Gotthard2] Also restarts client and receiver zmq sockets
* [Gotthard2] second interface enabled to send veto information for
* debugging
* [Gotthard2] second interface enabled to send veto information via 10gbps
* for debugging. By default it is sent via 2.5gbps if veto enabled
* n can be 1 or 2 */
void setNumberofUDPInterfaces(int n, Positions pos = {});
@ -884,7 +884,7 @@ class Detector {
/** [Jungfrau] Advanced. Sets the storage cell storing the first acquisition
* of the series. Options: 0-15
*/
void setStoragecellStart(int cell, Positions pos = {});
void setStorageCellStart(int cell, Positions pos = {});
/** [Jungfrau] Advanced*/
Result<ns> getStorageCellDelay(Positions pos = {}) const;
@ -989,6 +989,12 @@ class Detector {
/** [Gotthard2] Options: TIMING_INTERNAL, TIMING_EXTERNAL */
void setTimingSource(defs::timingSourceType value, Positions pos = {});
/** [Gotthard2] */
Result<bool> getVeto(Positions pos = {}) const;
/** [Gotthard2] */
void setVeto(const bool enable, Positions pos = {});
/**************************************************
* *
* Mythen3 Specific *

View File

@ -795,6 +795,7 @@ class CmdProxy {
{"burstmode", &CmdProxy::BurstMode},
{"currentsource", &CmdProxy::currentsource},
{"timingsource", &CmdProxy::timingsource},
{"veto", &CmdProxy::veto},
/* Mythen3 Specific */
{"counters", &CmdProxy::Counters},
@ -1530,8 +1531,10 @@ class CmdProxy {
StringTo<int>,
"[1, 2]\n\t[Jungfrau][Gotthard2] Number of udp interfaces to stream "
"data from detector. Default: 1.\n\t"
"[Gotthard2] Second interface enabled to send veto information for "
"debugging.");
"[Gotthard2] 2 will select 10gbps as channel for veto data streaming "
"in detector and also enable second interface in receiver to listen to "
"it. This is mainly for debugging purposes. By default, numinterfaces "
"is 1 and if veto enabled, it is sent via 2.5 gbps interface");
INTEGER_COMMAND(
selinterface, getSelectedUDPInterface, selectUDPInterface,
@ -1841,7 +1844,7 @@ class CmdProxy {
"(#storagecells + 1).");
INTEGER_COMMAND(
storagecell_start, getStorageCellStart, setStoragecellStart,
storagecell_start, getStorageCellStart, setStorageCellStart,
StringTo<int>,
"[0-15]\n\t[Jungfrau] Storage cell that stores the first acquisition "
"of the series. Default is 15. For advanced users only.");
@ -1875,6 +1878,10 @@ class CmdProxy {
"[internal|external]\n\t[Gotthard2] Timing source. Internal is crystal "
"and external is system timing. Default is internal.");
INTEGER_COMMAND(veto, getVeto, setVeto, StringTo<int>,
"[0, 1]\n\t[Gotthard2] Enable or disable veto data "
"streaming from detector. Default is 0.");
/* Mythen3 Specific */
INTEGER_COMMAND(gates, getNumberOfGates, setNumberOfGates, StringTo<int>,

View File

@ -1132,11 +1132,11 @@ void Detector::setNumberOfAdditionalStorageCells(int value) {
}
Result<int> Detector::getStorageCellStart(Positions pos) const {
return pimpl->Parallel(&Module::setStoragecellStart, pos, -1);
return pimpl->Parallel(&Module::setStorageCellStart, pos, -1);
}
void Detector::setStoragecellStart(int cell, Positions pos) {
pimpl->Parallel(&Module::setStoragecellStart, pos, cell);
void Detector::setStorageCellStart(int cell, Positions pos) {
pimpl->Parallel(&Module::setStorageCellStart, pos, cell);
}
Result<ns> Detector::getStorageCellDelay(Positions pos) const {
@ -1248,6 +1248,14 @@ void Detector::setTimingSource(defs::timingSourceType value, Positions pos) {
pimpl->Parallel(&Module::setTimingSource, pos, value);
}
Result<bool> Detector::getVeto(Positions pos) const {
return pimpl->Parallel(&Module::getVeto, pos);
}
void Detector::setVeto(bool enable, Positions pos) {
pimpl->Parallel(&Module::setVeto, pos, enable);
}
// Mythen3 Specific
Result<uint32_t> Detector::getCounterMask(Positions pos) const {

View File

@ -2094,6 +2094,12 @@ void Module::setTimingSource(slsDetectorDefs::timingSourceType value) {
sendToDetector(F_SET_TIMING_SOURCE, static_cast<int>(value), nullptr);
}
bool Module::getVeto() { return sendToDetector<int>(F_GET_VETO); }
void Module::setVeto(bool enable) {
sendToDetector(F_SET_VETO, static_cast<int>(enable), nullptr);
}
int Module::setCounterBit(int cb) {
return sendToDetector<int>(F_SET_COUNTER_BIT, cb);
}
@ -2349,7 +2355,7 @@ int Module::setTemperatureEvent(int val) {
return retval;
}
int Module::setStoragecellStart(int pos) {
int Module::setStorageCellStart(int pos) {
return sendToDetector<int>(F_STORAGE_CELL_START, pos);
}

View File

@ -993,6 +993,12 @@ class Module : public virtual slsDetectorDefs {
/** [Gotthard2] Options: TIMING_INTERNAL, TIMING_EXTERNAL */
void setTimingSource(slsDetectorDefs::timingSourceType value);
/** [Gotthard2] */
bool getVeto();
/** default disabled */
void setVeto(bool enable);
/**
* Set/get counter bit in detector (Gotthard)
* @param i is -1 to get, 0 to reset and any other value to set the counter
@ -1194,7 +1200,7 @@ class Module : public virtual slsDetectorDefs {
* @param value storage cell index. Value can be 0 to 15. (-1 gets)
* @returns the storage cell that stores the first acquisition of the series
*/
int setStoragecellStart(int pos = -1);
int setStorageCellStart(int pos = -1);
/**
* [Jungfau][Ctb] Programs FPGA with raw file from pof file