MURE
Loading...
Searching...
No Matches
XSDIR.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 _XSDIR_
20#define _XSDIR_
21
27#include <string>
28#include <fstream>
29
30#include "XSDIRLine.hxx"
31
32class XSDIRLine;
33
34using namespace std;
35
37
49class XSDIR
50{
51 public:
60 XSDIR(const char *base_name, const char *base_version, const char *xsdir_name = nullptr, const char *builder = "STD");
67 bool FindFirstIsotope();
77 void SetXSDirName(const char *xsdir_name);
78 int Find(const char *search, string Line);
79 void ScanXSDIR();
80 void WriteData();
96 static void ExtractDataLine(string Line, int &Z, int &A, int &I, string &BaseName, string &BaseVersion, double &T,
97 string &Code, string &Extension, string &Builder, string &xs_filename, int &DataType);
98 void SetDataFile(const char *name = "BaseSummary.dat")
99 {
100 fDataFile = name;
101 }
102 string GetDataFile()
103 {
104 return fDataFile;
105 }
106 void Close()
107 {
108 XSinput.close();
109 }
117 void AddNewPathInDirLine(string path);
118
119 private:
120
121 int Compare(string Line);
122
123 string fXSdirName;
124 string fBaseName;
126 ifstream XSinput;
127 // bool fOriginal; //!< true for original MCNP xsdir
129 string fBuilder;
131 string fDataFile;
133 string fKeepBaseVersion; //save the base version
134};
135
136#endif
137
Header file for XSDIRLine class.
Extract all parameters from an XSDIR line.
Definition XSDIRLine.hxx:43
Handle XSDIR file in order to extract information that could be easily retreived.
Definition XSDIR.hxx:50
bool FindFirstIsotope()
Definition XSDIR.cxx:60
string fBaseName
base name (endfb, jendl, ...)
Definition XSDIR.hxx:124
string fModifiedPath
The modified path (if exists)
Definition XSDIR.hxx:132
int Compare(string Line)
return -1, 0 or 1 if fMyGoodLine<Line, fMyGoodLine==Line, or fMyGoodLine>Line
Definition XSDIR.cxx:501
bool f1stIsotope
true is a first Isotope has been found
Definition XSDIR.hxx:128
string fBuilder
builder of the base (STD, JOY or MOD)
Definition XSDIR.hxx:129
ifstream XSinput
the xsdir file
Definition XSDIR.hxx:126
XSDIRLine * fMyGoodLine
The extracted XSDIRLine.
Definition XSDIR.hxx:130
XSDIRLine * ReadNextIsotope()
Definition XSDIR.cxx:108
void SetXSDirName(const char *xsdir_name)
Definition XSDIR.cxx:87
string fXSdirName
name of the xsdir
Definition XSDIR.hxx:123
int Find(const char *search, string Line)
find "search" in Line
Definition XSDIR.cxx:428
void WriteData()
write information of xsdir in the BaseSummary.dat file
Definition XSDIR.cxx:445
void Close()
Definition XSDIR.hxx:106
string fKeepBaseVersion
Definition XSDIR.hxx:133
void SetDataFile(const char *name="BaseSummary.dat")
Definition XSDIR.hxx:98
void AddNewPathInDirLine(string path)
Definition XSDIR.cxx:594
string fBaseVersion
base version (6.8, 3.3, ...)
Definition XSDIR.hxx:125
string GetDataFile()
Definition XSDIR.hxx:102
string fDataFile
the BaseSummary file
Definition XSDIR.hxx:131
static void ExtractDataLine(string Line, int &Z, int &A, int &I, string &BaseName, string &BaseVersion, double &T, string &Code, string &Extension, string &Builder, string &xs_filename, int &DataType)
Definition XSDIR.cxx:568
void ScanXSDIR()
loops on each isotopes of the xsdir
Definition XSDIR.cxx:436
the namespace of the Standard C++

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