CFEL - ASG Software Suite  2.5.0
CASS
lma_reader.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file lma_reader.h contains class to read lma files
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _LMAREADER_H_
10 #define _LMAREADER_H_
11 
12 #include <tr1/memory>
13 #include <fstream>
14 #include <string>
15 
16 #include "file_reader.h"
17 #include "acqiris_device.hpp"
18 
19 namespace cass
20 {
21 class CASSEvent;
22 
23 namespace ACQIRIS
24 {
25 /** class for reading lma files
26  *
27  * read an event in lma file format from a given position in a file stream and
28  * put the contents in the cassvent after conversion.
29  *
30  * @author Lutz Foucar
31  */
32 class LmaReader : public FileReader
33 {
34 public:
35  /** constructor */
36  LmaReader();
37 
38  /** read the lma 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  /** acqiris device where we store the file header information */
59 
60  /** bitmask describing which channels are active in the instrument */
62 };
63 }//end namespace acqiris
64 }//end namespace cass
65 #endif
uint32_t _usedChannelBitmask
bitmask describing which channels are active in the instrument
Definition: lma_reader.h:61
Event to store all LCLS Data.
Definition: cass_event.h:32
void readHeaderInfo(std::ifstream &file)
read the file header
Definition: lma_reader.cpp:33
bool operator()(std::ifstream &file, CASSEvent &event)
read the lma file contents put them into cassevent
Definition: lma_reader.cpp:69
An Acqiris Instrument.
class for reading lma files
Definition: lma_reader.h:32
base class for all file readers
Definition: file_reader.h:24
LmaReader()
constructor
Definition: lma_reader.cpp:25
ACQIRIS::Instrument _instrument
acqiris device where we store the file header information
Definition: lma_reader.h:58
contains base class for all file readers
void loadSettings()
load the settings of the reader
Definition: lma_reader.cpp:29
file contains the declaration of the acqiris part of the CASSEvent