CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
gen::FortranCallback Class Reference

#include <FortranCallback.h>

Public Member Functions

void fillEvent ()
 
void fillHeader ()
 
int getIterationsPerEvent () const
 
void resetIterationsPerEvent ()
 
void setLHEEvent (lhef::LHEEvent *lhee)
 
void setLHERunInfo (lhef::LHERunInfo *lheri)
 

Static Public Member Functions

static FortranCallbackgetInstance ()
 

Private Member Functions

 FortranCallback ()
 

Private Attributes

lhef::LHEEventfEventBlock
 
int fIterationsPerEvent
 
lhef::LHERunInfofRunBlock
 

Static Private Attributes

static FortranCallbackfInstance = nullptr
 

Detailed Description

Definition at line 15 of file FortranCallback.h.

Constructor & Destructor Documentation

◆ FortranCallback()

gen::FortranCallback::FortranCallback ( )
inlineprivate

Definition at line 46 of file FortranCallback.h.

48  : fRunBlock(nullptr), fEventBlock(nullptr), fIterationsPerEvent(0) {}
lhef::LHERunInfo * fRunBlock
lhef::LHEEvent * fEventBlock

Member Function Documentation

◆ fillEvent()

void gen::FortranCallback::fillEvent ( )
inline

Definition at line 62 of file FortranCallback.h.

References fEventBlock, lhef::CommonBlocks::fillHEPEUP(), fIterationsPerEvent, lhef::LHEEvent::getHEPEUP(), hepeup_, and HEPEUP_::nup.

Referenced by gen::Pythia6ServiceWithCallback::upEvnt().

62  {
63  //if ( fPartonLevel == 0 ) return;
64  //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP();
65 
66  if (fEventBlock == nullptr)
67  return;
68 
69  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
70 
71  if (fIterationsPerEvent++) {
72  hepeup_.nup = 0;
73  return;
74  }
75 
77 
78  return;
79  }
struct HEPEUP_ hepeup_
static void fillHEPEUP(const HEPEUP *hepeup)
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
lhef::LHEEvent * fEventBlock

◆ fillHeader()

void gen::FortranCallback::fillHeader ( )
inline

Definition at line 50 of file FortranCallback.h.

References lhef::CommonBlocks::fillHEPRUP(), fRunBlock, and lhef::LHERunInfo::getHEPRUP().

Referenced by gen::Pythia6ServiceWithCallback::upInit().

50  {
51  if (fRunBlock == nullptr)
52  return;
53 
54  //const lhef::HEPRUP* heprup = &(fRunBlock->heprup());
55  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
56 
58 
59  return;
60  }
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
lhef::LHERunInfo * fRunBlock
static void fillHEPRUP(const HEPRUP *heprup)

◆ getInstance()

FortranCallback * gen::FortranCallback::getInstance ( )
static

◆ getIterationsPerEvent()

int gen::FortranCallback::getIterationsPerEvent ( ) const
inline

Definition at line 28 of file FortranCallback.h.

References fIterationsPerEvent.

◆ resetIterationsPerEvent()

void gen::FortranCallback::resetIterationsPerEvent ( )
inline

◆ setLHEEvent()

void gen::FortranCallback::setLHEEvent ( lhef::LHEEvent lhee)
inline

Definition at line 21 of file FortranCallback.h.

References fEventBlock.

Referenced by gen::Pythia6Hadronizer::hadronize().

21 { fEventBlock = lhee; }
lhef::LHEEvent * fEventBlock

◆ setLHERunInfo()

void gen::FortranCallback::setLHERunInfo ( lhef::LHERunInfo lheri)
inline

Definition at line 20 of file FortranCallback.h.

References fRunBlock.

Referenced by gen::Pythia6Hadronizer::initializeForExternalPartons().

20 { fRunBlock = lheri; }
lhef::LHERunInfo * fRunBlock

Member Data Documentation

◆ fEventBlock

lhef::LHEEvent* gen::FortranCallback::fEventBlock
private

Definition at line 38 of file FortranCallback.h.

Referenced by fillEvent(), and setLHEEvent().

◆ fInstance

FortranCallback * gen::FortranCallback::fInstance = nullptr
staticprivate

Definition at line 41 of file FortranCallback.h.

Referenced by getInstance().

◆ fIterationsPerEvent

int gen::FortranCallback::fIterationsPerEvent
private

Definition at line 39 of file FortranCallback.h.

Referenced by fillEvent(), getIterationsPerEvent(), and resetIterationsPerEvent().

◆ fRunBlock

lhef::LHERunInfo* gen::FortranCallback::fRunBlock
private

Definition at line 37 of file FortranCallback.h.

Referenced by fillHeader(), and setLHERunInfo().