OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
H5PartWrapper Class Referenceabstract

#include <H5PartWrapper.h>

Inheritance diagram for H5PartWrapper:
Inheritance graph
[legend]

Public Member Functions

virtual ~H5PartWrapper ()
 
void close ()
 
double getLastPosition ()
 
virtual void readHeader ()=0
 
virtual void readStep (PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)=0
 
virtual void writeHeader ()=0
 
virtual void writeStep (PartBunchBase< double, 3 > *, 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 30 of file H5PartWrapper.h.

Constructor & Destructor Documentation

H5PartWrapper::~H5PartWrapper ( )
virtual

Definition at line 52 of file H5PartWrapper.cpp.

References close().

Here is the call graph for this function:

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

Definition at line 26 of file H5PartWrapper.cpp.

References open().

Here is the call graph for this function:

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

Definition at line 36 of file H5PartWrapper.cpp.

References copyFile(), fileName_m, Hypervolume::fs, and open().

Here is the call graph for this function:

Member Function Documentation

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

Definition at line 248 of file H5PartWrapper.cpp.

References fileName_m, IpplInfo::myNode(), receiveFailureMessage(), and sendFailureMessage().

Referenced by copyFile().

Here is the call graph for this function:

void H5PartWrapper::copyHeader ( h5_file_t  source)
protected

Definition at line 285 of file H5PartWrapper.cpp.

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

Referenced by copyFile().

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

Definition at line 355 of file H5PartWrapper.cpp.

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

Referenced by copyFile().

Here is the call graph for this function:

void H5PartWrapper::copyStepData ( h5_file_t  source)
protected

Definition at line 440 of file H5PartWrapper.cpp.

References file_m, IpplInfo::getNodes(), IpplInfo::myNode(), READDATA, REPORTONERROR, and WRITEDATA.

Referenced by copyStep().

Here is the call graph for this function:

void H5PartWrapper::copyStepHeader ( h5_file_t  source)
protected
double H5PartWrapper::getLastPosition ( )
inline

Definition at line 85 of file H5PartWrapper.h.

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

Referenced by H5Writer::getLastPosition().

Here is the call graph for this function:

size_t H5PartWrapper::getNumParticles ( ) const
void H5PartWrapper::open ( h5_int32_t  flags)
protected
virtual bool H5PartWrapper::predecessorIsSameFlavour ( ) const
pure virtual
virtual void H5PartWrapper::readHeader ( )
pure virtual
virtual void H5PartWrapper::readStep ( PartBunchBase< double, 3 > *  ,
h5_ssize_t  firstParticle,
h5_ssize_t  lastParticle 
)
pure virtual
void H5PartWrapper::receiveFailureMessage ( int  sourceNode,
const std::string &  where,
const std::string &  what 
)
protected

Definition at line 506 of file H5PartWrapper.cpp.

References IpplInfo::Comm, getMessage(), and Communicate::receive_block().

Referenced by copyFileSystem().

Here is the call graph for this function:

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

Definition at line 79 of file H5PartWrapper.h.

References endl(), and ERRORMSG.

Referenced by H5PartWrapperForPT::writeStepData().

Here is the call graph for this function:

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

Definition at line 494 of file H5PartWrapper.cpp.

References Communicate::broadcast_all(), IpplInfo::Comm, and putMessage().

Referenced by copyFileSystem().

Here is the call graph for this function:

void H5PartWrapper::storeCavityInformation ( )

Write number of Cavities with autophase information

Definition at line 81 of file H5PartWrapper.cpp.

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

Referenced by H5Writer::storeCavityInformation().

Here is the call graph for this function:

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

Member Data Documentation

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

Definition at line 75 of file H5PartWrapper.h.

Referenced by copyFile().

h5_file_t H5PartWrapper::file_m
protected
std::string H5PartWrapper::fileName_m
protected

Definition at line 70 of file H5PartWrapper.h.

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

h5_int64_t H5PartWrapper::numSteps_m
protected
std::string H5PartWrapper::predecessorOPALFlavour_m
protected
bool H5PartWrapper::startedFromExistingFile_m
protected

Definition at line 73 of file H5PartWrapper.h.


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