CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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);
23  LHEReader(const std::string & inputs,
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;
36  const std::string strName;
37  unsigned int firstEvent;
38  int maxEvents;
39  unsigned int curIndex;
40  std::vector<std::string> weightsinconfig;
41 
42  std::auto_ptr<Source> curSource;
43  std::auto_ptr<XMLDocument> curDoc;
44  boost::shared_ptr<LHERunInfo> curRunInfo;
45  std::auto_ptr<XMLHandler> handler;
46 };
47 
48 } // namespace lhef
49 
50 #endif // GeneratorInterface_LHEInterface_LHEReader_h
LHEReader(const edm::ParameterSet &params)
Definition: LHEReader.cc:433
const std::vector< std::string > fileURLs
Definition: LHEReader.h:33
boost::shared_ptr< LHERunInfo > curRunInfo
Definition: LHEReader.h:44
std::auto_ptr< XMLHandler > handler
Definition: LHEReader.h:45
const std::string strName
Definition: LHEReader.h:36
boost::shared_ptr< LHEEvent > next(bool *newFileOpened=nullptr)
Definition: LHEReader.cc:460
std::auto_ptr< XMLDocument > curDoc
Definition: LHEReader.h:43
unsigned int firstEvent
Definition: LHEReader.h:37
tuple fileNames
Definition: LaserDQM_cfg.py:34
std::auto_ptr< Source > curSource
Definition: LHEReader.h:42
unsigned int curIndex
Definition: LHEReader.h:39
std::vector< std::string > weightsinconfig
Definition: LHEReader.h:40