OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Macros | Variables
LossDataSink.cpp File Reference
#include "Structure/LossDataSink.h"
#include "AbstractObjects/OpalData.h"
#include "Algorithms/DistributionMoments.h"
#include "Message/GlobalComm.h"
#include "OPALconfig.h"
#include "Utilities/GeneralClassicException.h"
#include "Utilities/Options.h"
#include "Utilities/Util.h"
#include "Utility/IpplInfo.h"
#include <boost/filesystem.hpp>
#include <cmath>
Include dependency graph for LossDataSink.cpp:

Go to the source code of this file.

Macros

#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()
 

Variables

Informgmsg
 

Macro Definition Documentation

◆ CLOSE_FILE

#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 108 of file LossDataSink.cpp.

◆ GET_NUM_STEPS

#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 83 of file LossDataSink.cpp.

◆ OPEN_FILE

#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 100 of file LossDataSink.cpp.

◆ SET_NUM_PARTICLES

#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 91 of file LossDataSink.cpp.

◆ SET_STEP

#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 75 of file LossDataSink.cpp.

◆ WRITE_DATA_FLOAT64

#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 59 of file LossDataSink.cpp.

◆ WRITE_DATA_INT64

#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()); \
}\
}

Definition at line 67 of file LossDataSink.cpp.

◆ WRITE_FILEATTRIB_STRING

#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 35 of file LossDataSink.cpp.

◆ WRITE_STEPATTRIB_FLOAT64

#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 43 of file LossDataSink.cpp.

◆ WRITE_STEPATTRIB_INT64

#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 51 of file LossDataSink.cpp.

Variable Documentation

◆ gmsg

Inform* gmsg
extern

Definition at line 62 of file Main.cpp.

Referenced by LossDataSink::save().