CFEL - ASG Software Suite  2.5.0
CASS
shm_deserializer.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file shm_deserializer.h contains functors to deserialize
5  * the data stream sent by shm2tcp.
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef __SHMDESERIALIZETOPIXDET_H__
11 #define __SHMDESERIALIZETOPIXDET_H__
12 
13 class QDataStream;
14 
15 #include <vector>
16 #include <stdint.h>
17 
18 #include "tcp_streamer.h"
19 
20 namespace cass
21 {
22 class CASSEvent;
23 
24 namespace pixeldetector
25 {
26 /** deserialize the data stream of shm2tcp program
27  *
28  * see operator() for details
29  *
30  * @author Lutz Foucar
31  */
32 class SHMStreamer : public TCPStreamer
33 {
34 public:
35  /** deserialize stream
36  *
37  * @return the number of bytes read off the stream
38  * @param stream The stream that contains the serialized data
39  * @param evt The CASS Event that the data should be deserialized to.
40  */
41  size_t operator()(QDataStream& stream, CASSEvent& evt);
42 
43  /** read header off from stream
44  *
45  * @return the number of bytes read off the stream
46  * @param stream The stream that contains the serialized data
47  */
48  size_t operator()(QDataStream& stream);
49 
50 private:
51  /** the width of the framaes*/
52  int _width;
53 
54  /** a buffer to store frame data that needs to be converted to the cass structur */
55  std::vector<int16_t> _hllFrameBuffer;
56  };
57 }//end namespace pnCCD
58 }//end namespace CASS
59 
60 #endif
Event to store all LCLS Data.
Definition: cass_event.h:32
size_t operator()(QDataStream &stream, CASSEvent &evt)
deserialize stream
contains base class for all tcp streamers
deserialize the data stream of shm2tcp program
base class for all tcp streamers
Definition: tcp_streamer.h:25
std::vector< int16_t > _hllFrameBuffer
a buffer to store frame data that needs to be converted to the cass structur
int _width
the width of the framaes