CFEL - ASG Software Suite  2.5.0
CASS
lma_parser.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file lma_parser.h contains class to parse a lma file
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _LMAPARSER_H_
10 #define _LMAPARSER_H_
11 
12 #include "file_parser.h"
13 
14 namespace cass
15 {
16 namespace ACQIRIS
17 {
18 /** Will parse a lma file
19  *
20  * @author Lutz Foucar
21  */
22 class LMAParser : public FileParser
23 {
24 public:
25  /** constructor
26  *
27  * @param readerpointerpair the filereader the will read the event from files
28  * @param event2posreader reference to container that maps events to the
29  * position in file, reader pair vector
30  * @param lock reference to the protector of the eventlist map
31  */
32  LMAParser(const filereaderpointerpair_t readerpointerpair,
33  event2positionreaders_t &event2posreader,
34  QReadWriteLock &lock)
35  :FileParser(readerpointerpair,event2posreader,lock)
36  {}
37 
38  /** parse the lma file
39  *
40  * first read the headers and check whether this parser is suitable for
41  * reading this kind of waveforms.\n
42  * Go through all events an remember the position and correlate them with
43  * the even id.\n
44  * since we zero substracted the waveform in the lma file, we need to
45  * iterate through the waveform sinpplets called pulses and find out how
46  * long they are to be able to jump to the next event.
47  */
48  void runthis();
49 
50  /** @return the type of file parser */
51  virtual const std::string type() {return "lma";}
52 };
53 }//end namespace Acqiris
54 }//end namespace cass
55 #endif
LMAParser(const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock)
constructor
Definition: lma_parser.h:32
virtual const std::string type()
Definition: lma_parser.h:51
contains base class for all file parsers
void runthis()
parse the lma file
Definition: lma_parser.cpp:24
std::pair< std::tr1::shared_ptr< FileReader >, FilePointer > filereaderpointerpair_t
pair of a file pointer with the associated file reader
Definition: cass.h:276
base class for all file parsers
Definition: file_parser.h:29
std::map< uint64_t, positionreaders_t > event2positionreaders_t
the list of events contained in a file with the associated position and reader
Definition: cass.h:282
Will parse a lma file.
Definition: lma_parser.h:22