ThePEG::Interfaced Class Reference

The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to ThePEG, in an attempt to keep the InterfacedBase class as generic as possible. More...

#include <Interfaced.h>

Inheritance diagram for ThePEG::Interfaced:

ThePEG::InterfacedBase ThePEG::Base ThePEG::Named ThePEG::Pointer::ReferenceCounted ThePEG::HandlerBaseT< ThePEG::UseRandom > ThePEG::CKMBase ThePEG::Cuts ThePEG::DecayMode ThePEG::EventGenerator ThePEG::EventManipulator ThePEG::FactoryBase ThePEG::HandlerBaseT< T > ThePEG::Helicity::VertexBase ThePEG::MassGenerator ThePEG::MatcherBase ThePEG::MECuts ThePEG::MultiCutBase ThePEG::OneCutBase ThePEG::ParticleData ThePEG::RandomGenerator ThePEG::RunningCoupling ThePEG::SamplerBase ThePEG::StandardModelBase ThePEG::Strategy ThePEG::TwoCutBase ThePEG::WidthGenerator

List of all members.

Public Member Functions

virtual ~Interfaced ()
 Empty virtual destructor.
virtual bool defaultInit ()
 Functions which are to be used during the actual event generation, after the setup is complete.
Functions used during the actual event generation, after
the setup is complete.

PPtr getParticle (long) const
 Create a new Particle instance given a id number.
PDPtr getParticleData (long) const
 Return a pointer to the ParticleData object corresponding to the given id number.
bool used () const
 Returns true if this object has actally been used.
void useMe () const
 Should be called to indicate that this object has actually been used.
tEGPtr generator () const
 Return a pointer to the EventGenerator controlling the run.
Functions used by the persistent I/O system.
void persistentOutput (PersistentOStream &os) const
 Function used to write out object persistently.
void persistentInput (PersistentIStream &is, int version)
 Function used to read in object persistently.

Static Public Member Functions

static void Init ()
 Standard Init function.

Protected Member Functions

void reporeg (IBPtr object, string name) const
 Register the given object in the Repository with the given name in a subdirectory with the same name as this object.
template<typename PtrT>
bool setDefaultReference (PtrT &ptr, string classname, string objectname)
 If the pointer, ptr, to an object is not set, create an object of class classname and register it with the Repository with the given objectname in a sib-directory with the same name as this object.
 Interfaced ()
 Protected default constructor.
 Interfaced (const string &newName)
 Protected constructor taking a name as argument.
 Interfaced (const Interfaced &i)
 Protected copy-constructor.
void setGenerator (tEGPtr generator)
 Protected function to reset the generator pointer, required for automatic decayer generation in Herwig++ BSM models.

Static Protected Member Functions

static void registerRepository (IBPtr)
 Register an Interfaced object with the Repository.
static void registerRepository (IBPtr, string newName)
 Register an Interfaced object with the Repository, giving it a name.

Private Member Functions

void setUsed () const
 Used internally by 'useMe'.
string doDefaultInit (string)
 Command interface function which calls defaultInit().
Interfacedoperator= (const Interfaced &)
 Private and non-existent assignment operator.

Private Attributes

tEGPtr theGenerator
 A pointer to the EventGenerator controlling the run.
bool theUseFlag
 Flag to tell whether this object has been used or not.

Static Private Attributes

static
AbstractClassDescription
< Interfaced
initInterfaced
 Standard Initialization object.

Friends

class Repository
 Repository is a friend.
class EventGenerator
 EventGenerator is a friend.


Detailed Description

The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to ThePEG, in an attempt to keep the InterfacedBase class as generic as possible.

The main addition is that the Interfaced class has a pointer to an EventGenerator object. During the run-phase this points to the EventGenerator controlling the run in which the Interfaced object is used. Through this EventGenerator there is quick access to eg. the set of ParticleData objects used, and the default RandomGenerator for the run. Note that no EventGenerator object is available to the Interfaced object during the setup phase.

See also:
InterfacedBase

EventGenerator

ParticleData

RandomGenerator

Definition at line 37 of file Interfaced.h.


Member Function Documentation

virtual bool ThePEG::Interfaced::defaultInit (  )  [virtual]

Functions which are to be used during the actual event generation, after the setup is complete.

A sub class can implement this function to implement some default initialization for this object during the setup phase. A typical example is if this object need some references to other objects and if these can be easily created. In this case the objects can be added to the repository in a sub-directory with the same name as this object.

Returns:
false if the initialization failed.

tEGPtr ThePEG::Interfaced::generator (  )  const [inline]

void ThePEG::Interfaced::persistentOutput ( PersistentOStream os  )  const

Function used to write out object persistently.

Parameters:
os the persistent output stream written to.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in ThePEG::FactoryBase, ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::LWHFactory, ThePEG::RivetAnalysis, ThePEG::XSecCheck, ThePEG::Cuts, ThePEG::KTClus, ThePEG::KTRapidityCut, ThePEG::SimpleDISCut, ThePEG::SimpleKTCut, ThePEG::V2LeptonsCut, ThePEG::ACDCSampler, ThePEG::AnalysisHandler, ThePEG::ClusterCollapser, ThePEG::DecayHandler, ThePEG::EventHandler, ThePEG::FlavourGenerator, ThePEG::GaussianPtGenerator, ThePEG::LuminosityFunction, ThePEG::SamplerBase, ThePEG::SimpleFlavour, ThePEG::SimpleZGenerator, ThePEG::StandardEventHandler, ThePEG::SubProcessHandler, ThePEG::Helicity::VertexBase, ThePEG::LesHouchesEventHandler, ThePEG::LesHouchesFileReader, ThePEG::LesHouchesReader, ThePEG::MadGraphOneCut, ThePEG::MadGraphReader, ThePEG::MadGraphTwoCut, ThePEG::ME2to2Base, ThePEG::ME2to2QCD, ThePEG::MEBase, ThePEG::MECuts, ThePEG::MEee2gZ2qq, ThePEG::MENCDIS, ThePEG::ReweightBase, ThePEG::ReweightConstant, ThePEG::ReweightMinPT, ThePEG::BeamParticleData, ThePEG::LeptonLeptonRemnant, ThePEG::LHAPDF, ThePEG::PartonExtractor, ThePEG::PDFBase, ThePEG::RemnantHandler, ThePEG::SoftRemnantHandler, ThePEG::WeizsackerWilliamsPDF, ThePEG::ColourPairDecayer, ThePEG::ConstituentParticleData, ThePEG::DalitzDecayer, ThePEG::Decayer, ThePEG::DecayMode, ThePEG::MatcherBase, ThePEG::OmegaPhi3PiDecayer, ThePEG::Onium3GDecayer, ThePEG::ParticleData, ThePEG::QuarksToHadronsDecayer, ThePEG::RemnantData, ThePEG::RemnantDecayer, ThePEG::SimpleBaryonRemnantDecayer, ThePEG::Tau2HadronsDecayer, ThePEG::V2PPDecayer, ThePEG::WeakToHadronsDecayer, ThePEG::EventGenerator, ThePEG::MultiEventGenerator, ThePEG::RandomGenerator, ThePEG::StandardRandom, ThePEG::Strategy, ThePEG::AlphaSBase, ThePEG::O1AlphaS, ThePEG::RunningCoupling, ThePEG::StandardCKM, and ThePEG::StandardModelBase.

void ThePEG::Interfaced::persistentInput ( PersistentIStream is,
int  version 
)

Function used to read in object persistently.

Parameters:
is the persistent input stream read from.
version the version number of the object when written.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in ThePEG::FactoryBase, ThePEG::GraphvizPlot, ThePEG::HepMCFile, ThePEG::LWHFactory, ThePEG::RivetAnalysis, ThePEG::XSecCheck, ThePEG::Cuts, ThePEG::KTClus, ThePEG::KTRapidityCut, ThePEG::SimpleDISCut, ThePEG::SimpleKTCut, ThePEG::V2LeptonsCut, ThePEG::ACDCSampler, ThePEG::AnalysisHandler, ThePEG::ClusterCollapser, ThePEG::DecayHandler, ThePEG::EventHandler, ThePEG::FlavourGenerator, ThePEG::GaussianPtGenerator, ThePEG::LuminosityFunction, ThePEG::SamplerBase, ThePEG::SimpleFlavour, ThePEG::SimpleZGenerator, ThePEG::StandardEventHandler, ThePEG::SubProcessHandler, ThePEG::Helicity::VertexBase, ThePEG::LesHouchesEventHandler, ThePEG::LesHouchesFileReader, ThePEG::LesHouchesReader, ThePEG::MadGraphOneCut, ThePEG::MadGraphReader, ThePEG::MadGraphTwoCut, ThePEG::ME2to2Base, ThePEG::ME2to2QCD, ThePEG::MEBase, ThePEG::MECuts, ThePEG::MEee2gZ2qq, ThePEG::MENCDIS, ThePEG::ReweightBase, ThePEG::ReweightConstant, ThePEG::ReweightMinPT, ThePEG::BeamParticleData, ThePEG::LeptonLeptonRemnant, ThePEG::LHAPDF, ThePEG::PartonExtractor, ThePEG::PDFBase, ThePEG::RemnantHandler, ThePEG::SoftRemnantHandler, ThePEG::WeizsackerWilliamsPDF, ThePEG::ColourPairDecayer, ThePEG::ConstituentParticleData, ThePEG::DalitzDecayer, ThePEG::Decayer, ThePEG::DecayMode, ThePEG::MatcherBase, ThePEG::OmegaPhi3PiDecayer, ThePEG::Onium3GDecayer, ThePEG::ParticleData, ThePEG::QuarksToHadronsDecayer, ThePEG::RemnantData, ThePEG::RemnantDecayer, ThePEG::SimpleBaryonRemnantDecayer, ThePEG::Tau2HadronsDecayer, ThePEG::V2PPDecayer, ThePEG::WeakToHadronsDecayer, ThePEG::EventGenerator, ThePEG::MultiEventGenerator, ThePEG::RandomGenerator, ThePEG::StandardRandom, ThePEG::Strategy, ThePEG::AlphaSBase, ThePEG::O1AlphaS, ThePEG::RunningCoupling, ThePEG::StandardCKM, and ThePEG::StandardModelBase.

void ThePEG::Interfaced::reporeg ( IBPtr  object,
string  name 
) const [protected]

Register the given object in the Repository with the given name in a subdirectory with the same name as this object.

If an object with that name already exists it will be removed unless there are other objects referring to it, in which case it will be renamed.

Referenced by setDefaultReference().


Friends And Related Function Documentation

friend class Repository [friend]

Repository is a friend.

Reimplemented in ThePEG::MatcherBase, ThePEG::ParticleData, and ThePEG::EventGenerator.

Definition at line 40 of file Interfaced.h.

friend class EventGenerator [friend]

EventGenerator is a friend.

Reimplemented from ThePEG::InterfacedBase.

Reimplemented in ThePEG::DecayMode, and ThePEG::ParticleData.

Definition at line 43 of file Interfaced.h.


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

Generated on Thu Apr 29 12:43:07 2010 for ThePEG by  doxygen 1.5.5