Belle II Software  release-08-01-10
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 
68 class MilleBinary {
69 public:
70  MilleBinary(const std::string &fileName = "milleBinaryISN.dat",
71  bool doublePrec = false, unsigned int aSize = 2000);
72  virtual ~MilleBinary();
73  void addData(double aMeas, double aPrec,
74  const std::vector<unsigned int> &indLocal,
75  const std::vector<double> &derLocal,
76  const std::vector<int> &labGlobal,
77  const std::vector<double> &derGlobal);
78  void writeRecord();
79 
80 private:
81  std::ofstream binaryFile;
82  std::vector<int> intBuffer;
83  std::vector<float> floatBuffer;
84  std::vector<double> doubleBuffer;
86 };
87 }
88 #endif /* MILLEBINARY_H_ */
Millepede-II (binary) record.
Definition: MilleBinary.h:68
void writeRecord()
Write record to file.
Definition: MilleBinary.cc:111
std::vector< double > doubleBuffer
Double buffer.
Definition: MilleBinary.h:84
bool doublePrecision
Flag for storage in as double values.
Definition: MilleBinary.h:85
MilleBinary(const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, unsigned int aSize=2000)
Create binary file.
Definition: MilleBinary.cc:41
std::vector< int > intBuffer
Integer buffer.
Definition: MilleBinary.h:82
std::ofstream binaryFile
Binary File.
Definition: MilleBinary.h:81
std::vector< float > floatBuffer
Float buffer.
Definition: MilleBinary.h:83
void addData(double aMeas, double aPrec, const std::vector< unsigned int > &indLocal, const std::vector< double > &derLocal, const std::vector< int > &labGlobal, const std::vector< double > &derGlobal)
Add data block to (end of) record.
Definition: MilleBinary.cc:70
Namespace for the general broken lines package.