OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Attributes | List of all members
PeakReader Class Reference

Implements a parser and value extractor for peak files (*.peaks) More...

#include <PeakReader.h>

Public Member Functions

 PeakReader (std::string filename)
 
 ~PeakReader ()
 
void parseFile ()
 
void getPeak (int nPeak, double &radius)
 
std::size_t getNumberOfPeaks ()
 

Private Attributes

std::string filename_m
 Peak filename. More...
 
std::map< int, double > peaks_m
 all found peaks < peak number, radius > More...
 

Detailed Description

Implements a parser and value extractor for peak files (*.peaks)

Definition at line 13 of file PeakReader.h.

Constructor & Destructor Documentation

PeakReader::PeakReader ( std::string  filename)

Definition at line 7 of file PeakReader.cpp.

PeakReader::~PeakReader ( )

Definition at line 12 of file PeakReader.cpp.

Member Function Documentation

std::size_t PeakReader::getNumberOfPeaks ( )
Returns
the number of peaks in the file

Definition at line 59 of file PeakReader.cpp.

References peaks_m.

void PeakReader::getPeak ( int  nPeak,
double &  radius 
)
Parameters
nPeakis the peak number
radiusstores result [mm]

Definition at line 48 of file PeakReader.cpp.

References peaks_m.

void PeakReader::parseFile ( )

Definition at line 15 of file PeakReader.cpp.

References filename_m, and peaks_m.

Member Data Documentation

std::string PeakReader::filename_m
private

Peak filename.

Definition at line 35 of file PeakReader.h.

Referenced by parseFile().

std::map<int, double> PeakReader::peaks_m
private

all found peaks < peak number, radius >

Definition at line 38 of file PeakReader.h.

Referenced by getNumberOfPeaks(), getPeak(), and parseFile().


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