9#include <alignment/dataobjects/MilleData.h>
18 auto* data =
dynamic_cast<const MilleData*
>(other);
19 const vector<string>& files = data->getFiles();
21 for (
auto& file : files) {
37 if (newname && strlen(newname)) {
38 obj->SetName(newname);
76 m_files.push_back(
string(std::filesystem::canonical(filename)));
int m_numRecords
Pointer to opened binary file (not streamed)
virtual MilleData * Clone(const char *newname="") const override
Clone object (with optionally a new name)
std::vector< std::string > m_files
List of already created file names.
MilleData & operator=(const MilleData &other)
Copy by assignment (if some file on LHS is opened, it is closed during this operation; file pointers ...
bool m_absFilePaths
Use absolute file paths to binary files Default is False - so you have to move the binaries to workin...
void close()
Close current mille binary if opened.
bool m_doublePrecision
Use double-precision for binary files.
virtual void merge(const MergeableNamed *other) override
Implementation of merging.
gbl::MilleBinary * m_binary
Pointer to current binary file.
void open(std::string filename)
Open a new file and remember it. Filename should encode also process id!
void fill(gbl::GblTrajectory &trajectory)
Write a GBL trajectory to the binary file.
MilleData(bool doublePrecision=false, bool absFilePaths=false)
Constructor. Set doublePrecision to true to write binary files with doubles instead of floats.
Abstract base class for different kinds of events.