GENIEGenerator
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes | Friends | List of all members
genie::RunningThreadInfo Class Reference

Keep info on the event generation thread currently on charge. This is used so that event generation modules invoked by the thread can see the "bigger picture" and access the cross section model for the thread, look-up info for modules that run before or are scheduled to run after etc. More...

#include <RunningThreadInfo.h>

Collaboration diagram for genie::RunningThreadInfo:
Collaboration graph
[legend]

Classes

struct  Cleaner
 clean More...
 

Public Member Functions

const EventGeneratorIRunningThread (void)
 
void UpdateRunningThread (const EventGeneratorI *evg)
 

Static Public Member Functions

static RunningThreadInfoInstance (void)
 

Private Member Functions

 RunningThreadInfo ()
 
 RunningThreadInfo (const RunningThreadInfo &info)
 
virtual ~RunningThreadInfo ()
 

Private Attributes

const EventGeneratorIfRunningThread
 current thread More...
 

Static Private Attributes

static RunningThreadInfofInstance = 0
 self More...
 

Friends

struct Cleaner
 

Detailed Description

Keep info on the event generation thread currently on charge. This is used so that event generation modules invoked by the thread can see the "bigger picture" and access the cross section model for the thread, look-up info for modules that run before or are scheduled to run after etc.

Author
Costas Andreopoulos <c.andreopoulos cern.ch> University of Liverpool
Created:
May 06, 2004
License:
Copyright (c) 2003-2024, The GENIE Collaboration For the full text of the license visit http://copyright.genie-mc.org

Definition at line 29 of file RunningThreadInfo.h.

Constructor & Destructor Documentation

RunningThreadInfo::RunningThreadInfo ( )
private

Definition at line 20 of file RunningThreadInfo.cxx.

References fInstance.

Referenced by Instance().

21 {
22  fInstance = 0;
23 }
static RunningThreadInfo * fInstance
self
genie::RunningThreadInfo::RunningThreadInfo ( const RunningThreadInfo info)
private
RunningThreadInfo::~RunningThreadInfo ( )
privatevirtual

Definition at line 25 of file RunningThreadInfo.cxx.

References fInstance.

26 {
27  fInstance = 0;
28 }
static RunningThreadInfo * fInstance
self

Member Function Documentation

RunningThreadInfo * RunningThreadInfo::Instance ( void  )
static

Definition at line 30 of file RunningThreadInfo.cxx.

References genie::RunningThreadInfo::Cleaner::DummyMethodAndSilentCompiler(), fInstance, and RunningThreadInfo().

Referenced by genie::GEVGDriver::GenerateEvent(), genie::CEvNSEventGenerator::GenerateKinematics(), genie::COHDNuEventGenerator::GenerateKinematics(), genie::HELeptonKinematicsGenerator::ProcessEventRecord(), genie::NuEKinematicsGenerator::ProcessEventRecord(), genie::DFRKinematicsGenerator::ProcessEventRecord(), genie::DMEKinematicsGenerator::ProcessEventRecord(), genie::COHPrimaryLeptonGenerator::ProcessEventRecord(), genie::QELKinematicsGenerator::ProcessEventRecord(), genie::COHHadronicSystemGenerator::ProcessEventRecord(), genie::SKKinematicsGenerator::ProcessEventRecord(), genie::RESKinematicsGenerator::ProcessEventRecord(), genie::COHKinematicsGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::IBDKinematicsGenerator::ProcessEventRecord(), genie::DMELKinematicsGenerator::ProcessEventRecord(), genie::QELEventGeneratorSuSA::ProcessEventRecord(), genie::DISKinematicsGenerator::ProcessEventRecord(), genie::NormGenerator::ProcessEventRecord(), genie::HEDISKinematicsGenerator::ProcessEventRecord(), genie::DMELEventGenerator::ProcessEventRecord(), genie::DMDISKinematicsGenerator::ProcessEventRecord(), genie::MECGenerator::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SPPEventGenerator::ProcessEventRecord(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::RSPPResonanceSelector::SelectResonance(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), and genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode().

31 {
32  if(fInstance == 0) {
33  static RunningThreadInfo::Cleaner cleaner;
36  }
37  return fInstance;
38 }
static RunningThreadInfo * fInstance
self
const EventGeneratorI* genie::RunningThreadInfo::RunningThread ( void  )
inline

Definition at line 34 of file RunningThreadInfo.h.

References fRunningThread.

Referenced by genie::CEvNSEventGenerator::GenerateKinematics(), genie::COHDNuEventGenerator::GenerateKinematics(), genie::HELeptonKinematicsGenerator::ProcessEventRecord(), genie::NuEKinematicsGenerator::ProcessEventRecord(), genie::DFRKinematicsGenerator::ProcessEventRecord(), genie::DMEKinematicsGenerator::ProcessEventRecord(), genie::COHPrimaryLeptonGenerator::ProcessEventRecord(), genie::QELKinematicsGenerator::ProcessEventRecord(), genie::COHHadronicSystemGenerator::ProcessEventRecord(), genie::SKKinematicsGenerator::ProcessEventRecord(), genie::RESKinematicsGenerator::ProcessEventRecord(), genie::COHKinematicsGenerator::ProcessEventRecord(), genie::QELEventGenerator::ProcessEventRecord(), genie::DMELKinematicsGenerator::ProcessEventRecord(), genie::IBDKinematicsGenerator::ProcessEventRecord(), genie::QELEventGeneratorSuSA::ProcessEventRecord(), genie::DISKinematicsGenerator::ProcessEventRecord(), genie::NormGenerator::ProcessEventRecord(), genie::HEDISKinematicsGenerator::ProcessEventRecord(), genie::DMELEventGenerator::ProcessEventRecord(), genie::DMDISKinematicsGenerator::ProcessEventRecord(), genie::MECGenerator::ProcessEventRecord(), genie::QELEventGeneratorSM::ProcessEventRecord(), genie::SPPEventGenerator::ProcessEventRecord(), genie::MECGenerator::SelectEmpiricalKinematics(), genie::RSPPResonanceSelector::SelectResonance(), genie::QELKinematicsGenerator::SpectralFuncExperimentalCode(), and genie::DMELKinematicsGenerator::SpectralFuncExperimentalCode().

35  {
36  return fRunningThread;
37  }
const EventGeneratorI * fRunningThread
current thread
void genie::RunningThreadInfo::UpdateRunningThread ( const EventGeneratorI evg)
inline

Definition at line 38 of file RunningThreadInfo.h.

References fRunningThread.

Referenced by genie::GEVGDriver::GenerateEvent().

39  {
40  fRunningThread = evg;
41  }
const EventGeneratorI * fRunningThread
current thread

Friends And Related Function Documentation

friend struct Cleaner
friend

Definition at line 64 of file RunningThreadInfo.h.

Member Data Documentation

RunningThreadInfo * RunningThreadInfo::fInstance = 0
staticprivate
const EventGeneratorI* genie::RunningThreadInfo::fRunningThread
private

current thread

Definition at line 52 of file RunningThreadInfo.h.

Referenced by RunningThread(), and UpdateRunningThread().


The documentation for this class was generated from the following files: