OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Macros
LossDataSink.cpp File Reference
#include "Structure/LossDataSink.h"
#include "Ippl.h"
#include "Utilities/Options.h"
#include "AbstractObjects/OpalData.h"
#include "Utilities/GeneralClassicException.h"
#include "Utilities/Util.h"
#include <boost/filesystem.hpp>
#include "OPALconfig.h"
#include <cassert>
Include dependency graph for LossDataSink.cpp:

Go to the source code of this file.

Macros

#define ADD_ATTACHMENT(fname)
 
#define WRITE_FILEATTRIB_STRING(attribute, value)
 
#define WRITE_STEPATTRIB_FLOAT64(attribute, value, size)
 
#define WRITE_STEPATTRIB_INT64(attribute, value, size)
 
#define WRITE_DATA_FLOAT64(name, value)
 
#define WRITE_DATA_INT64(name, value)
 
#define SET_STEP()
 
#define GET_NUM_STEPS()
 
#define SET_NUM_PARTICLES(num)
 
#define OPEN_FILE(fname, mode, props)
 
#define CLOSE_FILE()
 

Macro Definition Documentation

#define ADD_ATTACHMENT (   fname)
Value:
{ \
h5_int64_t h5err = H5AddAttachment (H5file_m, fname); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to add attachment " << fname << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 14 of file LossDataSink.cpp.

Referenced by LossDataSink::writeHeaderH5().

#define CLOSE_FILE ( )
Value:
{ \
h5_int64_t h5err = H5CloseFile (H5file_m); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to close file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 95 of file LossDataSink.cpp.

Referenced by LossDataSink::save(), and LossDataSink::~LossDataSink().

#define GET_NUM_STEPS ( )
Value:
{ \
H5call_m = H5GetNumSteps( H5file_m ); \
if (H5call_m <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to get number of steps of file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 70 of file LossDataSink.cpp.

Referenced by LossDataSink::save().

#define OPEN_FILE (   fname,
  mode,
  props 
)
Value:
{ \
H5file_m = H5OpenFile (fname, mode, props); \
if(H5file_m == (h5_file_t)H5_ERR) { \
std::stringstream ss; \
ss << "failed to open file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 87 of file LossDataSink.cpp.

Referenced by LossDataSink::openH5().

#define SET_NUM_PARTICLES (   num)
Value:
{ \
h5_int64_t h5err = H5PartSetNumParticles (H5file_m, num); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to set number of particles to " << num << " in step " << H5call_m << " in file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 78 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().

#define SET_STEP ( )
Value:
{ \
h5_int64_t h5err = H5SetStep (H5file_m, H5call_m); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to set step " << H5call_m << " in file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 62 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().

#define WRITE_DATA_FLOAT64 (   name,
  value 
)
Value:
{ \
h5_int64_t h5err = H5PartWriteDataFloat64 (H5file_m, name, value); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to write float64 data " << name << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}
const std::string name

Definition at line 46 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().

#define WRITE_DATA_INT64 (   name,
  value 
)
Value:
{ \
h5_int64_t h5err = H5PartWriteDataInt64 (H5file_m, name, value); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to write int64 data " << name << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}
const std::string name

Definition at line 54 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().

#define WRITE_FILEATTRIB_STRING (   attribute,
  value 
)
Value:
{ \
h5_int64_t h5err = H5WriteFileAttribString (H5file_m, attribute, value); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to write string attribute " << attribute << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 22 of file LossDataSink.cpp.

Referenced by LossDataSink::writeHeaderH5().

#define WRITE_STEPATTRIB_FLOAT64 (   attribute,
  value,
  size 
)
Value:
{ \
h5_int64_t h5err = H5WriteStepAttribFloat64 (H5file_m, attribute, value, size); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to write float64 attribute " << attribute << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 30 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().

#define WRITE_STEPATTRIB_INT64 (   attribute,
  value,
  size 
)
Value:
{ \
h5_int64_t h5err = H5WriteStepAttribInt64 (H5file_m, attribute, value, size); \
if (h5err <= H5_ERR) { \
std::stringstream ss; \
ss << "failed to write int64 attribute " << attribute << " to file " << fn_m; \
throw GeneralClassicException(std::string(__func__), ss.str()); \
}\
}

Definition at line 38 of file LossDataSink.cpp.

Referenced by LossDataSink::saveH5().