* roi structure expanded to have ymin and ymax

* compile with 'detector roi'

* wip

* wip, rx_roi, rx_clearroi

* wip rxroi

* rxroi wip

* wip rxroi

* merge fix

* wip

* rx_roi works, impl wip, test

* tests in, impl left

* wip, rxroi impl

* wip, rxroi impl

* wip

* setrx_Roi works, getrx_roi, wip

* rx_roi impl done

* wip, rxroi

* wip, getrx_roi rxr ports

* fix ports

* wip

* wip

* fix positions on server side

* wip

* numports wip

* wip

* jungfrau top inner interface row increment

* x, y detpos, wip

* removed eiger row indices flipping in gui (bottom flipping maintained)

* wip

* wip, jungfrau numinterfaces2

* jungfrau virtual works

* eiger, jungfrau, g2 virtual server works

* eiger positions fix, wip

* binaries in

* minor printout

* binaries in

* merge fix

* merge fix

* removing getposition

* setrxroi wip

* set upto port

* get messed, wip

* roi multi to module works, wip

* wip

* roi dont return -1

* added rxroi metadata in master file

* added rxroifromshm, not yet in detector

* rx roi in gui with box, also for gap pixels (gappixels for jungfrau mess)

* fix for segfault in gui with detaching roi box in gui

* wip

* m3 gui: slave timing modes should be discarded when squashing

* fixed m3 virtual data, and fixed counters in gui asthetics

* m3 roi works

* wip, g2

* wip

* handling g225um boards, and showing roi for gainplot as well

* udpate python functions

* fix for 1d and a2d roi written

* fixed actual roi written to file

* no virtual hdf5 when handling rx roi

* test

* minor

* binarie in
This commit is contained in:
Dhanya Thattil
2022-05-16 12:35:06 +02:00
committed by GitHub
parent 9808376207
commit fcc7f7aef8
53 changed files with 1713 additions and 859 deletions

View File

@ -19,7 +19,7 @@ const std::string DataStreamer::TypeName = "DataStreamer";
DataStreamer::DataStreamer(int ind, Fifo *f, uint32_t *dr, ROI *r, uint64_t *fi,
bool fr, slsDetectorDefs::xy np, bool *qe,
uint64_t *tot)
: ThreadObject(ind, TypeName), fifo(f), dynamicRange(dr), roi(r),
: ThreadObject(ind, TypeName), fifo(f), dynamicRange(dr), detectorRoi(r),
fileIndex(fi), flipRows(fr), numPorts(np), quadEnable(qe),
totalNumFrames(tot) {
@ -43,8 +43,8 @@ void DataStreamer::ResetParametersforNewAcquisition(const std::string &fname) {
delete[] completeBuffer;
completeBuffer = nullptr;
}
if (generalData->myDetectorType == GOTTHARD && roi->xmin != -1) {
adcConfigured = generalData->GetAdcConfigured(index, *roi);
if (generalData->myDetectorType == GOTTHARD && detectorRoi->xmin != -1) {
adcConfigured = generalData->GetAdcConfigured(index, *detectorRoi);
completeBuffer = new char[generalData->imageSizeComplete];
memset(completeBuffer, 0, generalData->imageSizeComplete);
}
@ -114,7 +114,7 @@ void DataStreamer::ThreadExecution() {
<< std::hex << (void *)(buffer) << std::dec << ":" << buffer;
// check dummy
uint32_t numBytes = (uint32_t)(*((uint32_t *)buffer));
auto numBytes = *reinterpret_cast<uint32_t *>(buffer);
LOG(logDEBUG1) << "DataStreamer " << index << ", Numbytes:" << numBytes;
if (numBytes == DUMMY_PACKET_VALUE) {
StopProcessing(buffer);
@ -153,6 +153,7 @@ void DataStreamer::ProcessAnImage(char *buf) {
if (!startedFlag) {
RecordFirstIndex(fnum, buf);
}
auto numBytes = *reinterpret_cast<uint32_t *>(buf);
// shortframe gotthard
if (completeBuffer) {
@ -170,7 +171,7 @@ void DataStreamer::ProcessAnImage(char *buf) {
}
memcpy(completeBuffer + ((generalData->imageSize) * adcConfigured),
buf + FIFO_HEADER_NUMBYTES + sizeof(sls_receiver_header),
(uint32_t)(*((uint32_t *)buf)));
numBytes);
if (!zmqSocket->SendData(completeBuffer,
generalData->imageSizeComplete)) {
@ -182,16 +183,15 @@ void DataStreamer::ProcessAnImage(char *buf) {
// normal
else {
if (!SendHeader(header, (uint32_t)(*((uint32_t *)buf)),
generalData->nPixelsX, generalData->nPixelsY,
if (!SendHeader(header, numBytes, generalData->nPixelsX,
generalData->nPixelsY,
false)) { // new size possibly from callback
LOG(logERROR) << "Could not send zmq header for fnum " << fnum
<< " and streamer " << index;
}
if (!zmqSocket->SendData(
buf + FIFO_HEADER_NUMBYTES + sizeof(sls_receiver_header),
(uint32_t)(*(
(uint32_t *)buf)))) { // new size possibly from callback
if (!zmqSocket->SendData(buf + FIFO_HEADER_NUMBYTES +
sizeof(sls_receiver_header),
numBytes)) { // new size possibly from callback
LOG(logERROR) << "Could not send zmq data for fnum " << fnum
<< " and streamer " << index;
}