mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-05 17:40:40 +02:00
when using userReceiver with many instances of the receiver in one program, the index will keep increasing, hence need to adjust zmq port and det index in file name
This commit is contained in:
parent
1dc774d229
commit
98cb8de478
@ -44,7 +44,7 @@ class BinaryFileStatic {
|
||||
{
|
||||
ostringstream osfn;
|
||||
osfn << fpath << "/" << fnameprefix;
|
||||
if (dindex >= 0) osfn << "_d" << (dindex * numunits + unitindex);
|
||||
if (dindex >= 0) osfn << "_d" << ((unitindex >= numunits) ? unitindex : (dindex * numunits + unitindex)); //if unit index > numunits, all receivers in one program (userReceiver)
|
||||
if (frindexenable) osfn << "_f" << setfill('0') << setw(12) << fnum;
|
||||
osfn << "_" << findex;
|
||||
osfn << ".raw";
|
||||
|
@ -50,7 +50,7 @@ public:
|
||||
{
|
||||
ostringstream osfn;
|
||||
osfn << fpath << "/" << fnameprefix;
|
||||
if (dindex >= 0) osfn << "_d" << (dindex * numunits + unitindex);
|
||||
if (dindex >= 0) osfn << "_d" << ((unitindex >= numunits) ? unitindex : (dindex * numunits + unitindex)); //if unit index > numunits, all receivers in one program (userReceiver)
|
||||
if (frindexenable) osfn << "_f" << setfill('0') << setw(12) << fnum;
|
||||
osfn << "_" << findex;
|
||||
osfn << ".h5";
|
||||
|
@ -160,6 +160,9 @@ int DataStreamer::SetThreadPriority(int priority) {
|
||||
|
||||
int DataStreamer::CreateZmqSockets(int* dindex, int* nunits) {
|
||||
uint32_t portnum = DEFAULT_ZMQ_PORTNO + ((*dindex) * (*nunits) + index);
|
||||
//using userReceiver where all receivers in one program (numberofstreamers>*nunits)
|
||||
if(index >= *nunits)
|
||||
portnum = DEFAULT_ZMQ_PORTNO + index;
|
||||
|
||||
zmqSocket = new ZmqSocket(portnum);
|
||||
if (zmqSocket->IsError()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user