CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/GeneratorInterface/LHEInterface/interface/LHEReader.h

Go to the documentation of this file.
00001 #ifndef GeneratorInterface_LHEInterface_LHEReader_h
00002 #define GeneratorInterface_LHEInterface_LHEReader_h
00003 
00004 #include <string>
00005 #include <vector>
00006 #include <memory>
00007 
00008 #include <boost/shared_ptr.hpp>
00009 
00010 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00011 
00012 namespace lhef {
00013 
00014 class XMLDocument;
00015 class LHERunInfo;
00016 class LHEEvent;
00017 
00018 class LHEReader {
00019     public:
00020         LHEReader(const edm::ParameterSet &params);
00021         LHEReader(const std::vector<std::string> &fileNames,
00022                   unsigned int skip = 0);
00023         LHEReader(const std::string & inputs,
00024                   unsigned int skip = 0);
00025         ~LHEReader();
00026 
00027         boost::shared_ptr<LHEEvent> next(bool* newFileOpened = nullptr);
00028 
00029     private:
00030         class Source;
00031         class FileSource;
00032         class StringSource;
00033         class XMLHandler;
00034 
00035         const std::vector<std::string>  fileURLs;
00036     const std::string               strName;
00037         unsigned int                    firstEvent;
00038         int                             maxEvents;
00039         unsigned int                    curIndex;
00040 
00041         std::auto_ptr<Source>           curSource;
00042         std::auto_ptr<XMLDocument>      curDoc;
00043         boost::shared_ptr<LHERunInfo>   curRunInfo;
00044         std::auto_ptr<XMLHandler>       handler;
00045 };
00046 
00047 } // namespace lhef
00048 
00049 #endif // GeneratorInterface_LHEInterface_LHEReader_h