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 flushOutputFile();
37  void end();
38 
39  private:
40  void newSet();
41  bool checkBufferSize(int nLocal, int nGlobal);
42 
43  std::ofstream myOutFile; // C-binary for output
44  bool myAsBinary; // if false output as text
45  bool myWriteZero; // if true also write out derivatives/lables ==0
46 
47  enum {myBufferSize = 5000};
48  int myBufferInt[myBufferSize]; // to collect labels etc.
49  float myBufferFloat[myBufferSize]; // to collect derivatives etc.
51  bool myHasSpecial; // if true, special(..) already called for this record
52 
53  enum {myMaxLabel = (0xFFFFFFFF - (1 << 31))}; // largest label allowed: 2^31 - 1
54 };
55 #endif
void newSet()
Definition: Mille.cc:168
bool myAsBinary
Definition: Mille.h:44
int myBufferInt[myBufferSize]
Definition: Mille.h:48
Mille(const char *outFileName, bool asBinary=true, bool writeZero=false)
Definition: Mille.cc:16
int myBufferPos
Definition: Mille.h:50
std::ofstream myOutFile
Definition: Mille.h:43
void end()
Definition: Mille.cc:137
bool myWriteZero
Definition: Mille.h:45
void mille(int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma)
Definition: Mille.cc:43
void flushOutputFile()
Definition: Mille.cc:130
bool checkBufferSize(int nLocal, int nGlobal)
Definition: Mille.cc:179
float myBufferFloat[myBufferSize]
Definition: Mille.h:49
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:51