18 #ifndef LOSSDATASINK_H_
19 #define LOSSDATASINK_H_
28 #include <boost/optional.hpp>
98 long long globalTrackStep);
100 void addParticle(
const OpalParticle&,
const boost::optional<std::pair<int, short int>>& turnBunchNumPair = boost::none);
124 void saveH5(
unsigned int setIdx);
135 void reportOnError(h5_int64_t rc,
const char* file,
int line);
179 std::set<SetStatistics> stats;
183 for (
unsigned int i = 0; i < numStatistics; ++ i) {
185 if (setStats.nTotal_m > 0) {
186 stats.insert(setStats);
SetStatistics computeSetStatistics(unsigned int setIdx)
std::vector< size_t > bunchNumber_m
bool hasNoParticlesToDump() const
void reportOnError(h5_int64_t rc, const char *file, int line)
void addReferenceParticle(const Vector_t &x, const Vector_t &p, double time, double spos, long long globalTrackStep)
void save(unsigned int numSets=1, OpalData::OpenMode openMode=OpalData::OpenMode::UNDEFINED)
h5_int64_t H5call_m
Current record, or time step, of H5 file.
void addParticle(const OpalParticle &, const boost::optional< std::pair< int, short int >> &turnBunchNumPair=boost::none)
std::vector< h5_int64_t > globalTrackStep_m
std::vector< double > refTime_m
h5_file_t H5file_m
used to write out data in H5hut mode
std::set< SetStatistics > computeStatistics(unsigned int numSets)
std::vector< Vector_t > RefPartR_m
if write to the Free Software Temple MA USA Also add information on how to contact you by electronic and paper mail If the program is make it output a short notice like this when it starts in an interactive mode
std::vector< OpalParticle > particles_m
void saveH5(unsigned int setIdx)
void splitSets(unsigned int numSets)
OpenMode
Enum for writing to files.
bool hasTurnInformations() const
std::vector< double > spos_m
void openH5(h5_int32_t mode=H5_O_WRONLY)
std::vector< size_t > turnNumber_m
std::vector< unsigned long > startSet_m
std::vector< Vector_t > RefPartP_m
CollectionType collectionType_m
~LossDataSink() noexcept(false)