OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
H5PartWrapperForPC Class Reference

#include <H5PartWrapperForPC.h>

Inheritance diagram for H5PartWrapperForPC:
Inheritance graph
[legend]
Collaboration diagram for H5PartWrapperForPC:
Collaboration graph
[legend]

Public Member Functions

 H5PartWrapperForPC (const std::string &fileName, h5_int32_t flags=H5_O_WRONLY)
 
 H5PartWrapperForPC (const std::string &fileName, int restartStep, std::string sourceFile, h5_int32_t flags=H5_O_RDWR)
 
virtual ~H5PartWrapperForPC ()
 
virtual void readHeader ()
 
virtual void readStep (PartBunchBase< double, 3 > *, h5_ssize_t firstParticle, h5_ssize_t lastParticle)
 
virtual void writeHeader ()
 
virtual void writeStep (PartBunchBase< double, 3 > *, const std::map< std::string, double > &additionalStepAttributes)
 
virtual bool predecessorIsSameFlavour () const
 
bool getPreviousH5Local () const
 
double getReferenceR () const
 
double getReferenceT () const
 
double getReferenceZ () const
 
double getReferencePr () const
 
double getReferencePt () const
 
double getReferencePz () const
 
double getMeanKineticEnergy () const
 
double getMeanMomentum () const
 
double getAzimuth () const
 
double getElevation () const
 
- Public Member Functions inherited from H5PartWrapper
virtual ~H5PartWrapper ()
 
void close ()
 
double getLastPosition ()
 
void storeCavityInformation ()
 
size_t getNumParticles () const
 

Private Member Functions

void readStepHeader (PartBunchBase< double, 3 > *)
 
void readStepData (PartBunchBase< double, 3 > *, h5_ssize_t, h5_ssize_t)
 
void writeStepHeader (PartBunchBase< double, 3 > *, const std::map< std::string, double > &)
 
void writeStepData (PartBunchBase< double, 3 > *)
 

Private Attributes

bool previousH5Local_m
 
Vector_t referenceMomentum_m
 
Vector_t referenceLocation_m
 
h5_float64_t meanE_m
 
h5_float64_t meanMomentum_m
 
h5_float64_t azimuth_m
 
h5_float64_t elevation_m
 

Additional Inherited Members

- Protected Member Functions inherited from H5PartWrapper
 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 inherited from H5PartWrapper
static void reportOnError (h5_int64_t rc, const char *file, int line)
 
- Protected Attributes inherited from H5PartWrapper
h5_file_t file_m
 
std::string fileName_m
 
std::string predecessorOPALFlavour_m
 
h5_int64_t numSteps_m
 
bool startedFromExistingFile_m
 
- Static Protected Attributes inherited from H5PartWrapper
static std::string copyFilePrefix_m = ".copy"
 

Detailed Description

H5PartWrapperForPC: a class that manages calls to H5Part for the cyclotron tracker

Definition at line 15 of file H5PartWrapperForPC.h.

Constructor & Destructor Documentation

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

Definition at line 19 of file H5PartWrapperForPC.cpp.

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

Definition at line 30 of file H5PartWrapperForPC.cpp.

H5PartWrapperForPC::~H5PartWrapperForPC ( )
virtual

Definition at line 44 of file H5PartWrapperForPC.cpp.

Member Function Documentation

double H5PartWrapperForPC::getAzimuth ( ) const
inline

Definition at line 107 of file H5PartWrapperForPC.h.

References azimuth_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getElevation ( ) const
inline

Definition at line 112 of file H5PartWrapperForPC.h.

References elevation_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getMeanKineticEnergy ( ) const
inline

Definition at line 97 of file H5PartWrapperForPC.h.

References meanE_m.

double H5PartWrapperForPC::getMeanMomentum ( ) const
inline

Definition at line 102 of file H5PartWrapperForPC.h.

References meanMomentum_m.

Referenced by TrackRun::setupCyclotronTracker().

bool H5PartWrapperForPC::getPreviousH5Local ( ) const
inline

Definition at line 62 of file H5PartWrapperForPC.h.

References previousH5Local_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferencePr ( ) const
inline

Definition at line 82 of file H5PartWrapperForPC.h.

References referenceMomentum_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferencePt ( ) const
inline

Definition at line 87 of file H5PartWrapperForPC.h.

References referenceMomentum_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferencePz ( ) const
inline

Definition at line 92 of file H5PartWrapperForPC.h.

References referenceMomentum_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferenceR ( ) const
inline

Definition at line 67 of file H5PartWrapperForPC.h.

References referenceLocation_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferenceT ( ) const
inline

Definition at line 72 of file H5PartWrapperForPC.h.

References referenceLocation_m.

Referenced by TrackRun::setupCyclotronTracker().

double H5PartWrapperForPC::getReferenceZ ( ) const
inline

Definition at line 77 of file H5PartWrapperForPC.h.

References referenceLocation_m.

Referenced by TrackRun::setupCyclotronTracker().

bool H5PartWrapperForPC::predecessorIsSameFlavour ( ) const
inlinevirtual

Implements H5PartWrapper.

Definition at line 57 of file H5PartWrapperForPC.h.

References H5PartWrapper::predecessorOPALFlavour_m.

void H5PartWrapperForPC::readHeader ( )
virtual

Implements H5PartWrapper.

Definition at line 47 of file H5PartWrapperForPC.cpp.

References H5PartWrapper::file_m, OpalData::getInstance(), READFILEATTRIB, REPORTONERROR, and OpalData::setRestartDumpFreq().

Here is the call graph for this function:

void H5PartWrapperForPC::readStep ( PartBunchBase< double, 3 > *  bunch,
h5_ssize_t  firstParticle,
h5_ssize_t  lastParticle 
)
virtual

Implements H5PartWrapper.

Definition at line 74 of file H5PartWrapperForPC.cpp.

References H5PartWrapper::file_m, readStepData(), readStepHeader(), and REPORTONERROR.

Referenced by MultiBunchHandler::readBunch().

Here is the call graph for this function:

void H5PartWrapperForPC::readStepData ( PartBunchBase< double, 3 > *  bunch,
h5_ssize_t  firstParticle,
h5_ssize_t  lastParticle 
)
private
void H5PartWrapperForPC::readStepHeader ( PartBunchBase< double, 3 > *  bunch)
private
void H5PartWrapperForPC::writeHeader ( )
virtual

Write file dump frequency.

Implements H5PartWrapper.

Definition at line 228 of file H5PartWrapperForPC.cpp.

References Options::ebDump, H5PartWrapper::file_m, Util::getGitRevision(), OPAL_PROJECT_NAME, OPAL_PROJECT_VERSION, Options::psDumpFreq, WRITEFILEATTRIB, and WRITESTRINGFILEATTRIB.

Referenced by MultiBunchHandler::saveBunch().

Here is the call graph for this function:

void H5PartWrapperForPC::writeStep ( PartBunchBase< double, 3 > *  bunch,
const std::map< std::string, double > &  additionalStepAttributes 
)
virtual
void H5PartWrapperForPC::writeStepData ( PartBunchBase< double, 3 > *  bunch)
private
void H5PartWrapperForPC::writeStepHeader ( PartBunchBase< double, 3 > *  bunch,
const std::map< std::string, double > &  additionalStepAttributes 
)
private

Member Data Documentation

h5_float64_t H5PartWrapperForPC::azimuth_m
private

Definition at line 52 of file H5PartWrapperForPC.h.

Referenced by getAzimuth(), and readStepHeader().

h5_float64_t H5PartWrapperForPC::elevation_m
private

Definition at line 53 of file H5PartWrapperForPC.h.

Referenced by getElevation(), and readStepHeader().

h5_float64_t H5PartWrapperForPC::meanE_m
private

Definition at line 50 of file H5PartWrapperForPC.h.

Referenced by getMeanKineticEnergy(), and readStepHeader().

h5_float64_t H5PartWrapperForPC::meanMomentum_m
private

Definition at line 51 of file H5PartWrapperForPC.h.

Referenced by getMeanMomentum(), and readStepHeader().

bool H5PartWrapperForPC::previousH5Local_m
private

Definition at line 47 of file H5PartWrapperForPC.h.

Referenced by getPreviousH5Local(), and readStepHeader().

Vector_t H5PartWrapperForPC::referenceLocation_m
private

Definition at line 49 of file H5PartWrapperForPC.h.

Referenced by getReferenceR(), getReferenceT(), getReferenceZ(), and readStepHeader().

Vector_t H5PartWrapperForPC::referenceMomentum_m
private

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