thepeg is hosted by Hepforge, IPPP Durham
ThePEG 2.3.0
ThePEG::Hint Class Reference

Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed through the Event record. More...

#include <Hint.h>

Inheritance diagram for ThePEG::Hint:

Functions used by the persistent I/O system.

tPVector theTagged
 The vector of tagged particles.
 
Scale theScale
 The scale.
 
bool theStopFlag
 The stop hint.
 
static Hint theDefaultHint
 The default hint.
 
static ClassDescription< HintinitHint
 Describe a concrete class with persistent data.
 
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 void Init ()
 Standard Init function used to initialize the interface.
 
Hintoperator= (const Hint &h)=delete
 Assignment is private and non-existing.
 

Standard constructors and destructors.

 Hint ()
 Default constructor.
 
bool tagged () const
 Return true if there are tagged particles in the hint.
 
tPVector tagged (const Step &s) const
 Return a list of pointers to particles to be handled.
 
template<typename InputIterator >
void tag (InputIterator first, InputIterator last)
 Add a range of particles to the list of tagged particles.
 
void tag (tPPtr p)
 Add a particle to the list of tagged particles.
 
void stop (bool newStopFlag)
 Set the stop hint.
 
bool stop () const
 Get the stop hint.
 
void scale (const Scale &newScale)
 Set the scale.
 
const Scalescale () const
 Get the scale.
 
static tHintPtr Default ()
 Return a pointer to the default hint.
 

Additional Inherited Members

- Public Types inherited from ThePEG::Pointer::ReferenceCounted
typedef unsigned int CounterType
 The integer type used for counting.
 
- Public Member Functions inherited from ThePEG::Base
virtual ~Base ()
 The virtual destructor.
 
void debug () const
 Print out debugging information for this object on std::cerr.
 
virtual void debugme () const
 Print out debugging information for this object on std::cerr.
 
- Public Member Functions inherited from ThePEG::Pointer::ReferenceCounted
CounterType referenceCount () const
 Return the reference count.
 
- Static Public Member Functions inherited from ThePEG::Base
static void Init ()
 The standard Init function used to initialize the interfaces.
 
- Public Attributes inherited from ThePEG::Pointer::ReferenceCounted
const unsigned long uniqueId
 The unique ID.
 
- Protected Member Functions inherited from ThePEG::Pointer::ReferenceCounted
 ReferenceCounted ()
 Default constructor.
 
 ReferenceCounted (const ReferenceCounted &)
 Copy-constructor.
 
ReferenceCountedoperator= (const ReferenceCounted &)
 Assignment.
 

Detailed Description

Hint is a base class to be used to pass information between StepHandler s, which cannot be convayed through the Event record.

The base class contains a vector of of tagged particles. A StepHandler is always given a hint, and is only allowed to treat Particles from the current Step which are listed in the vector of tagged particles in the hint (if this vector is empty the StepHandler may treat all particles in the Step.

A Hint may have the stop flag set. In this case the StepHandler to which the hint is assigned is not called, and the event generation is stopped.

A Hint may be given a scale, but what a StepHandler does with this and other pieces of information possibly supplied by subclasses of Hint, is not defined.

There is a special Hint which is kept as the static member called Hint::theDefaultHint. Although any default constructed Hint object would work as a default hint, only pointers to this static object should be used where a default hint is needed.

See also
StepHandler
EventHandler
Particle
Event
Step

Definition at line 48 of file Hint.h.

Constructor & Destructor Documentation

◆ Hint()

ThePEG::Hint::Hint ( )
inline

Default constructor.

Definition at line 57 of file Hint.h.

Member Function Documentation

◆ Default()

static tHintPtr ThePEG::Hint::Default ( )
inlinestatic

Return a pointer to the default hint.

Definition at line 115 of file Hint.h.

References theDefaultHint.

◆ persistentInput()

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

Function used to read in object persistently.

Parameters
isthe persistent input stream read from.
versionthe version number of the object when written.

◆ persistentOutput()

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

Function used to write out object persistently.

Parameters
osthe persistent output stream written to.

◆ scale() [1/2]

const Scale & ThePEG::Hint::scale ( ) const
inline

Get the scale.

Definition at line 110 of file Hint.h.

References theScale.

◆ scale() [2/2]

void ThePEG::Hint::scale ( const Scale newScale)
inline

Set the scale.

Definition at line 106 of file Hint.h.

References theScale.

◆ stop() [1/2]

bool ThePEG::Hint::stop ( ) const
inline

Get the stop hint.

Definition at line 101 of file Hint.h.

References theStopFlag.

◆ stop() [2/2]

void ThePEG::Hint::stop ( bool  newStopFlag)
inline

Set the stop hint.

Definition at line 92 of file Hint.h.

References theStopFlag, and theTagged.

◆ tag() [1/2]

template<typename InputIterator >
void ThePEG::Hint::tag ( InputIterator  first,
InputIterator  last 
)
inline

Add a range of particles to the list of tagged particles.

Definition at line 79 of file Hint.h.

References theTagged.

◆ tag() [2/2]

void ThePEG::Hint::tag ( tPPtr  p)
inline

Add a particle to the list of tagged particles.

Definition at line 87 of file Hint.h.

References theTagged.

◆ tagged() [1/2]

bool ThePEG::Hint::tagged ( ) const
inline

Return true if there are tagged particles in the hint.

Definition at line 65 of file Hint.h.

References theTagged.

◆ tagged() [2/2]

tPVector ThePEG::Hint::tagged ( const Step s) const

Return a list of pointers to particles to be handled.

A handler is not allowed to touch other particles in the event record. If a particle which has been flagged by the hint is no longer present in the current Step, a null pointer is inserted in its place.

Member Data Documentation

◆ initHint

ClassDescription<Hint> ThePEG::Hint::initHint
staticprivate

Describe a concrete class with persistent data.

Definition at line 167 of file Hint.h.

◆ theDefaultHint

Hint ThePEG::Hint::theDefaultHint
staticprivate

The default hint.

Definition at line 160 of file Hint.h.

Referenced by Default().

◆ theScale

Scale ThePEG::Hint::theScale
private

The scale.

Definition at line 150 of file Hint.h.

Referenced by scale().

◆ theStopFlag

bool ThePEG::Hint::theStopFlag
private

The stop hint.

Definition at line 155 of file Hint.h.

Referenced by stop().

◆ theTagged

tPVector ThePEG::Hint::theTagged
private

The vector of tagged particles.

Definition at line 145 of file Hint.h.

Referenced by stop(), tag(), and tagged().


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