mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-01-16 13:51:34 +01:00
gotthard2 with veto data on second interface
This commit is contained in:
@@ -379,10 +379,13 @@ class Detector {
|
||||
* *
|
||||
* ************************************************/
|
||||
|
||||
/** [Jungfrau] */
|
||||
/** [Jungfrau][Gotthard2] */
|
||||
Result<int> getNumberofUDPInterfaces(Positions pos = {}) const;
|
||||
|
||||
/** [Jungfrau] Also restarts client and receiver sockets */
|
||||
/** [Jungfrau][Gotthard2] Also restarts client and receiver zmq sockets
|
||||
* [Gotthard2] second interface enabled to send veto information for
|
||||
* debugging
|
||||
* n can be 1 or 2 */
|
||||
void setNumberofUDPInterfaces(int n, Positions pos = {});
|
||||
|
||||
/** [Jungfrau] */
|
||||
|
||||
@@ -1517,10 +1517,13 @@ class CmdProxy {
|
||||
|
||||
/* Network Configuration (Detector<->Receiver) */
|
||||
|
||||
INTEGER_COMMAND(numinterfaces, getNumberofUDPInterfaces,
|
||||
setNumberofUDPInterfaces, StringTo<int>,
|
||||
"[1, 2]\n\t[Jungfrau] Number of udp interfaces to stream "
|
||||
"data from detector. Default: 1.");
|
||||
INTEGER_COMMAND(
|
||||
numinterfaces, getNumberofUDPInterfaces, setNumberofUDPInterfaces,
|
||||
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.");
|
||||
|
||||
INTEGER_COMMAND(
|
||||
selinterface, getSelectedUDPInterface, selectUDPInterface,
|
||||
|
||||
@@ -383,8 +383,12 @@ int DetectorImpl::createReceivingDataSockets(const bool destroy) {
|
||||
if (multi_shm()->multiDetectorType == EIGER) {
|
||||
numSocketsPerDetector = 2;
|
||||
}
|
||||
if (Parallel(&Module::getNumberofUDPInterfacesFromShm, {}).squash() == 2) {
|
||||
numSocketsPerDetector = 2;
|
||||
// gotthard2 second interface is only for veto debugging
|
||||
else if (multi_shm()->multiDetectorType != GOTTHARD2) {
|
||||
if (Parallel(&Module::getNumberofUDPInterfacesFromShm, {}).squash() ==
|
||||
2) {
|
||||
numSocketsPerDetector = 2;
|
||||
}
|
||||
}
|
||||
numSockets *= numSocketsPerDetector;
|
||||
|
||||
@@ -424,9 +428,12 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
int nDetPixelsY = 0;
|
||||
bool quadEnable = false;
|
||||
bool eiger = false;
|
||||
bool numInterfaces = Parallel(&Module::getNumberofUDPInterfacesFromShm, {})
|
||||
.squash(); // cannot pick up from zmq
|
||||
|
||||
bool numInterfaces = 1;
|
||||
// gotthard2 second interface is veto debugging
|
||||
if (multi_shm()->multiDetectorType != GOTTHARD2) {
|
||||
numInterfaces = Parallel(&Module::getNumberofUDPInterfacesFromShm, {})
|
||||
.squash(); // cannot pick up from zmq
|
||||
}
|
||||
bool runningList[zmqSocket.size()], connectList[zmqSocket.size()];
|
||||
int numRunning = 0;
|
||||
for (size_t i = 0; i < zmqSocket.size(); ++i) {
|
||||
|
||||
@@ -780,12 +780,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int getDestinationUDPPort2();
|
||||
|
||||
/**
|
||||
* Sets the number of UDP interfaces to stream data from detector (Jungfrau
|
||||
* only)
|
||||
* @param n number of interfaces. Options 1 or 2.
|
||||
* @returns the number of interface
|
||||
*/
|
||||
/** [Jungfrau][Gotthard2] */
|
||||
void setNumberofUDPInterfaces(int n);
|
||||
|
||||
/** Returns the number of udp interfaces from shared memory */
|
||||
|
||||
Reference in New Issue
Block a user