Gromacs  2016.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Friends
gmx::test::EnergyFrame Class Reference

#include <programs/mdrun/tests/energyreader.h>

Description

Contains the content of an .edr frame read by an EnergyFrameReader.

The interface of this class is intended to resemble a subset of std::map.

Objects of this type are intended to be constructed by EnergyFrameReader objects, and as such will always contain valid data from an .edr file frame.

Public Member Functions

std::string getFrameName () const
 Return string that helps users identify this frame, containing time and step number. More...
 
const realat (const std::string &name) const
 Return the value read for energy name. More...
 
 EnergyFrame ()
 Constructor.
 

Friends

class EnergyFrameReader
 
void compareFrames (const std::pair< EnergyFrame, EnergyFrame > &frames, FloatingPointTolerance tolerance)
 Compare all fields of reference with all matching fields from test. More...
 

Member Function Documentation

const real & gmx::test::EnergyFrame::at ( const std::string &  name) const

Return the value read for energy name.

Exceptions
APIErrorif name was not registered with EnergyFileReader.
std::string gmx::test::EnergyFrame::getFrameName ( ) const

Return string that helps users identify this frame, containing time and step number.

Exceptions
std::bad_allocwhen out of memory

Friends And Related Function Documentation

void compareFrames ( const std::pair< EnergyFrame, EnergyFrame > &  frames,
FloatingPointTolerance  tolerance 
)
friend

Compare all fields of reference with all matching fields from test.

Ignore any key found in either reference or test that is not found in the other. For all keys found in both frames, compare the values with EXPECT_REAL_EQ_TOL and the given tolerance.


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