GeneralBrokenLines V03-01-01
using EIGEN
MilleBinary.h
Go to the documentation of this file.
1/*
2 * MilleBinary.h
3 *
4 * Created on: Aug 31, 2011
5 * Author: kleinwrt
6 */
7
30#ifndef MILLEBINARY_H_
31#define MILLEBINARY_H_
32
33#include<fstream>
34#include<vector>
35
37namespace gbl {
38
40
82public:
83 MilleBinary(const std::string& fileName = "milleBinaryISN.dat",
84 bool doublePrec = false, bool keepZeros = false,
85 unsigned int aSize = 2000);
86 virtual ~MilleBinary();
87 void addData(double aMeas, double aErr, unsigned int numLocal,
88 unsigned int* indLocal, double* derLocal,
89 const std::vector<int> &labGlobal,
90 const std::vector<double> &derGlobal);
91 void writeRecord();
92
93private:
94 std::ofstream binaryFile;
95 std::vector<int> intBuffer;
96 std::vector<float> floatBuffer;
97 std::vector<double> doubleBuffer;
100};
101}
102#endif /* MILLEBINARY_H_ */
Millepede-II (binary) record.
Definition: MilleBinary.h:81
MilleBinary(const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, bool keepZeros=false, unsigned int aSize=2000)
Create binary file.
Definition: MilleBinary.cpp:42
std::vector< float > floatBuffer
Float buffer.
Definition: MilleBinary.h:96
virtual ~MilleBinary()
Definition: MilleBinary.cpp:59
std::vector< double > doubleBuffer
Double buffer.
Definition: MilleBinary.h:97
void writeRecord()
Write record to file.
bool doublePrecision
Flag for storage in as double values.
Definition: MilleBinary.h:98
bool globalDerKeepZeros
Flag for keeping global derivatives with value zero.
Definition: MilleBinary.h:99
std::vector< int > intBuffer
Integer buffer.
Definition: MilleBinary.h:95
void addData(double aMeas, double aErr, unsigned int numLocal, unsigned int *indLocal, double *derLocal, const std::vector< int > &labGlobal, const std::vector< double > &derGlobal)
Add data block to (end of) record.
Definition: MilleBinary.cpp:73
std::ofstream binaryFile
Binary File.
Definition: MilleBinary.h:94
Namespace for the general broken lines package.