laura is hosted by Hepforge, IPPP Durham
Laura++  v2r1p1
A maximum likelihood fitting package for performing Dalitz-plot analysis.

Class for parsing text files. More...

#include <LauTextFileParser.hh>

Public Member Functions

 LauTextFileParser (const char *s)
 Constructor. More...
 
 LauTextFileParser (const std::string &s)
 Constructor. More...
 
 LauTextFileParser (const TString &s)
 Constructor. More...
 
virtual ~LauTextFileParser ()
 Destructor. More...
 
void processFile ()
 Parse the file. More...
 
std::vector< std::string > getLine (int lineNo)
 Retrieve the specified line. More...
 
std::vector< std::string > getNextLine ()
 Retrieve the next line. More...
 
void resetLineNumber (int lineNo)
 Set the line number. More...
 

Private Types

typedef std::map< int,
std::vector< std::string > > 
LineMap
 The type used to contain the parsed text. More...
 

Private Attributes

std::string theFile_
 The name of the file. More...
 
LineMap lineMap_
 The parsed text. More...
 
int totalLines_
 The total number of lines in the file. More...
 
int lineNumber_
 The current line number. More...
 

Detailed Description

Class for parsing text files.

Class for parsing text files. Each line is split on spaces.

Definition at line 32 of file LauTextFileParser.hh.

Member Typedef Documentation

typedef std::map<int, std::vector<std::string> > LauTextFileParser::LineMap
private

The type used to contain the parsed text.

Definition at line 82 of file LauTextFileParser.hh.

Constructor & Destructor Documentation

LauTextFileParser::LauTextFileParser ( const char *  s)

Constructor.

Parameters
[in]sfilename

Definition at line 28 of file LauTextFileParser.cc.

LauTextFileParser::LauTextFileParser ( const std::string &  s)

Constructor.

Parameters
[in]sfilename

Definition at line 35 of file LauTextFileParser.cc.

LauTextFileParser::LauTextFileParser ( const TString &  s)

Constructor.

Parameters
[in]sfilename

Definition at line 42 of file LauTextFileParser.cc.

LauTextFileParser::~LauTextFileParser ( )
virtual

Destructor.

Definition at line 49 of file LauTextFileParser.cc.

Member Function Documentation

std::vector< std::string > LauTextFileParser::getLine ( int  lineNo)

Retrieve the specified line.

Parameters
[in]lineNothe line number
Returns
the specified line

Definition at line 127 of file LauTextFileParser.cc.

std::vector< std::string > LauTextFileParser::getNextLine ( )

Retrieve the next line.

Returns
the next line

Definition at line 118 of file LauTextFileParser.cc.

void LauTextFileParser::processFile ( )

Parse the file.

Definition at line 59 of file LauTextFileParser.cc.

void LauTextFileParser::resetLineNumber ( int  lineNo)
inline

Set the line number.

Parameters
[in]lineNothe new line number

Definition at line 76 of file LauTextFileParser.hh.

Member Data Documentation

LineMap LauTextFileParser::lineMap_
private

The parsed text.

Definition at line 88 of file LauTextFileParser.hh.

int LauTextFileParser::lineNumber_
private

The current line number.

Definition at line 94 of file LauTextFileParser.hh.

std::string LauTextFileParser::theFile_
private

The name of the file.

Definition at line 85 of file LauTextFileParser.hh.

int LauTextFileParser::totalLines_
private

The total number of lines in the file.

Definition at line 91 of file LauTextFileParser.hh.


The documentation for this class was generated from the following files: