10#include <calibration/core/MergeableNamed.h>
12#include <genfit/MilleBinary.h>
13#include <genfit/GblTrajectory.h>
37 void open(std::string filename);
41 void fill(gbl::GblTrajectory& trajectory);
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.
bool hasDoublePrecision()
Are files written with double precision?
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)
bool isOpen()
Is some file already open?
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.
int getNumRecords()
Get number of records (trajectories) written to binary files.
bool m_doublePrecision
Use double-precision for binary files.
virtual void clear() override
Implementation of clearing.
virtual ~MilleData()
Destructor.
virtual void merge(const MergeableNamed *other) override
Implementation of merging.
MilleData(const MilleData &other)
Construct from other object (pointer to binary file is not transfered - new file has to be opened by ...
const std::vector< std::string > & getFiles() const
Get the list of all created files.
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 addFile(const std::string &path)
Add a filename (path) to the file list manually.
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.