CFEL - ASG Software Suite  2.5.0
CASS
frms6_reader.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file frms6_reader.h contains class to read frms6 files
5  * created by Xonline.
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef _FRMS6READERTOPIXDET_H_
11 #define _FRMS6READERTOPIXDET_H_
12 
13 #include <tr1/memory>
14 #include <fstream>
15 #include <string>
16 #include <vector>
17 
18 #include "file_reader.h"
19 
20 #include "hlltypes.hpp"
21 
22 namespace cass
23 {
24 class CASSEvent;
25 
26 namespace pixeldetector
27 {
28 /** class for reading frms6 files
29  *
30  * @author to be determined
31  */
32 class Frms6Reader : public FileReader
33 {
34 public:
35  /** constructor */
36  Frms6Reader();
37 
38  /** read the frms6 file contents put them into cassevent
39  *
40  * @return true when the workers should work on the filled cassevent,
41  * false if not.
42  * @param file the file that contains the data to be put into the cassevent
43  * @param event the CASSEvent where the data will be put into
44  */
45  bool operator()(std::ifstream &file, CASSEvent& event);
46 
47  /** load the settings of the reader */
48  void loadSettings();
49 
50  /** read the file header
51  *
52  * @param file the filestream to the header information of the file
53  */
54  void readHeaderInfo(std::ifstream &file);
55 
56 private:
57  /** the frms6 file header */
59 
60  /** header that comes before every frame */
62 
63  /** a buffer to not allocate the read buffer for each event */
64  std::vector<hllDataTypes::pixel> _hllFrameBuffer;
65 };
66 }//end namespace pixeldetector
67 }//end namespace cass
68 #endif
Event to store all LCLS Data.
Definition: cass_event.h:32
hllDataTypes::FrameHeader _frameHead
header that comes before every frame
Definition: frms6_reader.h:61
contains the layout of the hll data types and conversion to cass data types
the header that describe the frames
Definition: hlltypes.hpp:82
bool operator()(std::ifstream &file, CASSEvent &event)
read the frms6 file contents put them into cassevent
base class for all file readers
Definition: file_reader.h:24
contains base class for all file readers
class for reading frms6 files
Definition: frms6_reader.h:32
void loadSettings()
load the settings of the reader
void readHeaderInfo(std::ifstream &file)
read the file header
hllDataTypes::Frms6FileHeader _fileHead
the frms6 file header
Definition: frms6_reader.h:58
std::vector< hllDataTypes::pixel > _hllFrameBuffer
a buffer to not allocate the read buffer for each event
Definition: frms6_reader.h:64