9#include <alignment/dataobjects/MilleData.h>
11#include <framework/utilities/FileSystem.h>
15char* full_path = realpath(
"foo.dat", NULL);
21 auto* data =
dynamic_cast<const MilleData*
>(other);
22 const vector<string>& files = data->getFiles();
24 for (
auto& file : files) {
40 if (newname && strlen(newname)) {
41 obj->SetName(newname);
static std::string findFile(const std::string &path, bool silent=false)
Search for given file or directory in local or central release directory, and return absolute path if...
Abstract base class for objects that can be merged but also named.
Mergeable class holding list of so far opened mille binaries and providing the binaries.
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.
Abstract base class for different kinds of events.