CMS 3D CMS Logo

LHEReader.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_LHEInterface_LHEReader_h
2 #define GeneratorInterface_LHEInterface_LHEReader_h
3 
4 #include <string>
5 #include <vector>
6 #include <memory>
7 
9 
10 namespace lhef {
11 
12 class XMLDocument;
13 class LHERunInfo;
14 class LHEEvent;
15 
16 class LHEReader {
17  public:
18  LHEReader(const edm::ParameterSet &params);
19  LHEReader(const std::vector<std::string> &fileNames,
20  unsigned int skip = 0);
22  unsigned int skip = 0);
23  ~LHEReader();
24 
25  std::shared_ptr<LHEEvent> next(bool* newFileOpened = nullptr);
26 
27  private:
28  class Source;
29  class FileSource;
30  class StringSource;
31  class XMLHandler;
32 
33  const std::vector<std::string> fileURLs;
35  unsigned int firstEvent;
36  int maxEvents;
37  unsigned int curIndex;
38  std::vector<std::string> weightsinconfig;
39 
40  std::unique_ptr<Source> curSource;
41  std::unique_ptr<XMLDocument> curDoc;
42  std::shared_ptr<LHERunInfo> curRunInfo;
43  std::unique_ptr<XMLHandler> handler;
44  std::shared_ptr<void> platform;
45 };
46 
47 } // namespace lhef
48 
49 #endif // GeneratorInterface_LHEInterface_LHEReader_h
std::shared_ptr< void > platform
Definition: LHEReader.h:44
LHEReader(const edm::ParameterSet &params)
Definition: LHEReader.cc:456
const std::vector< std::string > fileURLs
Definition: LHEReader.h:31
const std::string strName
Definition: LHEReader.h:34
std::unique_ptr< XMLDocument > curDoc
Definition: LHEReader.h:41
std::unique_ptr< Source > curSource
Definition: LHEReader.h:40
unsigned int firstEvent
Definition: LHEReader.h:35
std::shared_ptr< LHERunInfo > curRunInfo
Definition: LHEReader.h:42
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:43
std::shared_ptr< LHEEvent > next(bool *newFileOpened=nullptr)
Definition: LHEReader.cc:490
unsigned int curIndex
Definition: LHEReader.h:37
std::vector< std::string > weightsinconfig
Definition: LHEReader.h:38