10 #include <QtCore/QDataStream>
21 using Streaming::operator >>;
41 evt.
id() = frameHead.external_id;
42 const size_t framesize(_width * frameHead.the_height);
44 _hllFrameBuffer.resize(framesize);
45 stream.
readRawData(reinterpret_cast<char*>(&_hllFrameBuffer.front()), framesizeBytes);
46 nBytesRead += framesizeBytes;
51 if(devIt == devices.end())
52 throw runtime_error(
"SHMStreamer: There is no pixeldetector device within the CASSEvent");
53 Device &dev(dynamic_cast<Device&>(*(devIt->second)));
58 det.columns() = _width/2;
59 det.rows() = frameHead.the_height*2;
60 det.frame().resize(_hllFrameBuffer.size());
63 const size_t quadrantColumns = frameHead.the_height;
64 const size_t quadrantRows = quadrantColumns;
65 const size_t HLLColumns = _width;
Event to store all LCLS Data.
file contains declaration of the CASSEvent
void HLL2CASS(const inputContainerType &HLLMatrix, outputContainerType &CASSMatrix, size_t quadrantColumns, size_t quadrantRows, size_t HLLColumns)
convert a linearised matrix in the hll format to the CASS format
detectors_t & dets()
instrument setter
contains the layout of the hll data types and conversion to cass data types
contains functors to deserialize the data stream sent by shm2tcp.
readRawData(char *s, int len)
size_t operator()(QDataStream &stream, CASSEvent &evt)
deserialize stream
devices_t & devices()
setters
std::map< Device, DeviceBackend::shared_pointer > devices_t
mapping from device type to handler instance
contains container for simple pixel detector data
the device containing pixel detector data
Detector containing a ccd camera image.
int16_t pixel
define a pixel