18#ifndef LOSSDATASINK_H_
19#define LOSSDATASINK_H_
97 long long globalTrackStep);
99 void addParticle(
const OpalParticle&,
const std::optional<std::pair<int, short int>>& turnBunchNumPair = std::nullopt);
111 void openH5(h5_int32_t mode = H5_O_WRONLY);
123 void saveH5(
unsigned int setIdx);
178 std::set<SetStatistics> stats;
182 for (
unsigned int i = 0; i < numStatistics; ++ i) {
184 if (setStats.nTotal_m > 0) {
185 stats.insert(setStats);
OpenMode
Enum for writing to files.
std::vector< size_t > turnNumber_m
std::vector< Vector_t > RefPartR_m
void addReferenceParticle(const Vector_t &x, const Vector_t &p, double time, double spos, long long globalTrackStep)
h5_file_t H5file_m
used to write out data in H5hut mode
~LossDataSink() noexcept(false)
std::vector< double > refTime_m
std::set< SetStatistics > computeStatistics(unsigned int numSets)
CollectionType collectionType_m
void save(unsigned int numSets=1, OpalData::OpenMode openMode=OpalData::OpenMode::UNDEFINED)
std::vector< Vector_t > RefPartP_m
h5_int64_t H5call_m
Current record, or time step, of H5 file.
void reportOnError(h5_int64_t rc, const char *file, int line)
void addParticle(const OpalParticle &, const std::optional< std::pair< int, short int > > &turnBunchNumPair=std::nullopt)
std::vector< size_t > bunchNumber_m
std::vector< double > spos_m
void openH5(h5_int32_t mode=H5_O_WRONLY)
SetStatistics computeSetStatistics(unsigned int setIdx)
void splitSets(unsigned int numSets)
std::vector< OpalParticle > particles_m
bool hasTurnInformations() const
void saveH5(unsigned int setIdx)
std::vector< h5_int64_t > globalTrackStep_m
bool hasNoParticlesToDump() const
std::vector< unsigned long > startSet_m