1 #ifndef _BINARYFORMAT2_
2 #define _BINARYFORMAT2_
29 void write(ofstream &out);
30 void read(ifstream &in);
41 void write(ofstream &out);
42 void read(ifstream &in);
54 void write(ofstream &out);
55 void read(ifstream &in);
64 void write(ofstream &out);
65 void read(ifstream &in);
72 out.write((
char*)&Version,
sizeof(Version));
73 out.write((
char*)&Time,
sizeof(Time));
74 out.write((
char*)&K,
sizeof(K));
75 out.write((
char*)&Kerr,
sizeof(Kerr));
76 out.write((
char*)&NCells,
sizeof(NCells));
81 in.read((
char*)&Version,
sizeof(Version));
82 in.read((
char*)&Time,
sizeof(Time));
83 in.read((
char*)&K,
sizeof(K));
84 in.read((
char*)&Kerr,
sizeof(Kerr));
85 in.read((
char*)&NCells,
sizeof(NCells));
90 out.write((
char*)&CellNumber,
sizeof(CellNumber));
91 out.write((
char*)&Volume,
sizeof(Volume));
92 out.write((
char*)&Flux,
sizeof(Flux));
93 out.write((
char*)&FluxErr,
sizeof(FluxErr));
94 out.write((
char*)&NNucleusRecords,
sizeof(NNucleusRecords));
99 in.read((
char*)&CellNumber,
sizeof(CellNumber));
100 in.read((
char*)&Volume,
sizeof(Volume));
101 in.read((
char*)&Flux,
sizeof(Flux));
102 in.read((
char*)&FluxErr,
sizeof(FluxErr));
103 in.read((
char*)&NNucleusRecords,
sizeof(NNucleusRecords));
108 out.write((
char*)&Z,
sizeof(Z));
109 out.write((
char*)&A,
sizeof(A));
110 out.write((
char*)&I,
sizeof(I));
111 out.write((
char*)&Mass,
sizeof(Mass));
112 out.write((
char*)&Proportion,
sizeof(Proportion));
113 out.write((
char*)&NReactionRecords,
sizeof(NReactionRecords));
118 in.read((
char*)&Z,
sizeof(Z));
119 in.read((
char*)&A,
sizeof(A));
120 in.read((
char*)&I,
sizeof(I));
121 in.read((
char*)&Mass,
sizeof(Mass));
122 in.read((
char*)&Proportion,
sizeof(Proportion));
123 in.read((
char*)&NReactionRecords,
sizeof(NReactionRecords));
128 out.write((
char*)&Code,
sizeof(Code));
129 out.write((
char*)&Sigma,
sizeof(Sigma));
130 out.write((
char*)&SigmaErr,
sizeof(SigmaErr));
135 in.read((
char*)&Code,
sizeof(Code));
136 in.read((
char*)&Sigma,
sizeof(Sigma));
137 in.read((
char*)&SigmaErr,
sizeof(SigmaErr));
float Proportion
Number of this nuclei in cell.
Definition: BinaryFormat2.hxx:52
Record of a reaction in a binary file.
Definition: BinaryFormat2.hxx:59
void write(ofstream &out)
Write the record into a stream.
Definition: BinaryFormat2.hxx:106
Record of a nucleus in a binary file.
Definition: BinaryFormat2.hxx:46
short Z
Proton number of the nucleus.
Definition: BinaryFormat2.hxx:48
float Mass
Atomic mass.
Definition: BinaryFormat2.hxx:51
float SigmaErr
Cross-section error.
Definition: BinaryFormat2.hxx:63
void read(ifstream &in)
Read the record from a stream.
Definition: BinaryFormat2.hxx:133
short I
Isomeric state of the nucleus.
Definition: BinaryFormat2.hxx:50
short Code
Reaction code.
Definition: BinaryFormat2.hxx:61
short NReactionRecords
Number of reaction records of this nucleus.
Definition: BinaryFormat2.hxx:53
void write(ofstream &out)
Write the record into a stream.
Definition: BinaryFormat2.hxx:126
float Sigma
Reaction cross-section.
Definition: BinaryFormat2.hxx:62
short A
Nucleon number of the nucleus.
Definition: BinaryFormat2.hxx:49
void read(ifstream &in)
Read the record from a stream.
Definition: BinaryFormat2.hxx:116