MURE
Loading...
Searching...
No Matches
SerpentResultOutputReader.hxx
Go to the documentation of this file.
1/*
2 This file is part of MURE,
3 Copyright (C) 2007-2021 MURE developers.
4
5 MURE is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 MURE is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with MURE. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#ifndef SERPENTRESULTOUTPUTREADER_HXX
20#define SERPENTRESULTOUTPUTREADER_HXX
21#include <cmath>
22#include <utility>
23#include <algorithm>
24#include <sstream>
25#include <string>
26#include <vector>
27
29#include "libValErr/ValErr.hxx"
30
32
38namespace Serpent
39{
40
42
52{
53 public:
55 ~ResultOutputReader() override;
56 ValErr_t GetKeff() const;
57 void Clear() override;
58 string Print() override;
60 void Read(const vector < string > &fileNames);
61 void Read(const string &fileName) override;
62
63 private:
64 typedef vector < double > Row;
65 typedef vector < pair < string, Row *> > Table;
66 static const char COMMENT_SIGN = '%';
67 static const unsigned VALUE_INDEX = 0;
68 static const unsigned STD_INDEX = 1;
70 Row *GetRow(stringstream &stream) const;
71 void ParseLine(const string &line);
72 Table *GetMultiRunData(const vector < Table *> &dataVector);
73
74 protected:
75 void ParseBlock(const string &block) override;
76 Table *GetData();
77};
78
79
80}
81
82#endif // SERPENTRESULTOUTPUTREADER_HXX
Definition SerpentOutputReader.hxx:72
Definition SerpentResultOutputReader.hxx:52
ValErr_t GetKeff() const
calculates and returns keff
Definition SerpentResultOutputReader.cxx:109
Row * GetRow(stringstream &stream) const
gets data row
Definition SerpentResultOutputReader.cxx:60
static const unsigned VALUE_INDEX
Definition SerpentResultOutputReader.hxx:67
void Read(const vector< string > &fileNames)
read multiple files (for multi-run)
Definition SerpentResultOutputReader.cxx:210
ResultOutputReader()
constructor
Definition SerpentResultOutputReader.cxx:31
void ParseLine(const string &line)
parses line
Definition SerpentResultOutputReader.cxx:81
ResultOutputReader * GetNewInstance() override
creates new instance (for multi-run)
Definition SerpentResultOutputReader.cxx:154
Table * GetMultiRunData(const vector< Table * > &dataVector)
calculates equivalent table for multi run
Definition SerpentResultOutputReader.cxx:166
vector< pair< string, Row * > > Table
Definition SerpentResultOutputReader.hxx:65
vector< double > Row
Definition SerpentResultOutputReader.hxx:64
void Clear() override
clears data
Definition SerpentResultOutputReader.cxx:52
static const char COMMENT_SIGN
Definition SerpentResultOutputReader.hxx:66
void ParseBlock(const string &block) override
parses block
Definition SerpentResultOutputReader.cxx:96
~ResultOutputReader() override
destructor
Definition SerpentResultOutputReader.cxx:41
static const unsigned STD_INDEX
Definition SerpentResultOutputReader.hxx:68
string Print() override
Printing method used when multi-run data is merged into one file.
Definition SerpentResultOutputReader.cxx:130
Table * GetData()
returns all data - for copy
Definition SerpentResultOutputReader.cxx:160
Table * fData
Definition SerpentResultOutputReader.hxx:69
the namespace use to couple MURE and Serpent

MURE Project, documentation generated by Doxygen 1.9.7 - Fri Jan 19 2024