CFEL - ASG Software Suite
2.5.0
CASS
|
deserialize the data stream of shm2tcp program More...
#include <shm_deserializer.h>
Public Member Functions | |
size_t | operator() (QDataStream &stream, CASSEvent &evt) |
deserialize stream More... | |
size_t | operator() (QDataStream &stream) |
read header off from stream More... | |
![]() | |
virtual | ~TCPStreamer () |
virtual destructor More... | |
Private Attributes | |
int | _width |
the width of the framaes More... | |
std::vector< int16_t > | _hllFrameBuffer |
a buffer to store frame data that needs to be converted to the cass structur More... | |
Additional Inherited Members | |
![]() | |
typedef std::tr1::shared_ptr< TCPStreamer > | shared_pointer |
typedef the shared pointer of this More... | |
![]() | |
static TCPStreamer & | instance (const std::string &type) |
create an instance of the requested type and return a reference More... | |
static TCPStreamer & | instance () |
return a reference to the derefenced instance More... | |
![]() | |
TCPStreamer () | |
only inheritants can create this More... | |
![]() | |
static shared_pointer | _instance |
a sigleton instance More... | |
deserialize the data stream of shm2tcp program
see operator() for details
Definition at line 32 of file shm_deserializer.h.
|
virtual |
deserialize stream
stream | The stream that contains the serialized data |
evt | The CASS Event that the data should be deserialized to. |
read frame header and calculate the frame data size from the contained info. Set the eventid according to the id in the info Then read the frame from the stream into the frame buffer.
get the detector associated with the frame info id from the event
set the information of the frame to the detector
convert the hll type frame to the cass type frame
Implements cass::TCPStreamer.
Definition at line 31 of file shm_deserializer.cpp.
References cass::pixeldetector::Device::dets(), cass::CASSEvent::devices(), cass::hllDataTypes::HLL2CASS(), cass::CASSEvent::id(), cass::pixeldetector::Detector::id(), cass::CASSEvent::PixelDetectors, and QDataStream::readRawData().
|
virtual |
read header off from stream
stream | The stream that contains the serialized data |
Reimplemented from cass::TCPStreamer.
Definition at line 23 of file shm_deserializer.cpp.
References cass::hllDataTypes::Frms6FileHeader::the_width.
|
private |
a buffer to store frame data that needs to be converted to the cass structur
Definition at line 55 of file shm_deserializer.h.
|
private |
the width of the framaes
Definition at line 52 of file shm_deserializer.h.