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 
8 #include <boost/shared_ptr.hpp>
9 
11 
12 namespace lhef {
13 
14 class XMLDocument;
15 class LHERunInfo;
16 class LHEEvent;
17 
18 class LHEReader {
19  public:
20  LHEReader(const edm::ParameterSet &params);
21  LHEReader(const std::vector<std::string> &fileNames,
22  unsigned int skip = 0);
24  unsigned int skip = 0);
25  ~LHEReader();
26 
27  boost::shared_ptr<LHEEvent> next(bool* newFileOpened = nullptr);
28 
29  private:
30  class Source;
31  class FileSource;
32  class StringSource;
33  class XMLHandler;
34 
35  const std::vector<std::string> fileURLs;
37  unsigned int firstEvent;
38  int maxEvents;
39  unsigned int curIndex;
40  std::vector<std::string> weightsinconfig;
41 
42  std::unique_ptr<Source> curSource;
43  std::unique_ptr<XMLDocument> curDoc;
44  boost::shared_ptr<LHERunInfo> curRunInfo;
45  std::unique_ptr<XMLHandler> handler;
46  std::shared_ptr<void> platform;
47 };
48 
49 } // namespace lhef
50 
51 #endif // GeneratorInterface_LHEInterface_LHEReader_h
std::shared_ptr< void > platform
Definition: LHEReader.h:46
LHEReader(const edm::ParameterSet &params)
Definition: LHEReader.cc:456
const std::vector< std::string > fileURLs
Definition: LHEReader.h:33
boost::shared_ptr< LHERunInfo > curRunInfo
Definition: LHEReader.h:44
const std::string strName
Definition: LHEReader.h:36
std::unique_ptr< XMLDocument > curDoc
Definition: LHEReader.h:43
std::unique_ptr< Source > curSource
Definition: LHEReader.h:42
boost::shared_ptr< LHEEvent > next(bool *newFileOpened=nullptr)
Definition: LHEReader.cc:490
unsigned int firstEvent
Definition: LHEReader.h:37
std::unique_ptr< XMLHandler > handler
Definition: LHEReader.h:45
unsigned int curIndex
Definition: LHEReader.h:39
std::vector< std::string > weightsinconfig
Definition: LHEReader.h:40