MURE
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Serpent::DetectorOutputReader Class Reference

#include <SerpentDetectorOutputReader.hxx>

Inheritance diagram for Serpent::DetectorOutputReader:
Serpent::OutputReader

Public Member Functions

 DetectorOutputReader ()
 constructor
 
 ~DetectorOutputReader () override
 destructor
 
void Clear () override
 cleaning data
 
int GetNumberOfTallies () const
 returns number of tallies read
 
TallyResultGetTally (int index)
 returns tally result at position "index"
 
void Read (const string &fileName) override
 Reads and parses single file.
 
void Read (const vector< string > &fileNames)
 Reads and parses multiple files (multi-run)
 
string Print () override
 Printing method used when multi-run data is merged into one file.
 
DetectorOutputReaderGetNewInstance () override
 creates new reader (for multi-run)
 
- Public Member Functions inherited from Serpent::OutputReader
 OutputReader ()
 constructor
 
virtual ~OutputReader ()
 destructor
 
virtual void Read (const string &fileName)
 
bool isFileRead () const
 returns if file was read
 
virtual void Clear ()=0
 
virtual string Print ()=0
 
virtual void Write (const string &fileName)
 writes data using Print method into new result file (for multi-run)
 
virtual OutputReaderGetNewInstance ()=0
 

Protected Member Functions

void ParseBlock (const string &block) override
 parses block of data between semicolons
 
TallyDataGetData ()
 returns all the data (for copy constructor)
 
- Protected Member Functions inherited from Serpent::OutputReader
bool IsWhite (const string &line) const
 resturns true if line conststs of only white spaces
 
char GetSeparator () const
 resturns sepeparator (white space or semiclon)
 
bool HasPermision (const string &rowName) const
 returns true if row name(heading) is added to allowe rows
 
void AddAllowedRow (const string &rowName)
 adds row head to rows which are allowed to be read
 
void AddForbiddenRow (const string &rowName)
 adds row head to rows which are NOT allowed to be read
 
void AllowRowsByDefault ()
 sets default perrmision to read rows to true
 
void ForbiddRowsByDefault ()
 sets default perrmision to read rows to false
 
void SetSeparator (char separator)
 sets separator
 
virtual void ParseBlock (const string &block)=0
 
vector< string > GetPermittedRowNames () const
 gets all rows which can be read
 

Private Member Functions

BinResultParseTallyLine (const string &line) const
 parses detector line in detector block in output file
 
void ParseEnergyBlock (istringstream &stream, const string &tallyName)
 parses energy grid block in output file
 
void ParseTallyBlock (istringstream &stream, const string &tallyName)
 parses detector block in output file
 
int GetTallyNumber (const string &name) const
 parses heading of detector block (e.g DETd3) to get tally number
 
bool IsEnergyGrid (const string &name) const
 answer if parsed block is energy grid (can be detector) data.
 
void FillEnergyGridsInTallies ()
 fills energy grid data in tally results
 
TallyDataGetMultiRunData (const vector< TallyData * > &tallyDataVector)
 sum data from a suite of multi-run tallies
 

Private Attributes

TallyDatafData
 

Static Private Attributes

static const string PREFIX = string("DETd")
 
static const char ENERGY_GRID_PREFIX = 'E'
 
static const unsigned ENERGY_GRID_VALUE_COLUMN = 1
 

Additional Inherited Members

- Static Protected Attributes inherited from Serpent::OutputReader
static const char COMMENT_CHAR = '%'
 

Detailed Description

Define a reader class.

Author
J.Hajnrych
Version
1.0

Constructor & Destructor Documentation

◆ DetectorOutputReader()

Serpent::DetectorOutputReader::DetectorOutputReader ( )

constructor

◆ ~DetectorOutputReader()

Serpent::DetectorOutputReader::~DetectorOutputReader ( )
override

destructor

Member Function Documentation

◆ Clear()

void Serpent::DetectorOutputReader::Clear ( )
overridevirtual

cleaning data

Implements Serpent::OutputReader.

◆ FillEnergyGridsInTallies()

void Serpent::DetectorOutputReader::FillEnergyGridsInTallies ( )
private

fills energy grid data in tally results

◆ GetData()

TallyData * Serpent::DetectorOutputReader::GetData ( )
protected

returns all the data (for copy constructor)

◆ GetMultiRunData()

TallyData * Serpent::DetectorOutputReader::GetMultiRunData ( const vector< TallyData * > &  tallyDataVector)
private

sum data from a suite of multi-run tallies

◆ GetNewInstance()

DetectorOutputReader * Serpent::DetectorOutputReader::GetNewInstance ( )
overridevirtual

creates new reader (for multi-run)

Implements Serpent::OutputReader.

◆ GetNumberOfTallies()

int Serpent::DetectorOutputReader::GetNumberOfTallies ( ) const

returns number of tallies read

◆ GetTally()

TallyResult * Serpent::DetectorOutputReader::GetTally ( int  index)

returns tally result at position "index"

◆ GetTallyNumber()

int Serpent::DetectorOutputReader::GetTallyNumber ( const string &  name) const
private

parses heading of detector block (e.g DETd3) to get tally number

◆ IsEnergyGrid()

bool Serpent::DetectorOutputReader::IsEnergyGrid ( const string &  name) const
private

answer if parsed block is energy grid (can be detector) data.

◆ ParseBlock()

void Serpent::DetectorOutputReader::ParseBlock ( const string &  block)
overrideprotectedvirtual

parses block of data between semicolons

Implements Serpent::OutputReader.

◆ ParseEnergyBlock()

void Serpent::DetectorOutputReader::ParseEnergyBlock ( istringstream &  stream,
const string &  tallyName 
)
private

parses energy grid block in output file

◆ ParseTallyBlock()

void Serpent::DetectorOutputReader::ParseTallyBlock ( istringstream &  stream,
const string &  tallyName 
)
private

parses detector block in output file

◆ ParseTallyLine()

BinResult * Serpent::DetectorOutputReader::ParseTallyLine ( const string &  line) const
private

parses detector line in detector block in output file

◆ Print()

string Serpent::DetectorOutputReader::Print ( )
overridevirtual

Printing method used when multi-run data is merged into one file.

Implements Serpent::OutputReader.

◆ Read() [1/2]

void Serpent::DetectorOutputReader::Read ( const string &  fileName)
overridevirtual

Reads and parses single file.

Reimplemented from Serpent::OutputReader.

◆ Read() [2/2]

void Serpent::DetectorOutputReader::Read ( const vector< string > &  fileNames)

Reads and parses multiple files (multi-run)

Member Data Documentation

◆ ENERGY_GRID_PREFIX

const char Serpent::DetectorOutputReader::ENERGY_GRID_PREFIX = 'E'
staticprivate

◆ ENERGY_GRID_VALUE_COLUMN

const unsigned Serpent::DetectorOutputReader::ENERGY_GRID_VALUE_COLUMN = 1
staticprivate

◆ fData

TallyData* Serpent::DetectorOutputReader::fData
private

◆ PREFIX

const string Serpent::DetectorOutputReader::PREFIX = string("DETd")
staticprivate

The documentation for this class was generated from the following files:

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