BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
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
9using namespace std;
10
11class BmnMille
12{
13 public:
14 BmnMille(const Char_t* outFileName, Bool_t asBinary = kTRUE, Bool_t writeZero = kFALSE);
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();
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 Bool_t
int Int_t
char Char_t
float Float_t
constexpr Bool_t kFALSE
double Double_t
constexpr Bool_t kTRUE
void end()
Int_t myBufferPos
position in buffer
Definition BmnMille.h:43
@ myBufferSize
Definition BmnMille.h:39
Float_t myBufferFloat[myBufferSize]
to collect derivatives etc.
Definition BmnMille.h:42
Bool_t myHasSpecial
if true, special(..) already called for this record
Definition BmnMille.h:44
Bool_t myWriteZero
if true also write out derivatives/labels ==0
Definition BmnMille.h:34
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)
BmnMille(const Char_t *outFileName, Bool_t asBinary=kTRUE, Bool_t writeZero=kFALSE)
void kill()
std::ofstream myOutFile
C-binary for output.
Definition BmnMille.h:32
Bool_t myAsBinary
if false output as text
Definition BmnMille.h:33
Int_t myBufferInt[myBufferSize]
to collect labels etc.
Definition BmnMille.h:41
@ myMaxLabel
Definition BmnMille.h:49
void special(Int_t nSpecial, const Double_t *floatings, const Int_t *integers)
Bool_t checkBufferSize(Int_t nLocal, Int_t nGlobal)
void newSet()
Definition json.hpp:4446