CFEL - ASG Software Suite  2.5.0
CASS
txt_parser.h
Go to the documentation of this file.
1 // Copyright (C) 2011 Lutz Foucar
2 
3 /**
4  * @file txt_parser.h contains class to parse a txt ascii file
5  *
6  * @author Lutz Foucar
7  */
8 
9 #ifndef _TXTPARSER_H_
10 #define _TXTPARSER_H_
11 
12 #include "file_parser.h"
13 
14 namespace cass
15 {
16 /** Will parse a txt files
17  *
18  * Uses the text reader to read all the events. See cass::TxtReader for details
19  * on what parameters it uses.
20  *
21  * @author Lutz Foucar
22  */
23 class TxtParser : public FileParser
24 {
25 public:
26  /** constructor
27  *
28  * @param readerpointerpair the filereader the will read the event from files
29  * @param event2posreader reference to container that maps events to the
30  * position in file, reader pair vector
31  * @param lock reference to the protector of the eventlist map
32  */
33  TxtParser(const filereaderpointerpair_t readerpointerpair,
34  event2positionreaders_t &event2posreader,
35  QReadWriteLock &lock)
36  : FileParser(readerpointerpair,event2posreader,lock)
37  {}
38 
39  /** parse the frms6 file
40  *
41  * detailed description
42  */
43  void runthis();
44 
45  /** @return the type of file parser */
46  virtual const std::string type() {return "txt";}
47 };
48 }//end namespace cass
49 #endif
contains base class for all file parsers
virtual const std::string type()
Definition: txt_parser.h:46
Will parse a txt files.
Definition: txt_parser.h:23
TxtParser(const filereaderpointerpair_t readerpointerpair, event2positionreaders_t &event2posreader, QReadWriteLock &lock)
constructor
Definition: txt_parser.h:33
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
void runthis()
parse the frms6 file
Definition: txt_parser.cpp:24