MURE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros
XSDIR.hxx
Go to the documentation of this file.
1 #ifndef _XSDIR_
2 #define _XSDIR_
3 
9 #include <string>
10 #include <fstream>
11 #include "XSDIRLine.hxx"
12 using namespace std;
13 
15 
27 class XSDIR
28 {
29  public:
38  XSDIR(const char *base_name,const char* base_version, const char *xsdir_name=0,const char *builder="STD");
45  bool FindFirstIsotope();
50  XSDIRLine* ReadNextIsotope();
55  void SetXSDirName(const char *xsdir_name);
56  int Find(const char *search,string Line);
57  void ScanXSDIR();
58  void WriteData();
59 
74  static void ExtractDataLine(string Line,int &Z,int &A,int &I, string &BaseName,string &BaseVersion,double &T,
75  string &Code,string &Extension,string &Builder, string &xs_filename, int &DataType);
76  void SetDataFile(const char *name="BaseSummary.dat"){fDataFile=name;}
77  string GetDataFile(){return fDataFile;}
78  void Close(){XSinput.close();}
79 
86  void AddNewPathInDirLine(string path);
87 
88  private:
89 
90  int Compare(string Line);
91 
92  string fXSdirName;
93  string fBaseName;
94  string fBaseVersion;
95  ifstream XSinput;
96  bool fOriginal;
97  bool f1stIsotope;
98  string fBuilder;
100  string fDataFile;
101  string fModifiedPath;
102  string fKeepBaseVersion; //save the base version
103 };
104 
105 #endif
106 
string fBuilder
builder of the base (STD, JOY or MOD)
Definition: XSDIR.hxx:98
Extract all parameters from an XSDIR line.
Definition: XSDIRLine.hxx:20
string fKeepBaseVersion
Definition: XSDIR.hxx:102
Handle XSDIR file in order to extract information that could be easily retreived. ...
Definition: XSDIR.hxx:27
string fBaseVersion
base version (6.8,3.3,...)
Definition: XSDIR.hxx:94
string fBaseName
base name (endfb,jendl,...)
Definition: XSDIR.hxx:93
ifstream XSinput
the xsdir file
Definition: XSDIR.hxx:95
string fDataFile
the BaseSummary file
Definition: XSDIR.hxx:100
string fXSdirName
name of the xsdir
Definition: XSDIR.hxx:92
bool fOriginal
true for original MCNP xsdir
Definition: XSDIR.hxx:96
XSDIRLine * fMyGoodLine
The extracted XSDIRLine.
Definition: XSDIR.hxx:99
string fModifiedPath
The modified path (if exists)
Definition: XSDIR.hxx:101
bool f1stIsotope
true is a first Isotope has been found
Definition: XSDIR.hxx:97
void SetDataFile(const char *name="BaseSummary.dat")
set file name where infos are stored
Definition: XSDIR.hxx:76
void Close()
close xsdir file
Definition: XSDIR.hxx:78
string GetDataFile()
returns file name where infos are stored
Definition: XSDIR.hxx:77
Header file for XSDIRLine class.

MURE Project, documentation generated by Doxygen 1.8.5 - Mon Nov 17 2014