MURE
|
Handle XSDIR file in order to extract information that could be easily retreived. More...
#include <XSDIR.hxx>
Public Member Functions | |
XSDIR (const char *base_name, const char *base_version, const char *xsdir_name=nullptr, const char *builder="STD") | |
bool | FindFirstIsotope () |
XSDIRLine * | ReadNextIsotope () |
void | SetXSDirName (const char *xsdir_name) |
int | Find (const char *search, string Line) |
find "search" in Line | |
void | ScanXSDIR () |
loops on each isotopes of the xsdir | |
void | WriteData () |
write information of xsdir in the BaseSummary.dat file | |
void | SetDataFile (const char *name="BaseSummary.dat") |
string | GetDataFile () |
void | Close () |
void | AddNewPathInDirLine (string path) |
Static Public Member Functions | |
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) |
Private Member Functions | |
int | Compare (string Line) |
return -1, 0 or 1 if fMyGoodLine<Line, fMyGoodLine==Line, or fMyGoodLine>Line | |
Private Attributes | |
string | fXSdirName |
name of the xsdir | |
string | fBaseName |
base name (endfb, jendl, ...) | |
string | fBaseVersion |
base version (6.8, 3.3, ...) | |
ifstream | XSinput |
the xsdir file | |
bool | f1stIsotope |
true is a first Isotope has been found | |
string | fBuilder |
builder of the base (STD, JOY or MOD) | |
XSDIRLine * | fMyGoodLine |
The extracted XSDIRLine. | |
string | fDataFile |
the BaseSummary file | |
string | fModifiedPath |
The modified path (if exists) | |
string | fKeepBaseVersion |
Handle XSDIR file in order to extract information that could be easily retreived.
Information are written in BaseSummary file with the following convention: Z A I BaseName BaseVersion T(K) Extension Builder xsdirline where extension is the MCNP extension (e.g. ".60c"), Builder is the base Builder which can be "STD" for a MCNP/NEA base, "JOY" for a Njoy home made base and "MOD" for a base modify by a user (e.g. multiply the fission cross section of U5 by 2). xsdirline is the line found in the xsdir with full path for nuclear data file. BaseSummary.dat file could be built from ExtractXsdir.cxx and/or ExtractTree.cxx found in MURE/Evo/utils. This 2 programs build respectively the file from a xsdir or a directory tree.
XSDIR::XSDIR | ( | const char * | base_name, |
const char * | base_version, | ||
const char * | xsdir_name = nullptr , |
||
const char * | builder = "STD" |
||
) |
Normal Constructor. if xsdir_name is not provid, looking in DATAPATH environment variable.
base_name | : name of the base (e.g. ENDFB, JEFF, JENDL) |
base_version | : base version (e.g. 6.2, 2.2, 3.2) |
xsdir_name | : xsdir file name (e.g. "xsdir") |
builder | : who built the base (STD=MCNP/NEA, JOY=NJoy home made, MOD=modification of normal cross-section) |
void XSDIR::AddNewPathInDirLine | ( | string | path | ) |
Modify the path of the nuclear data file. When NJoy build a nuclear base, it creates a "Dir" file containing the base name without path (for example "ace"). When one want to use it, the full path has to be known (/home/XS/../ace) This fonction do this job.
path | : the path (/home/XS/../, in the previous example) |
|
inline |
< close xsdir file
|
private |
return -1, 0 or 1 if fMyGoodLine<Line, fMyGoodLine==Line, or fMyGoodLine>Line
|
static |
Extract info from a line of BaseSummary.dat
Line | : a line of BaseSummary.dat |
Z | : proton number |
A | : nucleon number |
I | : isomeric state |
BaseName | : name of the base (ENDFB, JEFF, ...) |
BaseVersion | : base version (6.1, ...) |
T | : temperature in K |
Code | : MCNP code without extension (92235 if 92235.60c) |
Extension | : MCNP extension (.60c) |
Builder | : the builder (STD(MCNP/NEA), JOY(Njoy home made) or MOD(locally modified)) |
xs_filename | : the file name where nuclear data are store (e.g. /home/XS/endf602) |
DataType | : the data type of the base (1=ascii, 2=binary) |
int XSDIR::Find | ( | const char * | search, |
string | Line | ||
) |
find "search" in Line
bool XSDIR::FindFirstIsotope | ( | ) |
Find the first isotope in the xsdir file. if this is normal xsdir return true after reading the word "directory" ; if the xsdir contains only one line, it suppose that it is the result of NJoy calculation and thus the line is the first (and only) isotope (returns true).
|
inline |
< returns file name where infos are stored
XSDIRLine * XSDIR::ReadNextIsotope | ( | ) |
Read next Isotope from the xsdir file. returns a XSDIRLine *if isotope is found, else 0
void XSDIR::ScanXSDIR | ( | ) |
loops on each isotopes of the xsdir
|
inline |
< set file name where infos are stored
void XSDIR::SetXSDirName | ( | const char * | xsdir_name | ) |
Set xsdir file name. if xsdir_name=0, used DATAPATH environment variable.
void XSDIR::WriteData | ( | ) |
write information of xsdir in the BaseSummary.dat file
|
private |
true is a first Isotope has been found
|
private |
base name (endfb, jendl, ...)
|
private |
base version (6.8, 3.3, ...)
|
private |
builder of the base (STD, JOY or MOD)
|
private |
the BaseSummary file
|
private |
|
private |
The modified path (if exists)
|
private |
name of the xsdir
|
private |
the xsdir file