CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/Alignment/MillePedeAlignmentAlgorithm/src/Mille.h

Go to the documentation of this file.
00001 #ifndef MILLE_H
00002 #define MILLE_H
00003 
00004 #include <fstream>
00005 
00026 class Mille 
00027 {
00028  public:
00029   Mille(const char *outFileName, bool asBinary = true, bool writeZero = false);
00030   ~Mille();
00031 
00032   void mille(int NLC, const float *derLc, int NGL, const float *derGl,
00033              const int *label, float rMeas, float sigma);
00034   void special(int nSpecial, const float *floatings, const int *integers);
00035   void kill();
00036   void end();
00037 
00038  private:
00039   void newSet();
00040   bool checkBufferSize(int nLocal, int nGlobal);
00041 
00042   std::ofstream myOutFile; // C-binary for output
00043   bool myAsBinary;         // if false output as text
00044   bool myWriteZero;        // if true also write out derivatives/lables ==0
00045 
00046   enum {myBufferSize = 5000};
00047   int   myBufferInt[myBufferSize];   // to collect labels etc.
00048   float myBufferFloat[myBufferSize]; // to collect derivatives etc.
00049   int   myBufferPos;
00050   bool  myHasSpecial; // if true, special(..) already called for this record
00051 
00052   enum {myMaxLabel = (0xFFFFFFFF - (1 << 31))}; // largest label allowed: 2^31 - 1
00053 };
00054 #endif