#include <Interfaced.h>
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(). | |
Interfaced & | operator= (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. |
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.
Definition at line 37 of file Interfaced.h.
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.
tEGPtr ThePEG::Interfaced::generator | ( | ) | const [inline] |
Return a pointer to the EventGenerator controlling the run.
During the setup phase this returns a null pointer.
Definition at line 98 of file Interfaced.h.
References theGenerator.
Referenced by ThePEG::Helicity::VertexBase::electroMagneticCoupling(), ThePEG::HandlerBaseT< ThePEG::UseRandom >::standardModel(), ThePEG::Helicity::VertexBase::strongCoupling(), ThePEG::RunningCoupling::value(), and ThePEG::Helicity::VertexBase::weakCoupling().
void ThePEG::Interfaced::persistentOutput | ( | PersistentOStream & | os | ) | const |
Function used to write out object persistently.
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.
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().
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.