 |
Belle II Software
release-05-02-19
|
3 #include <calibration/core/MergeableNamed.h>
5 #include <genfit/MilleBinary.h>
6 #include <genfit/GblTrajectory.h>
16 class MilleData :
public MergeableNamed {
30 void open(std::string filename);
bool m_absFilePaths
Use absolute file paths to binary files Default is False - so you have to move the binaries to workin...
Abstract base class for objects that can be merged but also named.
void open(std::string filename)
Open a new file and remember it. Filename should encode also process id!
bool hasDoublePrecision()
Are files written with double precision?
int m_numRecords
Pointer to opened binary file (not streamed)
bool m_doublePrecision
Use double-precision for binary files.
void fill(gbl::GblTrajectory &trajectory)
Write a GBL trajectory to the binary file.
bool isOpen()
Is some file already open?
virtual void clear() override
Implementation of clearing.
void addFile(const std::string &path)
Add a filename (path) to the file list manually.
void close()
Close current mille binary if opened.
Mergeable class holding list of so far opened mille binaries and providing the binaries.
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 ...
Abstract base class for different kinds of events.
virtual void merge(const MergeableNamed *other) override
Implementation of merging.
const std::vector< std::string > & getFiles() const
Get the list of all created files.
gbl::MilleBinary * m_binary
Pointer to current binary file.
virtual MilleData * Clone(const char *newname="") const override
Clone object (with optionally a new name)
MilleData(bool doublePrecision=false, bool absFilePaths=false)
Constructor. Set doublePrecision to true to write binary files with doubles instead of floats.
virtual ~MilleData()
Destructor.
int getNumRecords()
Get number of records (trajectories) written to binary files.
Millepede-II (binary) record.
MilleData(const MilleData &other)
Construct from other object (pointer to binary file is not transfered - new file has to be opened by ...