CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Mille.h
Go to the documentation of this file.
1 #ifndef MILLE_H
2 #define MILLE_H
3 
4 #include <fstream>
5 
26 class Mille
27 {
28  public:
29  Mille(const char *outFileName, bool asBinary = true, bool writeZero = false);
30  ~Mille();
31 
32  void mille(int NLC, const float *derLc, int NGL, const float *derGl,
33  const int *label, float rMeas, float sigma);
34  void special(int nSpecial, const float *floatings, const int *integers);
35  void kill();
36  void end();
37 
38  private:
39  void newSet();
40  bool checkBufferSize(int nLocal, int nGlobal);
41 
42  std::ofstream myOutFile; // C-binary for output
43  bool myAsBinary; // if false output as text
44  bool myWriteZero; // if true also write out derivatives/lables ==0
45 
46  enum {myBufferSize = 5000};
47  int myBufferInt[myBufferSize]; // to collect labels etc.
48  float myBufferFloat[myBufferSize]; // to collect derivatives etc.
50  bool myHasSpecial; // if true, special(..) already called for this record
51 
52  enum {myMaxLabel = (0xFFFFFFFF - (1 << 31))}; // largest label allowed: 2^31 - 1
53 };
54 #endif
void newSet()
Definition: Mille.cc:160
bool myAsBinary
Definition: Mille.h:43
const std::string & label
Definition: MVAComputer.cc:186
int myBufferInt[myBufferSize]
Definition: Mille.h:47
Mille(const char *outFileName, bool asBinary=true, bool writeZero=false)
Definition: Mille.cc:16
int myBufferPos
Definition: Mille.h:49
std::ofstream myOutFile
Definition: Mille.h:42
void end()
Definition: Mille.cc:129
bool myWriteZero
Definition: Mille.h:44
void mille(int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma)
Definition: Mille.cc:43
bool checkBufferSize(int nLocal, int nGlobal)
Definition: Mille.cc:171
float myBufferFloat[myBufferSize]
Definition: Mille.h:48
Definition: Mille.h:26
void kill()
Definition: Mille.cc:121
~Mille()
Definition: Mille.cc:35
void special(int nSpecial, const float *floatings, const int *integers)
Definition: Mille.cc:86
bool myHasSpecial
Definition: Mille.h:50