CFEL - ASG Software Suite  2.5.0
CASS
raw_sss_parser.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file raw_sss_parser.h contains class to parse a file
5  * containing the commercial ccd images created by Per Johnsonns program.
6  *
7  * @author Lutz Foucar
8  */
9 
10 #ifndef _RAWSSSPARSER_H_
11 #define _RAWSSSPARSER_H_
12 
13 #include "file_parser.h"
14 
15 namespace cass
16 {
17 /** Will parse a file containing commercial ccd images.
18  *
19  * @author Lutz Foucar
20  */
21 class RAWSSSParser : public FileParser
22 {
23 public:
24  /** constructor
25  *
26  * @param readerpointerpair the filereader the will read the event from files
27  * @param event2posreader reference to container that maps events to the
28  * position in file, reader pair vector
29  * @param lock reference to the protector of the eventlist map
30  */
31  RAWSSSParser(const filereaderpointerpair_t readerpointerpair,
32  event2positionreaders_t &event2posreader,
33  QReadWriteLock &lock)
34  :FileParser(readerpointerpair,event2posreader,lock)
35  {}
36 
37  /** parse the raw.sss file
38  *
39  * read the header information and then the individual frames timestamp. Save
40  * the position where the timestamp is found then skip the frame data to read
41  * the next frames timestamp. Do this until the number of frames reported in
42  * the header have been read. Check if we are at the end of the file, if not
43  * throw an error.
44  */
45  void run();
46 
47  /** @return the type of file parser */
48  virtual const std::string type() {return "sss";}
49 };
50 }//end namespace cass
51 #endif
contains base class for all file parsers
void run()
parse the raw.sss file
RAWSSSParser(const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock)
constructor
std::pair< std::tr1::shared_ptr< FileReader >, FilePointer > filereaderpointerpair_t
pair of a file pointer with the associated file reader
Definition: cass.h:276
Will parse a file containing commercial ccd images.
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
virtual const std::string type()