Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gbl::MilleBinary Class Reference

Millepede-II (binary) record. More...

#include <GenFit/blob/master/GBL/include/MilleBinary.h>

+ Collaboration diagram for gbl::MilleBinary:

Public Member Functions

 MilleBinary (const std::string &fileName="milleBinaryISN.dat", bool doublePrec=false, unsigned int aSize=2000)
 Create binary file.
 
virtual ~MilleBinary ()
 
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.
 
void writeRecord ()
 Write record to file.
 

Private Attributes

std::ofstream binaryFile
 Binary File.
 
std::vector< int > intBuffer
 Integer buffer.
 
std::vector< float > floatBuffer
 Float buffer.
 
std::vector< doubledoubleBuffer
 Double buffer.
 
bool doublePrecision
 Flag for storage in as double values.
 

Detailed Description

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.

View newest version in sPHENIX GitHub at line 68 of file MilleBinary.h

Constructor & Destructor Documentation

gbl::MilleBinary::MilleBinary ( const std::string &  fileName = "milleBinaryISN.dat",
bool  doublePrec = false,
unsigned int  aSize = 2000 
)

Create binary file.

Parameters
[in]fileNameFile name
[in]doublePrecFlag for storage as double values
[in]aSizeBuffer size

Definition at line 41 of file MilleBinary.cc.

View newest version in sPHENIX GitHub at line 41 of file MilleBinary.cc

References doubleBuffer, doublePrecision, floatBuffer, and intBuffer.

gbl::MilleBinary::~MilleBinary ( )
virtual

Definition at line 57 of file MilleBinary.cc.

View newest version in sPHENIX GitHub at line 57 of file MilleBinary.cc

References binaryFile.

Member Function Documentation

void gbl::MilleBinary::addData ( double  aMeas,
double  aErr,
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.

Parameters
[in]aMeasValue
[in]aErrError
[in]indLocalList of labels of local parameters
[in]derLocalList of derivatives for local parameters
[in]labGlobalList of labels of global parameters
[in]derGlobalList of derivatives for global parameters

Definition at line 70 of file MilleBinary.cc.

View newest version in sPHENIX GitHub at line 70 of file MilleBinary.cc

References doubleBuffer, doublePrecision, floatBuffer, i, and intBuffer.

Referenced by gbl::GblTrajectory::milleOut().

+ Here is the caller graph for this function:

void gbl::MilleBinary::writeRecord ( )

Write record to file.

Definition at line 111 of file MilleBinary.cc.

View newest version in sPHENIX GitHub at line 111 of file MilleBinary.cc

References binaryFile, doubleBuffer, doublePrecision, floatBuffer, and intBuffer.

Referenced by gbl::GblTrajectory::milleOut().

+ Here is the caller graph for this function:

Member Data Documentation

std::ofstream gbl::MilleBinary::binaryFile
private

Binary File.

Definition at line 81 of file MilleBinary.h.

View newest version in sPHENIX GitHub at line 81 of file MilleBinary.h

Referenced by writeRecord(), and ~MilleBinary().

std::vector<double> gbl::MilleBinary::doubleBuffer
private

Double buffer.

Definition at line 84 of file MilleBinary.h.

View newest version in sPHENIX GitHub at line 84 of file MilleBinary.h

Referenced by addData(), MilleBinary(), and writeRecord().

bool gbl::MilleBinary::doublePrecision
private

Flag for storage in as double values.

Definition at line 85 of file MilleBinary.h.

View newest version in sPHENIX GitHub at line 85 of file MilleBinary.h

Referenced by addData(), MilleBinary(), and writeRecord().

std::vector<float> gbl::MilleBinary::floatBuffer
private

Float buffer.

Definition at line 83 of file MilleBinary.h.

View newest version in sPHENIX GitHub at line 83 of file MilleBinary.h

Referenced by addData(), MilleBinary(), and writeRecord().

std::vector<int> gbl::MilleBinary::intBuffer
private

Integer buffer.

Definition at line 82 of file MilleBinary.h.

View newest version in sPHENIX GitHub at line 82 of file MilleBinary.h

Referenced by addData(), MilleBinary(), and writeRecord().


The documentation for this class was generated from the following files: