9 #include <alignment/dataobjects/MilleData.h>
11 #include <framework/utilities/FileSystem.h>
15 char* full_path = realpath(
"foo.dat", NULL);
21 auto* data =
dynamic_cast<const MilleData*
>(other);
22 const vector<string>& files = data->getFiles();
23 m_numRecords += data->m_numRecords;
24 for (
auto& file : files) {
26 for (
auto& myfile : m_files) {
33 m_files.push_back(file);
37 MilleData* MilleData::Clone(
const char* newname)
const
40 if (newname && strlen(newname)) {
41 obj->SetName(newname);
56 void MilleData::close()
72 void MilleData::open(
string filename)
79 m_files.push_back(FileSystem::findFile(
string(realpath(filename.c_str(), NULL))));
81 m_files.push_back(filename);
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)
std::vector< std::string > m_files
List of already created file names.
bool m_absFilePaths
Use absolute file paths to binary files Default is False - so you have to move the binaries to workin...
bool m_doublePrecision
Use double-precision for binary files.
void milleOut(MilleBinary &aMille)
Write valid trajectory to Millepede-II binary file.
Millepede-II (binary) record.
std::vector< std::vector< double > > merge(std::vector< std::vector< std::vector< double >>> toMerge)
merge { vector<double> a, vector<double> b} into {a, b}
Abstract base class for different kinds of events.