BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnMille Class Reference

#include <BmnMille.h>

Public Member Functions

 BmnMille (const Char_t *outFileName, Bool_t asBinary=kTRUE, Bool_t writeZero=kFALSE)
 Opens outFileName (by default as binary file).
 ~BmnMille ()
 Closes file.
void mille (Int_t NLC, const Double_t *derLc, Int_t NGL, const Double_t *derGl, const Int_t *label, Double_t rMeas, Double_t sigma)
 Add measurement to buffer.
void special (Int_t nSpecial, const Double_t *floatings, const Int_t *integers)
 Add special data to buffer.
void kill ()
 Reset buffers, i.e. kill derivatives accumulated for current set.
void end ()
 Write buffer (set of derivatives with same local parameters) to file.
 BmnMille (const Char_t *outFileName, Bool_t asBinary=kTRUE, Bool_t writeZero=kFALSE)
 ~BmnMille ()
void mille (Int_t NLC, const Double_t *derLc, Int_t NGL, const Double_t *derGl, const Int_t *label, Double_t rMeas, Double_t sigma)
void special (Int_t nSpecial, const Double_t *floatings, const Int_t *integers)
void kill ()
void end ()

Private Types

enum  { myBufferSize = 500000 }
 buffer size for ints and floats More...
enum  { myMaxLabel = (0xFFFFFFFF - (1 << 31)) }
 largest label allowed: 2^31 - 1 More...
enum  { myBufferSize = 500000 }
 buffer size for ints and floats More...
enum  { myMaxLabel = (0xFFFFFFFF - (1 << 31)) }
 largest label allowed: 2^31 - 1 More...

Private Member Functions

void newSet ()
 Initialize for new set of locals, e.g. new track.
Bool_t checkBufferSize (Int_t nLocal, Int_t nGlobal)
 Enough space for next nLocal + nGlobal derivatives incl. measurement?
void newSet ()
Bool_t checkBufferSize (Int_t nLocal, Int_t nGlobal)

Private Attributes

std::ofstream myOutFile
 C-binary for output.
Bool_t myAsBinary
 if false output as text
Bool_t myWriteZero
 if true also write out derivatives/labels ==0
Int_t myBufferInt [myBufferSize]
 to collect labels etc.
Float_t myBufferFloat [myBufferSize]
 to collect derivatives etc.
Int_t myBufferPos
 position in buffer
Bool_t myHasSpecial
 if true, special(..) already called for this record

Detailed Description

Definition at line 11 of file BmnMille.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
myBufferSize 500000 

Definition at line 37 of file BmnMille.h.

◆ anonymous enum

anonymous enum
private
Enumerator
myBufferSize 500000 

Definition at line 37 of file BmnMille.h.

◆ anonymous enum

anonymous enum
private
Enumerator
myMaxLabel (0xFFFFFFFF - (1 << 31)) 

Definition at line 47 of file BmnMille.h.

◆ anonymous enum

anonymous enum
private
Enumerator
myMaxLabel (0xFFFFFFFF - (1 << 31)) 

Definition at line 47 of file BmnMille.h.

Constructor & Destructor Documentation

◆ BmnMille() [1/2]

BmnMille::BmnMille ( const Char_t * outFileName,
Bool_t asBinary = kTRUE,
Bool_t writeZero = kFALSE )
Parameters
[in]outFileNamefile name
[in]asBinaryflag for binary
[in]writeZeroflag for keeping of zeros

Definition at line 11 of file BmnMille.cxx.

References myAsBinary, myBufferFloat, myBufferInt, myBufferPos, myHasSpecial, myOutFile, and myWriteZero.

◆ ~BmnMille() [1/2]

BmnMille::~BmnMille ( )

Definition at line 31 of file BmnMille.cxx.

References myOutFile.

◆ BmnMille() [2/2]

BmnMille::BmnMille ( const Char_t * outFileName,
Bool_t asBinary = kTRUE,
Bool_t writeZero = kFALSE )

◆ ~BmnMille() [2/2]

BmnMille::~BmnMille ( )

Member Function Documentation

◆ checkBufferSize() [1/2]

bool BmnMille::checkBufferSize ( Int_t nLocal,
Int_t nGlobal )
private
Parameters
[in]nLocalnumber of local derivatives
[in]nGlobalnumber of global derivatives
Returns
true if sufficient space available (else false)

Definition at line 194 of file BmnMille.cxx.

References myBufferInt, myBufferPos, and myBufferSize.

Referenced by mille(), and special().

Here is the caller graph for this function:

◆ checkBufferSize() [2/2]

Bool_t BmnMille::checkBufferSize ( Int_t nLocal,
Int_t nGlobal )
private

◆ end() [1/2]

void BmnMille::end ( )

Definition at line 150 of file BmnMille.cxx.

References i, myAsBinary, myBufferFloat, myBufferInt, myBufferPos, and myOutFile.

Referenced by BmnGlobalAlignment::MakeBinFile().

Here is the caller graph for this function:

◆ end() [2/2]

void BmnMille::end ( )

◆ kill() [1/2]

void BmnMille::kill ( )

Definition at line 142 of file BmnMille.cxx.

References myBufferPos.

◆ kill() [2/2]

void BmnMille::kill ( )

◆ mille() [1/2]

void BmnMille::mille ( Int_t NLC,
const Double_t * derLc,
Int_t NGL,
const Double_t * derGl,
const Int_t * label,
Double_t rMeas,
Double_t sigma )
Parameters
[in]NLCnumber of local derivatives
[in]derLclocal derivatives
[in]NGLnumber of global derivatives
[in]derGlglobal derivatives
[in]labelglobal labels
[in]rMeasmeasurement (residuum)
[in]sigmaerror

Definition at line 48 of file BmnMille.cxx.

References checkBufferSize(), i, myBufferFloat, myBufferInt, myBufferPos, myMaxLabel, myWriteZero, and newSet().

Referenced by BmnGlobalAlignment::_Mille().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mille() [2/2]

void BmnMille::mille ( Int_t NLC,
const Double_t * derLc,
Int_t NGL,
const Double_t * derGl,
const Int_t * label,
Double_t rMeas,
Double_t sigma )

◆ newSet() [1/2]

void BmnMille::newSet ( )
private

Definition at line 178 of file BmnMille.cxx.

References myBufferFloat, myBufferInt, myBufferPos, and myHasSpecial.

Referenced by mille(), and special().

Here is the caller graph for this function:

◆ newSet() [2/2]

void BmnMille::newSet ( )
private

◆ special() [1/2]

void BmnMille::special ( Int_t nSpecial,
const Double_t * floatings,
const Int_t * integers )
Parameters
[in]nSpecialnumber of floats/ints
[in]floatingsfloats
[in]integersints

Definition at line 104 of file BmnMille.cxx.

References checkBufferSize(), i, myBufferFloat, myBufferInt, myBufferPos, myHasSpecial, and newSet().

Here is the call graph for this function:

◆ special() [2/2]

void BmnMille::special ( Int_t nSpecial,
const Double_t * floatings,
const Int_t * integers )

Member Data Documentation

◆ myAsBinary

Bool_t BmnMille::myAsBinary
private

Definition at line 33 of file BmnMille.h.

Referenced by BmnMille(), checkBufferSize(), and end().

◆ myBufferFloat

Float_t BmnMille::myBufferFloat
private

Definition at line 42 of file BmnMille.h.

Referenced by BmnMille(), end(), mille(), newSet(), and special().

◆ myBufferInt

Int_t BmnMille::myBufferInt
private

Definition at line 41 of file BmnMille.h.

Referenced by BmnMille(), checkBufferSize(), end(), mille(), newSet(), and special().

◆ myBufferPos

Int_t BmnMille::myBufferPos
private

Definition at line 43 of file BmnMille.h.

Referenced by BmnMille(), checkBufferSize(), end(), kill(), mille(), newSet(), and special().

◆ myHasSpecial

Bool_t BmnMille::myHasSpecial
private

Definition at line 44 of file BmnMille.h.

Referenced by BmnMille(), newSet(), and special().

◆ myOutFile

std::ofstream BmnMille::myOutFile
private

Definition at line 32 of file BmnMille.h.

Referenced by BmnMille(), ~BmnMille(), checkBufferSize(), and end().

◆ myWriteZero

Bool_t BmnMille::myWriteZero
private

Definition at line 34 of file BmnMille.h.

Referenced by BmnMille(), checkBufferSize(), and mille().


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