BmnRoot
26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Toggle main menu visibility
Loading...
Searching...
No Matches
BmnMille.h
Go to the documentation of this file.
1
#ifndef BMNMILLE_H
2
#define BMNMILLE_H 1
3
4
#include <
Rtypes.h
>
5
#include <fstream>
6
#include <iostream>
7
#include <math.h>
8
9
using namespace
std
;
10
11
class
BmnMille
12
{
13
public
:
14
BmnMille
(
const
Char_t
* outFileName,
Bool_t
asBinary =
kTRUE
,
Bool_t
writeZero =
kFALSE
);
15
~BmnMille
();
16
17
void
mille
(
Int_t
NLC,
18
const
Double_t
* derLc,
19
Int_t
NGL,
20
const
Double_t
* derGl,
21
const
Int_t
* label,
22
Double_t
rMeas,
23
Double_t
sigma);
24
void
special
(
Int_t
nSpecial,
const
Double_t
* floatings,
const
Int_t
* integers);
25
void
kill
();
26
void
end
();
27
28
private
:
29
void
newSet
();
30
Bool_t
checkBufferSize
(
Int_t
nLocal,
Int_t
nGlobal);
31
32
std::ofstream
myOutFile
;
///< C-binary for output
33
Bool_t
myAsBinary
;
///< if false output as text
34
Bool_t
myWriteZero
;
///< if true also write out derivatives/labels ==0
35
/// buffer size for ints and floats
36
37
enum
38
{
39
myBufferSize
= 500000
40
};
///< buffer size for ints and floats
41
Int_t
myBufferInt
[
myBufferSize
];
///< to collect labels etc.
42
Float_t
myBufferFloat
[
myBufferSize
];
///< to collect derivatives etc.
43
Int_t
myBufferPos
;
///< position in buffer
44
Bool_t
myHasSpecial
;
///< if true, special(..) already called for this record
45
/// largest label allowed: 2^31 - 1
46
47
enum
48
{
49
myMaxLabel
= (0xFFFFFFFF - (1 << 31))
50
};
51
};
52
#endif
Bool_t
bool Bool_t
Int_t
int Int_t
Char_t
char Char_t
Float_t
float Float_t
kFALSE
constexpr Bool_t kFALSE
Double_t
double Double_t
kTRUE
constexpr Bool_t kTRUE
Rtypes.h
BmnMille::end
void end()
Write buffer (set of derivatives with same local parameters) to file.
Definition
BmnMille.cxx:150
BmnMille::myBufferPos
Int_t myBufferPos
position in buffer
Definition
BmnMille.h:43
BmnMille::myBufferSize
@ myBufferSize
Definition
BmnMille.h:39
BmnMille::myBufferFloat
Float_t myBufferFloat[myBufferSize]
to collect derivatives etc.
Definition
BmnMille.h:42
BmnMille::myHasSpecial
Bool_t myHasSpecial
if true, special(..) already called for this record
Definition
BmnMille.h:44
BmnMille::myWriteZero
Bool_t myWriteZero
if true also write out derivatives/labels ==0
Definition
BmnMille.h:34
BmnMille::mille
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.
Definition
BmnMille.cxx:48
BmnMille::~BmnMille
~BmnMille()
Closes file.
Definition
BmnMille.cxx:31
BmnMille::BmnMille
BmnMille(const Char_t *outFileName, Bool_t asBinary=kTRUE, Bool_t writeZero=kFALSE)
Opens outFileName (by default as binary file).
Definition
BmnMille.cxx:11
BmnMille::kill
void kill()
Reset buffers, i.e. kill derivatives accumulated for current set.
Definition
BmnMille.cxx:142
BmnMille::myOutFile
std::ofstream myOutFile
C-binary for output.
Definition
BmnMille.h:32
BmnMille::myAsBinary
Bool_t myAsBinary
if false output as text
Definition
BmnMille.h:33
BmnMille::myBufferInt
Int_t myBufferInt[myBufferSize]
to collect labels etc.
Definition
BmnMille.h:41
BmnMille::myMaxLabel
@ myMaxLabel
Definition
BmnMille.h:49
BmnMille::special
void special(Int_t nSpecial, const Double_t *floatings, const Int_t *integers)
Add special data to buffer.
Definition
BmnMille.cxx:104
BmnMille::newSet
void newSet()
Initialize for new set of locals, e.g. new track.
Definition
BmnMille.cxx:178
BmnMille::checkBufferSize
Bool_t checkBufferSize(Int_t nLocal, Int_t nGlobal)
Enough space for next nLocal + nGlobal derivatives incl. measurement?
Definition
BmnMille.cxx:194
std
Definition
json.hpp:4446
alignment
BmnMille.h
Generated on
for BmnRoot by
1.17.0