CMS 3D CMS Logo

/afs/cern.ch/work/a/aaltunda/public/www/CMSSW_5_3_13_patch3/src/GeneratorInterface/ReggeGribovPartonMCInterface/src/LzmaFile.h

Go to the documentation of this file.
00001 #ifndef _include_LzmaFile_h_
00002 #define _include_LzmaFile_h_
00003 
00004 #include "Types.h"
00005 #include "7zFile.h"
00006 #include "LzmaDec.h"
00007 
00008 #include <string>
00009 #include <queue>
00010 
00011 #include "LzmaDec.h"
00012 #include "Alloc.h"
00013 #include "Types.h"
00014 #include "7zFile.h"
00015 
00016 #include <sstream>
00017 #include <string>
00018 #include <iostream>
00019 #include <queue>
00020 using namespace std;
00021 
00022 
00023 
00024 #define IN_BUF_SIZE (1 << 16)
00025 #define OUT_BUF_SIZE (1 << 16)
00026 
00027 struct LzmaFile {
00028 
00029   LzmaFile();
00030 
00031   SRes Open(const std::string& fileName);
00032   SRes Close();
00033   SRes DecodeAll();
00034   SRes DecodeBuffer();
00035    //SRes DecodeArray(double* data, const int length);
00036   SRes ReadNextNumber(double& data);
00037   SRes FillArray(double* data, const int length);
00038   
00039   CFileSeqInStream inStream;
00040   int res;
00041   CLzmaDec state;
00042   
00043   // std::ostringstream fStrNumber;
00044 
00045   UInt64 unpackSize;
00046   
00047   Byte inBuf[IN_BUF_SIZE];
00048   Byte outBuf[OUT_BUF_SIZE];
00049 
00050   std::queue<double> fStorage;
00051 
00052   size_t inPos;
00053   size_t inSize;
00054   size_t outPos;
00055 
00056   // string converting
00057   bool fStartNumber;
00058 
00059   bool fReadSign;
00060   bool fReadMantisseR;
00061   bool fReadMantisseF;
00062   bool fReadExponentSign;
00063   bool fReadExponent;
00064   
00065   bool fNegative;
00066   bool fExponentNegative;
00067       
00068   double fMantisseR;
00069   double fMantisseF;
00070   int fMantisseFcount;
00071   int fExponent;
00072 
00073 };
00074 
00075 
00076 
00077 #endif