OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
H5PartWrapper Class Referenceabstract

#include <H5PartWrapper.h>

Inheritance diagram for H5PartWrapper:
Collaboration diagram for H5PartWrapper:

Public Member Functions

virtual ~H5PartWrapper ()
void close ()
double getLastPosition ()
virtual void readHeader ()=0
virtual void readStep (PartBunch_t *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)=0
virtual void writeHeader ()=0
virtual void writeStep (PartBunch_t *, const std::map< std::string, double > &)=0
virtual bool predecessorIsSameFlavour () const =0
void storeCavityInformation ()
size_t getNumParticles () const

Protected Member Functions

 H5PartWrapper (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
 H5PartWrapper (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR)
void open (h5_int32_t flags)
void copyFile (const std::string &sourceFile, int lastStep=-1, h5_int32_t flags=H5_O_WRONLY)
void copyFileSystem (const std::string &sourceFile)
void copyHeader (h5_file_t source)
void copyStep (h5_file_t source, int step)
void copyStepHeader (h5_file_t source)
void copyStepData (h5_file_t source)
void sendFailureMessage (bool failed, const std::string &where, const std::string &what)
void receiveFailureMessage (int sourceNode, const std::string &where, const std::string &what)

Static Protected Member Functions

static void reportOnError (h5_int64_t rc, const char *file, int line)

Protected Attributes

h5_file_t file_m
std::string fileName_m
std::string predecessorOPALFlavour_m
h5_int64_t numSteps_m
bool startedFromExistingFile_m

Static Protected Attributes

static std::string copyFilePrefix_m = ".copy"

Detailed Description

Definition at line 38 of file H5PartWrapper.h.

Constructor & Destructor Documentation

◆ ~H5PartWrapper()

H5PartWrapper::~H5PartWrapper ( )
virtual

Definition at line 55 of file H5PartWrapper.cpp.

References close().

Here is the call graph for this function:

◆ H5PartWrapper() [1/2]

H5PartWrapper::H5PartWrapper ( const std::string & fileName,
h5_int32_t flags = H5_O_WRONLY )
protected

Definition at line 30 of file H5PartWrapper.cpp.

References file_m, fileName_m, numSteps_m, open(), predecessorOPALFlavour_m, and startedFromExistingFile_m.

Referenced by H5PartWrapperForPT::H5PartWrapperForPT(), and H5PartWrapperForPT::H5PartWrapperForPT().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ H5PartWrapper() [2/2]

H5PartWrapper::H5PartWrapper ( const std::string & fileName,
int restartStep,
std::string sourceFile,
h5_int32_t flags = H5_O_RDWR )
protected

Definition at line 39 of file H5PartWrapper.cpp.

References copyFile(), file_m, fileName_m, numSteps_m, open(), predecessorOPALFlavour_m, and startedFromExistingFile_m.

Here is the call graph for this function:

Member Function Documentation

◆ close()

void H5PartWrapper::close ( )

Definition at line 59 of file H5PartWrapper.cpp.

References file_m, and REPORTONERROR.

Referenced by copyFile(), H5Writer::H5Writer(), storeCavityInformation(), H5PartWrapperForPT::writeStep(), and ~H5PartWrapper().

Here is the caller graph for this function:

◆ copyFile()

void H5PartWrapper::copyFile ( const std::string & sourceFile,
int lastStep = -1,
h5_int32_t flags = H5_O_WRONLY )
protected

Definition at line 129 of file H5PartWrapper.cpp.

References close(), copyFilePrefix_m, copyFileSystem(), copyHeader(), copyStep(), fileName_m, numSteps_m, open(), predecessorOPALFlavour_m, READSTEPATTRIB, and REPORTONERROR.

Referenced by H5PartWrapper().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyFileSystem()

void H5PartWrapper::copyFileSystem ( const std::string & sourceFile)
protected

Definition at line 252 of file H5PartWrapper.cpp.

References fileName_m, receiveFailureMessage(), and sendFailureMessage().

Referenced by copyFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyHeader()

void H5PartWrapper::copyHeader ( h5_file_t source)
protected

Definition at line 288 of file H5PartWrapper.cpp.

References file_m, READFILEATTRIB, REPORTONERROR, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.

Referenced by copyFile().

Here is the caller graph for this function:

◆ copyStep()

void H5PartWrapper::copyStep ( h5_file_t source,
int step )
protected

Definition at line 352 of file H5PartWrapper.cpp.

References copyStepData(), copyStepHeader(), file_m, numSteps_m, and REPORTONERROR.

Referenced by copyFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyStepData()

void H5PartWrapper::copyStepData ( h5_file_t source)
protected

Definition at line 429 of file H5PartWrapper.cpp.

References Util::c_data(), file_m, READDATA, REPORTONERROR, and WRITEDATA.

Referenced by copyStep().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyStepHeader()

void H5PartWrapper::copyStepHeader ( h5_file_t source)
protected

Definition at line 360 of file H5PartWrapper.cpp.

References file_m, predecessorOPALFlavour_m, READSTEPATTRIB, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.

Referenced by copyStep().

Here is the caller graph for this function:

◆ getLastPosition()

double H5PartWrapper::getLastPosition ( )
inline

Definition at line 90 of file H5PartWrapper.h.

References file_m, open(), readStep(), READSTEPATTRIB, and REPORTONERROR.

Here is the call graph for this function:

◆ getNumParticles()

size_t H5PartWrapper::getNumParticles ( ) const

Definition at line 508 of file H5PartWrapper.cpp.

References file_m, numSteps_m, and REPORTONERROR.

Referenced by H5PartWrapperForPT::readStepData().

Here is the caller graph for this function:

◆ open()

void H5PartWrapper::open ( h5_int32_t flags)
protected

Definition at line 69 of file H5PartWrapper.cpp.

References file_m, and fileName_m.

Referenced by copyFile(), getLastPosition(), H5PartWrapper(), H5PartWrapper(), storeCavityInformation(), and H5PartWrapperForPT::writeStep().

Here is the caller graph for this function:

◆ predecessorIsSameFlavour()

virtual bool H5PartWrapper::predecessorIsSameFlavour ( ) const
pure virtual

Implemented in H5PartWrapperForPT.

◆ readHeader()

virtual void H5PartWrapper::readHeader ( )
pure virtual

Implemented in H5PartWrapperForPT.

◆ readStep()

virtual void H5PartWrapper::readStep ( PartBunch_t * ,
h5_ssize_t firstParticle,
h5_ssize_t lastParticle )
pure virtual

Implemented in H5PartWrapperForPT.

Referenced by getLastPosition().

Here is the caller graph for this function:

◆ receiveFailureMessage()

void H5PartWrapper::receiveFailureMessage ( int sourceNode,
const std::string & where,
const std::string & what )
protected

Definition at line 495 of file H5PartWrapper.cpp.

Referenced by copyFileSystem().

Here is the caller graph for this function:

◆ reportOnError()

void H5PartWrapper::reportOnError ( h5_int64_t rc,
const char * file,
int line )
inlinestaticprotected

Definition at line 85 of file H5PartWrapper.h.

◆ sendFailureMessage()

void H5PartWrapper::sendFailureMessage ( bool failed,
const std::string & where,
const std::string & what )
protected

Definition at line 483 of file H5PartWrapper.cpp.

Referenced by copyFileSystem().

Here is the caller graph for this function:

◆ storeCavityInformation()

void H5PartWrapper::storeCavityInformation ( )

Write number of Cavities with autophase information

Definition at line 82 of file H5PartWrapper.cpp.

References close(), end(), file_m, OpalData::getFirstMaxPhases(), OpalData::getInstance(), OpalData::getLastMaxPhases(), OpalData::getNumberOfMaxPhases(), open(), WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.

Here is the call graph for this function:

◆ writeHeader()

virtual void H5PartWrapper::writeHeader ( )
pure virtual

Implemented in H5PartWrapperForPT.

Referenced by H5Writer::H5Writer().

Here is the caller graph for this function:

◆ writeStep()

virtual void H5PartWrapper::writeStep ( PartBunch_t * ,
const std::map< std::string, double > &  )
pure virtual

Implemented in H5PartWrapperForPT.

Member Data Documentation

◆ copyFilePrefix_m

std::string H5PartWrapper::copyFilePrefix_m = ".copy"
staticprotected

Definition at line 82 of file H5PartWrapper.h.

Referenced by copyFile().

◆ file_m

◆ fileName_m

std::string H5PartWrapper::fileName_m
protected

Definition at line 77 of file H5PartWrapper.h.

Referenced by copyFile(), copyFileSystem(), H5PartWrapper(), H5PartWrapper(), and open().

◆ numSteps_m

h5_int64_t H5PartWrapper::numSteps_m
protected

◆ predecessorOPALFlavour_m

std::string H5PartWrapper::predecessorOPALFlavour_m
protected

◆ startedFromExistingFile_m

bool H5PartWrapper::startedFromExistingFile_m
protected

Definition at line 80 of file H5PartWrapper.h.

Referenced by H5PartWrapper(), and H5PartWrapper().


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