CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MCatNLOSource.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
2 #define GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
3 
4 #include <memory>
5 
6 #include <boost/shared_ptr.hpp>
7 
12 
14 
16 
17 #include <fstream>
18 
19 
20 // Common Block for HERWIG parameters set by UPINIT
21 extern "C" {
22  extern struct MCPARS_ {
23  double emmin;
24  double emmax;
25  double gammax;
26  double rmass[1000];
27  double gamw;
28  double gamz;
29  int emmins;
30  int emmaxs;
31  int gammaxs;
32  int rmasss[1000];
33  int gamws;
34  int gamzs;
35  } mcpars_;
36 }
37 
38 namespace lhef {
39  class LHERunInfo;
40  class LHEEvent;
41 }
42 
44  public gen::Herwig6Instance {
45 public:
46  explicit MCatNLOSource(const edm::ParameterSet &params,
47  const edm::InputSourceDescription &desc);
48  virtual ~MCatNLOSource();
49 
50 protected:
51  virtual void endJob();
52  virtual void beginRun(edm::Run &run);
53  virtual bool produce(edm::Event &event);
54 
55  void nextEvent();
56 
57  virtual bool hwwarn(const std::string &fn, int code);
58 
60  std::string fileName;
61 
63  std::auto_ptr<std::ifstream> inputFile;
64 
66  unsigned int skipEvents;
67 
69  unsigned int nEvents;
70 
72 
73  std::auto_ptr<std::ifstream> reader;
74 
75  boost::shared_ptr<lhef::LHERunInfo> runInfo;
76  boost::shared_ptr<lhef::LHEEvent> event;
77 };
78 
79 #endif // GeneratorInterface_MCatNLOInterface_MCatNLOSource_h
unsigned int nEvents
Number of events.
Definition: MCatNLOSource.h:69
virtual ~MCatNLOSource()
virtual bool produce(edm::Event &event)
struct MCPARS_ mcpars_
int emmaxs
Definition: MCatNLOSource.h:30
double rmass[1000]
Definition: MCatNLOSource.h:26
std::auto_ptr< std::ifstream > reader
Definition: MCatNLOSource.h:73
int emmins
Definition: MCatNLOSource.h:29
double gammax
Definition: MCatNLOSource.h:25
double emmin
Definition: MCatNLOSource.h:23
boost::shared_ptr< lhef::LHEEvent > event
Definition: MCatNLOSource.h:76
int rmasss[1000]
Definition: MCatNLOSource.h:32
virtual void endJob()
int gammaxs
Definition: MCatNLOSource.h:31
MCatNLOSource(const edm::ParameterSet &params, const edm::InputSourceDescription &desc)
double gamz
Definition: MCatNLOSource.h:28
double emmax
Definition: MCatNLOSource.h:24
double gamw
Definition: MCatNLOSource.h:27
virtual bool hwwarn(const std::string &fn, int code)
std::string fileName
Name of the input file.
Definition: MCatNLOSource.h:60
boost::shared_ptr< lhef::LHERunInfo > runInfo
Definition: MCatNLOSource.h:75
std::auto_ptr< std::ifstream > inputFile
Pointer to the input file.
Definition: MCatNLOSource.h:63
unsigned int skipEvents
Number of events to skip.
Definition: MCatNLOSource.h:66
virtual void beginRun(edm::Run &run)
Definition: Run.h:33