CMS 3D CMS Logo

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 public:
28  Mille(const char *outFileName, bool asBinary = true, bool writeZero = false);
29  ~Mille();
30 
31  void mille(int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma);
32  void special(int nSpecial, const float *floatings, const int *integers);
33  void kill();
34  void flushOutputFile();
35  void resetOutputFile();
36  void end();
37 
38 private:
39  void newSet();
40  bool checkBufferSize(int nLocal, int nGlobal);
41 
42  const std::ios_base::openmode fileMode_; // file open mode of the binary
43  const std::string fileName_; // file name of the binary
44  std::ofstream outFile_; // C-binary for output
45  bool asBinary_; // if false output as text
46  bool writeZero_; // if true also write out derivatives/lables ==0
47 
48  enum { bufferSize_ = 5000 };
49  int bufferInt_[bufferSize_]; // to collect labels etc.
50  float bufferFloat_[bufferSize_]; // to collect derivatives etc.
52  bool hasSpecial_; // if true, special(..) already called for this record
53 
54  enum { maxLabel_ = (0xFFFFFFFF - (1 << 31)) }; // largest label allowed: 2^31 - 1
55 };
56 #endif
Mille::maxLabel_
Definition: Mille.h:54
Mille::fileMode_
const std::ios_base::openmode fileMode_
Definition: Mille.h:42
Mille::~Mille
~Mille()
Definition: Mille.cc:39
Mille::kill
void kill()
Definition: Mille.cc:124
Mille::Mille
Mille(const char *outFileName, bool asBinary=true, bool writeZero=false)
Definition: Mille.cc:17
Mille::bufferSize_
Definition: Mille.h:48
Mille::bufferFloat_
float bufferFloat_[bufferSize_]
Definition: Mille.h:50
Mille::writeZero_
bool writeZero_
Definition: Mille.h:46
DeadROC_duringRun.outFileName
outFileName
Definition: DeadROC_duringRun.py:215
Mille::newSet
void newSet()
Definition: Mille.cc:176
Mille::end
void end()
Definition: Mille.cc:149
Mille::mille
void mille(int NLC, const float *derLc, int NGL, const float *derGl, const int *label, float rMeas, float sigma)
Definition: Mille.cc:46
Mille::flushOutputFile
void flushOutputFile()
Definition: Mille.cc:131
Mille::bufferInt_
int bufferInt_[bufferSize_]
Definition: Mille.h:49
Mille::checkBufferSize
bool checkBufferSize(int nLocal, int nGlobal)
Definition: Mille.cc:186
Mille::asBinary_
bool asBinary_
Definition: Mille.h:45
Mille::hasSpecial_
bool hasSpecial_
Definition: Mille.h:52
Mille::outFile_
std::ofstream outFile_
Definition: Mille.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Mille::fileName_
const std::string fileName_
Definition: Mille.h:43
Mille::special
void special(int nSpecial, const float *floatings, const int *integers)
Definition: Mille.cc:88
Mille::bufferPos_
int bufferPos_
Definition: Mille.h:51
Mille::resetOutputFile
void resetOutputFile()
Definition: Mille.cc:138
Mille
Definition: Mille.h:26
label
const char * label
Definition: PFTauDecayModeTools.cc:11