CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
FortranCallback.h
Go to the documentation of this file.
1 #ifndef gen_FortranCallback_h
2 #define gen_FortranCallback_h
3 
4 #include <boost/shared_ptr.hpp>
5 
7 
10 
11 namespace HepMC
12 {
13 class GenEvent;
14 }
15 
16 namespace gen {
17 
19  {
20 
21  public:
22 
23  static FortranCallback* getInstance() ;
24 
25  //void setLHEEvent(lhef::LHEEvent* lhev) { fPartonLevel = lhev; }
26  void setLHERunInfo( lhef::LHERunInfo* lheri ) { fRunBlock=lheri; }
27  void setLHEEvent( lhef::LHEEvent* lhee ) { fEventBlock=lhee; }
28 
30 
31  void fillHeader();
32  void fillEvent();
33 
35 
36  private:
37 
38  // ctor
39 
41 
42  // data member(s)
43 
47 
49 
50 
51  };
52 
53 // --** Implementation **---
54 
56 
58 // : fPartonLevel(0)
59  : fRunBlock(0), fEventBlock(0), fIterationsPerEvent(0)
60 {
61 }
62 
64 {
65  if ( fInstance == 0 ) fInstance = new FortranCallback;
66  return fInstance;
67 }
68 
70 {
71 
72  if ( fRunBlock == 0 ) return;
73 
74  //const lhef::HEPRUP* heprup = &(fRunBlock->heprup());
75  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
76 
78 
79  return;
80 
81 }
82 
84 {
85 
86  //if ( fPartonLevel == 0 ) return;
87  //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP();
88 
89  if ( fEventBlock == 0 ) return;
90 
91  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
92 
93  if (fIterationsPerEvent++)
94  {
95  hepeup_.nup = 0;
96  return;
97  }
98 
100 
101  return;
102 
103 }
104 
105 
106 } // end namespace
107 
108 #endif
109 
110 
111 
struct HEPEUP_ hepeup_
void setLHERunInfo(lhef::LHERunInfo *lheri)
int getIterationsPerEvent() const
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:43
static FortranCallback * fInstance
static void fillHEPEUP(const HEPEUP *hepeup)
lhef::LHERunInfo * fRunBlock
static FortranCallback * getInstance()
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:52
void setLHEEvent(lhef::LHEEvent *lhee)
lhef::LHEEvent * fEventBlock
static void fillHEPRUP(const HEPRUP *heprup)