GeneralBrokenLines  Rev: 2.2.0
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 
37 namespace gbl {
38 
40 
81 class MilleBinary {
82 public:
83  MilleBinary(const std::string& fileName = "milleBinaryISN.dat",
84  bool doublePrec = false, unsigned int aSize = 2000);
85  virtual ~MilleBinary();
86  void addData(double aMeas, double aErr, unsigned int numLocal,
87  unsigned int* indLocal, double* derLocal,
88  const std::vector<int> &labGlobal,
89  const std::vector<double> &derGlobal);
90  void writeRecord();
91 
92 private:
93  std::ofstream binaryFile;
94  std::vector<int> intBuffer;
95  std::vector<float> floatBuffer;
96  std::vector<double> doubleBuffer;
98 };
99 }
100 #endif /* MILLEBINARY_H_ */
Millepede-II (binary) record.
Definition: MilleBinary.h:81
MilleBinary(const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, unsigned int aSize=2000)
Create binary file.
Definition: MilleBinary.cpp:41
std::vector< float > floatBuffer
Float buffer.
Definition: MilleBinary.h:95
virtual ~MilleBinary()
Definition: MilleBinary.cpp:58
std::vector< double > doubleBuffer
Double buffer.
Definition: MilleBinary.h:96
void writeRecord()
Write record to file.
bool doublePrecision
Flag for storage in as double values.
Definition: MilleBinary.h:97
std::vector< int > intBuffer
Integer buffer.
Definition: MilleBinary.h:94
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:72
std::ofstream binaryFile
Binary File.
Definition: MilleBinary.h:93
Namespace for the general broken lines package.