|
SND@LHC Software
|
Class to write C binary file. More...
#include <Mille.h>
Public Member Functions | |
| Mille (const char *outFileName, bool asBinary=true, bool writeZero=false) | |
| Opens outFileName (by default as binary file). | |
| ~Mille () | |
| Closes file. | |
| void | mille (int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma) |
| Add measurement to buffer. | |
| void | special (int nSpecial, const float *floatings, const int *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. | |
Private Types | |
| enum | { myBufferSize = 5000 } |
| 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 | checkBufferSize (int nLocal, int nGlobal) |
| Enough space for next nLocal + nGlobal derivatives incl. measurement? | |
Private Attributes | |
| std::ofstream | myOutFile |
| C-binary for output. | |
| bool | myAsBinary |
| if false output as text | |
| bool | myWriteZero |
| int | myBufferInt [myBufferSize] |
| to collect labels etc. | |
| float | myBufferFloat [myBufferSize] |
| to collect derivatives etc. | |
| int | myBufferPos |
| position in buffer | |
| bool | myHasSpecial |
Class to write C binary file.
Class to write a C binary (cf. below) file of a given name and to fill it with information used as input to pede. Use its member functions mille(), special(), kill() and end() as you would use the fortran MILLE and its entry points MILLSP, KILLE and ENDLE.
For debugging purposes constructor flags enable switching to text output and/or to write also derivatives and labels which are ==0. But note that pede will not be able to read text output and has not been tested with derivatives/labels ==0.
author : Gero Flucke date : October 2006
(last update by
)
|
private |
buffer size for ints and floats
| Enumerator | |
|---|---|
| myBufferSize | |
Definition at line 70 of file Mille.h.
|
private |
largest label allowed: 2^31 - 1
| Enumerator | |
|---|---|
| myMaxLabel | |
Definition at line 76 of file Mille.h.
| Mille::Mille | ( | const char * | outFileName, |
| bool | asBinary = true, |
||
| bool | writeZero = false |
||
| ) |
Opens outFileName (by default as binary file).
author : Gero Flucke, University Hamburg, 2006 date : October 2006
(last update by
)
| [in] | outFileName | file name |
| [in] | asBinary | flag for binary |
| [in] | writeZero | flag for keeping of zeros |
Definition at line 45 of file Mille.cc.
| Mille::~Mille | ( | ) |
|
private |
Enough space for next nLocal + nGlobal derivatives incl. measurement?
| [in] | nLocal | number of local derivatives |
| [in] | nGlobal | number of global derivatives |
Definition at line 214 of file Mille.cc.
| void Mille::end | ( | ) |
| void Mille::kill | ( | ) |
Reset buffers, i.e. kill derivatives accumulated for current set.
| void Mille::mille | ( | int | NLC, |
| const float * | derLc, | ||
| int | NGL, | ||
| const float * | derGl, | ||
| const int * | label, | ||
| float | rMeas, | ||
| float | sigma | ||
| ) |
Add measurement to buffer.
| [in] | NLC | number of local derivatives |
| [in] | derLc | local derivatives |
| [in] | NGL | number of global derivatives |
| [in] | derGl | global derivatives |
| [in] | label | global labels |
| [in] | rMeas | measurement (residuum) |
| [in] | sigma | error |
Definition at line 78 of file Mille.cc.
|
private |
Initialize for new set of locals, e.g. new track.
| void Mille::special | ( | int | nSpecial, |
| const float * | floatings, | ||
| const int * | integers | ||
| ) |
Add special data to buffer.
| [in] | nSpecial | number of floats/ints |
| [in] | floatings | floats |
| [in] | integers | ints |
Definition at line 127 of file Mille.cc.
|
private |
|
private |
|
private |
|
private |