|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) MINIorX
OPALX
|
#include <H5PartWrapperForPT.h>
Public Member Functions | |
| H5PartWrapperForPT (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY) | |
| H5PartWrapperForPT (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR) | |
| virtual | ~H5PartWrapperForPT () |
| virtual void | readHeader () |
| virtual void | readStep (PartBunch_t *, h5_ssize_t firstParticle, h5_ssize_t lastParticle) |
| virtual void | writeHeader () |
| virtual void | writeStep (PartBunch_t *, const std::map< std::string, double > &additionalStepAttributes) |
| virtual bool | predecessorIsSameFlavour () const |
| void | close () |
| double | getLastPosition () |
| void | storeCavityInformation () |
| size_t | getNumParticles () const |
Protected Member Functions | |
| 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" |
Private Member Functions | |
| void | readStepHeader (PartBunch_t *) |
| void | readStepData (PartBunch_t *, h5_ssize_t, h5_ssize_t) |
| void | writeStepHeader (PartBunch_t *, const std::map< std::string, double > &) |
| void | writeStepData (PartBunch_t *) |
Definition at line 26 of file H5PartWrapperForPT.h.
| H5PartWrapperForPT::H5PartWrapperForPT | ( | const std::string & | fileName, |
| h5_int32_t | flags = H5_O_WRONLY ) |
Definition at line 35 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::H5PartWrapper().
| H5PartWrapperForPT::H5PartWrapperForPT | ( | const std::string & | fileName, |
| int | restartStep, | ||
| std::string | sourceFile, | ||
| h5_int32_t | flags = H5_O_RDWR ) |
Definition at line 39 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), H5PartWrapper::H5PartWrapper(), and OpalData::setRestartStep().
|
virtual |
Definition at line 48 of file H5PartWrapperForPT.cpp.
|
inherited |
Definition at line 59 of file H5PartWrapper.cpp.
References file_m, and REPORTONERROR.
Referenced by copyFile(), H5Writer::H5Writer(), storeCavityInformation(), H5PartWrapperForPT::writeStep(), and ~H5PartWrapper().
|
protectedinherited |
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().
|
protectedinherited |
Definition at line 252 of file H5PartWrapper.cpp.
References fileName_m, receiveFailureMessage(), and sendFailureMessage().
Referenced by copyFile().
|
protectedinherited |
Definition at line 288 of file H5PartWrapper.cpp.
References file_m, READFILEATTRIB, REPORTONERROR, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
Referenced by copyFile().
|
protectedinherited |
Definition at line 352 of file H5PartWrapper.cpp.
References copyStepData(), copyStepHeader(), file_m, numSteps_m, and REPORTONERROR.
Referenced by copyFile().
|
protectedinherited |
Definition at line 429 of file H5PartWrapper.cpp.
References Util::c_data(), file_m, READDATA, REPORTONERROR, and WRITEDATA.
Referenced by copyStep().
|
protectedinherited |
Definition at line 360 of file H5PartWrapper.cpp.
References file_m, predecessorOPALFlavour_m, READSTEPATTRIB, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by copyStep().
|
inlineinherited |
Definition at line 90 of file H5PartWrapper.h.
References file_m, open(), readStep(), READSTEPATTRIB, and REPORTONERROR.
|
inherited |
Definition at line 508 of file H5PartWrapper.cpp.
References file_m, numSteps_m, and REPORTONERROR.
Referenced by H5PartWrapperForPT::readStepData().
|
protectedinherited |
Definition at line 69 of file H5PartWrapper.cpp.
References file_m, and fileName_m.
Referenced by copyFile(), getLastPosition(), H5PartWrapper(), H5PartWrapper(), storeCavityInformation(), and H5PartWrapperForPT::writeStep().
|
inlinevirtual |
Implements H5PartWrapper.
Definition at line 51 of file H5PartWrapperForPT.h.
References H5PartWrapper::predecessorOPALFlavour_m.
|
virtual |
Implements H5PartWrapper.
Definition at line 51 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, OpalData::getInstance(), READFILEATTRIB, REPORTONERROR, OpalData::setGlobalPhaseShift(), and OpalData::setRestartDumpFreq().
|
virtual |
Implements H5PartWrapper.
Definition at line 102 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, readStep(), readStepData(), readStepHeader(), and REPORTONERROR.
Referenced by readStep().
|
private |
Definition at line 147 of file H5PartWrapperForPT.cpp.
References Util::c_data(), H5PartWrapper::file_m, H5PartWrapper::getNumParticles(), READDATA, and REPORTONERROR.
Referenced by readStep().
|
private |
Definition at line 112 of file H5PartWrapperForPT.cpp.
References H5PartWrapper::file_m, READSTEPATTRIB, PartBunch< PLayout, T, Dim >::RefPartP_m, PartBunch< PLayout, T, Dim >::RefPartR_m, PartBunch< PLayout, T, Dim >::set_sPos(), PartBunch< PLayout, T, Dim >::setGlobalTrackStep(), PartBunch< PLayout, T, Dim >::setLocalTrackStep(), and PartBunch< PLayout, T, Dim >::setT().
Referenced by readStep().
|
protectedinherited |
Definition at line 495 of file H5PartWrapper.cpp.
Referenced by copyFileSystem().
|
inlinestaticprotectedinherited |
Definition at line 85 of file H5PartWrapper.h.
|
protectedinherited |
Definition at line 483 of file H5PartWrapper.cpp.
Referenced by copyFileSystem().
|
inherited |
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.
|
virtual |
Write file dump frequency.
Write global phase change
Implements H5PartWrapper.
Definition at line 209 of file H5PartWrapperForPT.cpp.
References Options::ebDump, H5PartWrapper::file_m, Util::getGitRevision(), OpalData::getGlobalPhaseShift(), OpalData::getInstance(), OPAL_PROJECT_NAME, OPAL_PROJECT_VERSION, Options::psDumpFreq, Options::rhoDump, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.
|
virtual |
Implements H5PartWrapper.
Definition at line 292 of file H5PartWrapperForPT.cpp.
References PartBunch< PLayout, T, Dim >::calcBeamParameters(), H5PartWrapper::close(), PartBunch< PLayout, T, Dim >::getTotalNum(), H5PartWrapper::open(), writeStepData(), and writeStepHeader().
|
private |
Definition at line 410 of file H5PartWrapperForPT.cpp.
References Util::c_data(), Options::ebDump, H5PartWrapper::file_m, PartBunch< PLayout, T, Dim >::getLocalNum(), PartBunch< PLayout, T, Dim >::getParticleContainer(), REPORTONERROR, and WRITEDATA.
Referenced by writeStep().
|
private |
Write particle mass and charge per particle. (Consider making these file attributes.)
Definition at line 305 of file H5PartWrapperForPT.cpp.
References Physics::c, Physics::epsilon_0, Units::eV2GeV, H5PartWrapper::file_m, PartBunch< PLayout, T, Dim >::get_centroid(), PartBunch< PLayout, T, Dim >::get_emit(), PartBunch< PLayout, T, Dim >::get_gamma(), PartBunch< PLayout, T, Dim >::get_maxExtent(), PartBunch< PLayout, T, Dim >::get_meanKineticEnergy(), PartBunch< PLayout, T, Dim >::get_norm_emit(), PartBunch< PLayout, T, Dim >::get_origin(), PartBunch< PLayout, T, Dim >::get_pmean(), PartBunch< PLayout, T, Dim >::get_prms(), PartBunch< PLayout, T, Dim >::get_rrms(), PartBunch< PLayout, T, Dim >::get_sPos(), PartBunch< PLayout, T, Dim >::getCharge(), PartBunch< PLayout, T, Dim >::getdE(), PartBunch< PLayout, T, Dim >::getGlobalTrackStep(), PartBunch< PLayout, T, Dim >::getLocalTrackStep(), PartBunch< PLayout, T, Dim >::getM(), PartBunch< PLayout, T, Dim >::getQ(), PartBunch< PLayout, T, Dim >::getT(), H5PartWrapper::numSteps_m, Physics::pi, PartBunch< PLayout, T, Dim >::RefPartP_m, PartBunch< PLayout, T, Dim >::RefPartR_m, REPORTONERROR, WRITESTEPATTRIB, and WRITESTRINGSTEPATTRIB.
Referenced by writeStep().
|
staticprotectedinherited |
Definition at line 82 of file H5PartWrapper.h.
Referenced by copyFile().
|
protectedinherited |
Definition at line 76 of file H5PartWrapper.h.
Referenced by close(), copyHeader(), copyStep(), copyStepData(), copyStepHeader(), getLastPosition(), getNumParticles(), H5PartWrapper(), H5PartWrapper(), H5PartWrapperForPT::H5PartWrapperForPT(), open(), H5PartWrapperForPT::readHeader(), H5PartWrapperForPT::readStep(), H5PartWrapperForPT::readStepData(), H5PartWrapperForPT::readStepHeader(), storeCavityInformation(), H5PartWrapperForPT::writeHeader(), H5PartWrapperForPT::writeStepData(), and H5PartWrapperForPT::writeStepHeader().
|
protectedinherited |
Definition at line 77 of file H5PartWrapper.h.
Referenced by copyFile(), copyFileSystem(), H5PartWrapper(), H5PartWrapper(), and open().
|
protectedinherited |
Definition at line 79 of file H5PartWrapper.h.
Referenced by copyFile(), copyStep(), getNumParticles(), H5PartWrapper(), H5PartWrapper(), and H5PartWrapperForPT::writeStepHeader().
|
protectedinherited |
Definition at line 78 of file H5PartWrapper.h.
Referenced by copyFile(), copyStepHeader(), H5PartWrapper(), H5PartWrapper(), and H5PartWrapperForPT::predecessorIsSameFlavour().
|
protectedinherited |
Definition at line 80 of file H5PartWrapper.h.
Referenced by H5PartWrapper(), and H5PartWrapper().