Millepede-II (binary) record. More...
#include <MilleBinary.h>
Public Member Functions | |
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. More... | |
MilleBinary (const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, unsigned int aSize=2000) | |
Create binary file. More... | |
void | writeRecord () |
Write record to file. More... | |
virtual | ~MilleBinary () |
Private Attributes | |
std::ofstream | binaryFile |
Binary File. More... | |
std::vector< double > | doubleBuffer |
Double buffer. More... | |
bool | doublePrecision |
Flag for storage in as double values. More... | |
std::vector< float > | floatBuffer |
Float buffer. More... | |
std::vector< int > | intBuffer |
Integer buffer. More... | |
Millepede-II (binary) record.
Containing information for local (track) and global fit.
The data blocks are collected in two arrays, a real array (containing float or double values) and integer array, of same length. A positive record length indicate float and a negative one double values. The content of the record is:
* real array integer array * 0 0.0 error count (this record) * 1 RMEAS, measured value 0 -+ * 2 local derivative index of local derivative | * 3 local derivative index of local derivative | * 4 ... | block * SIGMA, error (>0) 0 | * global derivative label of global derivative | * global derivative label of global derivative -+ * RMEAS, measured value 0 * local derivative index of local derivative * local derivative index of local derivative * ... * SIGMA, error 0 * global derivative label of global derivative * global derivative label of global derivative * ... * global derivative label of global derivative *
Definition at line 68 of file MilleBinary.h.
gbl::MilleBinary::MilleBinary | ( | const std::string & | fileName = "milleBinaryISN.dat" , |
bool | doublePrec = false , |
||
unsigned int | aSize = 2000 |
||
) |
Create binary file.
[in] | fileName | File name |
[in] | doublePrec | Flag for storage as double values |
[in] | aSize | Buffer size |
Definition at line 41 of file MilleBinary.cc.
References doubleBuffer, doublePrecision, floatBuffer, and intBuffer.
|
virtual |
void gbl::MilleBinary::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.
[in] | aMeas | Value |
[in] | aErr | Error |
[in] | numLocal | Number of local labels/derivatives |
[in] | indLocal | Array of labels of local parameters |
[in] | derLocal | Array of derivatives for local parameters |
[in] | labGlobal | List of labels of global parameters |
[in] | derGlobal | List of derivatives for global parameters |
Definition at line 72 of file MilleBinary.cc.
References doubleBuffer, doublePrecision, floatBuffer, mps_fire::i, and intBuffer.
Referenced by gbl::GblTrajectory::milleOut().
void gbl::MilleBinary::writeRecord | ( | ) |
Write record to file.
Definition at line 113 of file MilleBinary.cc.
References binaryFile, doubleBuffer, doublePrecision, floatBuffer, and intBuffer.
Referenced by gbl::GblTrajectory::milleOut().
|
private |
Binary File.
Definition at line 80 of file MilleBinary.h.
Referenced by writeRecord(), and ~MilleBinary().
|
private |
Double buffer.
Definition at line 83 of file MilleBinary.h.
Referenced by addData(), MilleBinary(), and writeRecord().
|
private |
Flag for storage in as double values.
Definition at line 84 of file MilleBinary.h.
Referenced by addData(), MilleBinary(), and writeRecord().
|
private |
Float buffer.
Definition at line 82 of file MilleBinary.h.
Referenced by addData(), MilleBinary(), and writeRecord().
|
private |
Integer buffer.
Definition at line 81 of file MilleBinary.h.
Referenced by addData(), MilleBinary(), and writeRecord().