ROOT logo
#ifndef MILLE_H
#define MILLE_H

#include <fstream>

/**
 * \class Mille
 *
 *  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 lables 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
 *  $Revision: 1.3 $
 *  $Date: 2007/04/16 17:47:38 $
 *  (last update by $Author: flucke $)
 */

class Mille 
{
 public:
  Mille(const char *outFileName, bool asBinary = true, bool writeZero = false);
  ~Mille();

  void mille(int NLC, const float *derLc, int NGL, const float *derGl,
	     const int *label, float rMeas, float sigma);
  void special(int nSpecial, const float *floatings, const int *integers);
  void kill();
//  void end();
  int end();

 private:
  void newSet();
  bool checkBufferSize(int nLocal, int nGlobal);

  std::ofstream myOutFile; // C-binary for output
  bool myAsBinary;         // if false output as text
  bool myWriteZero;        // if true also write out derivatives/lables ==0

  enum {myBufferSize = 5000};
  int   myBufferInt[myBufferSize];   // to collect labels etc.
  float myBufferFloat[myBufferSize]; // to collect derivatives etc.
  int   myBufferPos;
  bool  myHasSpecial; // if true, special(..) already called for this record

  enum {myMaxLabel = (0xFFFFFFFF - (1 << 31))}; // largest label allowed: 2^31 - 1
};
#endif
 Mille.h:1
 Mille.h:2
 Mille.h:3
 Mille.h:4
 Mille.h:5
 Mille.h:6
 Mille.h:7
 Mille.h:8
 Mille.h:9
 Mille.h:10
 Mille.h:11
 Mille.h:12
 Mille.h:13
 Mille.h:14
 Mille.h:15
 Mille.h:16
 Mille.h:17
 Mille.h:18
 Mille.h:19
 Mille.h:20
 Mille.h:21
 Mille.h:22
 Mille.h:23
 Mille.h:24
 Mille.h:25
 Mille.h:26
 Mille.h:27
 Mille.h:28
 Mille.h:29
 Mille.h:30
 Mille.h:31
 Mille.h:32
 Mille.h:33
 Mille.h:34
 Mille.h:35
 Mille.h:36
 Mille.h:37
 Mille.h:38
 Mille.h:39
 Mille.h:40
 Mille.h:41
 Mille.h:42
 Mille.h:43
 Mille.h:44
 Mille.h:45
 Mille.h:46
 Mille.h:47
 Mille.h:48
 Mille.h:49
 Mille.h:50
 Mille.h:51
 Mille.h:52
 Mille.h:53
 Mille.h:54
 Mille.h:55