File indexing completed on 2024-04-06 12:13:49
0001 #ifndef GeneratorInterface_LHEInterface_LHEReader_h
0002 #define GeneratorInterface_LHEInterface_LHEReader_h
0003
0004 #include <string>
0005 #include <vector>
0006 #include <memory>
0007
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009
0010 namespace lhef {
0011
0012 class XMLDocument;
0013 class LHERunInfo;
0014 class LHEEvent;
0015
0016 class LHEReader {
0017 public:
0018 LHEReader(const edm::ParameterSet ¶ms);
0019 LHEReader(const std::vector<std::string> &fileNames, unsigned int skip = 0);
0020 LHEReader(const std::string &inputs, unsigned int skip = 0);
0021 ~LHEReader();
0022
0023 std::shared_ptr<LHEEvent> next(bool *newFileOpened = nullptr);
0024
0025 private:
0026 class Source;
0027 class FileSource;
0028 class StringSource;
0029 class XMLHandler;
0030
0031 const std::vector<std::string> fileURLs;
0032 const std::string strName;
0033 unsigned int firstEvent;
0034 int maxEvents;
0035 unsigned int curIndex;
0036 std::vector<std::string> weightsinconfig;
0037
0038 std::unique_ptr<Source> curSource;
0039 std::unique_ptr<XMLDocument> curDoc;
0040 std::shared_ptr<LHERunInfo> curRunInfo;
0041 std::unique_ptr<XMLHandler> handler;
0042 std::shared_ptr<void> platform;
0043 };
0044
0045 }
0046
0047 #endif