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 ( )
private

Definition at line 48 of file FortranCallback.h.

50  : fRunBlock(nullptr), fEventBlock(nullptr), fIterationsPerEvent(0) {}

Referenced by getInstance().

Member Function Documentation

◆ fillEvent()

void gen::FortranCallback::fillEvent ( )

Definition at line 70 of file FortranCallback.h.

70  {
71  //if ( fPartonLevel == 0 ) return;
72  //const lhef::HEPEUP* hepeup = fPartonLevel->getHEPEUP();
73 
74  if (fEventBlock == nullptr)
75  return;
76 
77  const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
78 
79  if (fIterationsPerEvent++) {
80  hepeup_.nup = 0;
81  return;
82  }
83 
85 
86  return;
87  }

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

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

◆ fillHeader()

void gen::FortranCallback::fillHeader ( )

Definition at line 58 of file FortranCallback.h.

58  {
59  if (fRunBlock == nullptr)
60  return;
61 
62  //const lhef::HEPRUP* heprup = &(fRunBlock->heprup());
63  const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
64 
66 
67  return;
68  }

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

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

◆ getInstance()

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

◆ getIterationsPerEvent()

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

Definition at line 28 of file FortranCallback.h.

28 { return fIterationsPerEvent; }

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.

21 { fEventBlock = lhee; }

References fEventBlock.

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

◆ setLHERunInfo()

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

Definition at line 20 of file FortranCallback.h.

20 { fRunBlock = lheri; }

References fRunBlock.

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

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().

lhef::LHEEvent::getHEPEUP
const HEPEUP * getHEPEUP() const
Definition: LHEEvent.h:38
gen::FortranCallback::fEventBlock
lhef::LHEEvent * fEventBlock
Definition: FortranCallback.h:38
lhef::CommonBlocks::fillHEPEUP
static void fillHEPEUP(const HEPEUP *hepeup)
Definition: LHECommonBlocks.h:60
hepeup_
struct HEPEUP_ hepeup_
gen::FortranCallback::FortranCallback
FortranCallback()
Definition: FortranCallback.h:48
lhef::CommonBlocks::fillHEPRUP
static void fillHEPRUP(const HEPRUP *heprup)
Definition: LHECommonBlocks.h:41
lhef::HEPRUP
Definition: LesHouches.h:22
lhef::HEPEUP
Definition: LesHouches.h:138
lhef::LHERunInfo::getHEPRUP
const HEPRUP * getHEPRUP() const
Definition: LHERunInfo.h:51
gen::FortranCallback::fInstance
static FortranCallback * fInstance
Definition: FortranCallback.h:41
HEPEUP_::nup
int nup
Definition: LHECommonBlocks.h:21
gen::FortranCallback::fRunBlock
lhef::LHERunInfo * fRunBlock
Definition: FortranCallback.h:37
gen::FortranCallback::fIterationsPerEvent
int fIterationsPerEvent
Definition: FortranCallback.h:39