9 #ifndef ThePEG_Interfaced_H 10 #define ThePEG_Interfaced_H 13 #include "ThePEG/Config/ThePEG.h" 14 #include "InterfacedBase.h" 15 #include "ThePEG/PDT/PID.h" 153 template <
typename PtrT>
155 if ( ptr )
return true;
157 if ( !db )
return false;
159 if ( !ptr )
return false;
161 if ( !ptr->defaultInit() )
return false;
245 static string className() {
return "ThePEG::Interfaced"; }
PDPtr getParticleData(PID) const
Return a pointer to the ParticleData object corresponding to the given id number. ...
PID is a helper class implementing the type of PDG particle ids.
PersistentIStream is used to read persistent objects from a stream where they were previously written...
virtual BPtr create() const =0
Create an object of the described class.
Interfaced()
Protected default constructor.
ClassDescriptionBase is the base class for all class description classes.
PPtr getParticle(PID) const
Create a new Particle instance given a id number.
tEGPtr theGenerator
A pointer to the EventGenerator controlling the run.
static void Init()
Standard Init function.
static const ClassDescriptionBase * find(const type_info &ti)
Get the description of a class giving its type_info object.
ClassTraitsType is an empty, non-polymorphic, base class.
string name() const
Returns the name of this object, without the path.
PersistentOStream is used to write objects persistently to a stream from which they can be read in ag...
A concreate implementation of ClassDescriptionBase describing an abstract class with persistent data...
void persistentInput(PersistentIStream &is, int version)
Function used to read in object persistently.
virtual bool defaultInit()
Functions which are to be used during the actual event generation, after the setup is complete...
static AbstractClassDescription< Interfaced > initInterfaced
Standard Initialization object.
TransientRCPtr is a simple wrapper around a bare pointer which can be assigned to and from an RCPtr a...
void setGenerator(tEGPtr generator)
Protected function to reset the generator pointer, required for automatic decayer generation in Herwi...
Repository inherits from the BaseRepository class.
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 ...
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 wit...
T1 dynamic_ptr_cast(const T2 &t2)
Replacement for the standard dynamic_cast.
This is the main namespace within which all identifiers in ThePEG are declared.
Interfaced & operator=(const Interfaced &)
Private and non-existent assignment operator.
void setUsed() const
Used internally by 'useMe'.
virtual ~Interfaced()
Empty virtual destructor.
bool theUseFlag
Flag to tell whether this object has been used or not.
string doDefaultInit(string)
Command interface function which calls defaultInit().
InterfacedBase is the base class of all Interfaced objects to be handled by the BaseRepository class...
RCPtr is a reference counted (smart) pointer.
The Interfaced class is derived from the InterfacedBase class adding a couple of things particular to...
tEGPtr generator() const
Return a pointer to the EventGenerator controlling the run.
Interfaced(const Interfaced &i)
Protected copy-constructor.
The default concrete implementation of ClassTraitsBase.
bool used() const
Returns true if this object has actally been used.
void persistentOutput(PersistentOStream &os) const
Function used to write out object persistently.
BaseClassTraits describes the base classes of the templated class.
static void registerRepository(IBPtr)
Register an Interfaced object with the Repository.
Interfaced(const string &newName)
Protected constructor taking a name as argument.
void useMe() const
Should be called to indicate that this object has actually been used.
The EventGenerator class manages a whole event generator run.
The templated ClassTraitsBase class defines a set of default information about classes used by ThePEG...