OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
PeakReader.h
Go to the documentation of this file.
1//
2// Class PeakReader
3// Implements a parser and value extractor for peak files (*.peaks)
4//
5// Copyright (c) 2017 - 2018, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6// All rights reserved
7//
8// Implemented as part of the PhD thesis
9// "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10// and the paper
11// "Matching of turn pattern measurements for cyclotrons using multiobjective optimization"
12// (https://doi.org/10.1103/PhysRevAccelBeams.22.064602)
13//
14// This file is part of OPAL.
15//
16// OPAL is free software: you can redistribute it and/or modify
17// it under the terms of the GNU General Public License as published by
18// the Free Software Foundation, either version 3 of the License, or
19// (at your option) any later version.
20//
21// You should have received a copy of the GNU General Public License
22// along with OPAL. If not, see <https://www.gnu.org/licenses/>.
23//
24#ifndef __PEAKREADER_H__
25#define __PEAKREADER_H__
26
27#include <string>
28#include <map>
29
31
33
34public:
35
36 PeakReader(std::string filename);
38
39 void parseFile();
40
45 void getPeak(int nPeak, double& radius);
46
50 std::size_t getNumberOfPeaks();
51
52private:
54 std::string filename_m;
55
57 std::map<int, double> peaks_m;
58};
59
60#endif
std::string filename_m
Peak filename.
Definition: PeakReader.h:54
std::map< int, double > peaks_m
all found peaks < peak number, radius >
Definition: PeakReader.h:57
std::size_t getNumberOfPeaks()
Definition: PeakReader.cpp:82
void parseFile()
Definition: PeakReader.cpp:38
PeakReader(std::string filename)
Definition: PeakReader.cpp:30
void getPeak(int nPeak, double &radius)
Definition: PeakReader.cpp:71