Class AbstractCondition
Defined in File Module.h
Inheritance Relationships
Base Type
public Module(Class Module)
Derived Types
public CubicBoundary(Class CubicBoundary)public CylindricalBoundary(Class CylindricalBoundary)public Deactivation(Class Deactivation)public DetectionLength(Class DetectionLength)public EllipsoidalBoundary(Class EllipsoidalBoundary)public MaximumTrajectoryLength(Class MaximumTrajectoryLength)public MinimumChargeNumber(Class MinimumChargeNumber)public MinimumEnergy(Class MinimumEnergy)public MinimumEnergyPerParticleId(Class MinimumEnergyPerParticleId)public MinimumRedshift(Class MinimumRedshift)public MinimumRigidity(Class MinimumRigidity)public ParticleFilter(Class ParticleFilter)public SphericalBoundary(Class SphericalBoundary)
Class Documentation
-
class AbstractCondition : public Module
Abstract Module providing common features for conditional modules.
This abstract base class is a expansion on the Module class which only proves basic features. Over this class it is possible to set modules that should be called on rejection of the particle or on acception.
Subclassed by CubicBoundary, CylindricalBoundary, Deactivation, DetectionLength, EllipsoidalBoundary, MaximumTrajectoryLength, MinimumChargeNumber, MinimumEnergy, MinimumEnergyPerParticleId, MinimumRedshift, MinimumRigidity, ParticleFilter, SphericalBoundary
Public Functions
-
AbstractCondition()
-
void onReject(Module *rejectAction)
Sets the module that should be invoked on rejection
- Parameters:
rejectAction – Module that should be called on rejection
-
void onAccept(Module *acceptAction)
Sets the module that should be invoked on acception
- Parameters:
rejectAction – Module that should be called on acception
-
void setRejectFlag(std::string key, std::string value)
sets Rejection flag Sets the key and value that should be set when the Candidate is rejected
- Parameters:
key – property key
value – property value
-
void setAcceptFlag(std::string key, std::string value)
sets the Acception flag Sets the key and value that should be set when the Candidate is accepted
- Parameters:
key – property key
value – property value
-
std::string getRejectFlag()
-
std::string getAcceptFlag()
-
virtual std::string getDescription() const
Returns description, can be overriden by derived class.
-
void setDescription(const std::string &description)
Sets description, can be used instead of getDescription in derived class
- Parameters:
description – Description string
-
virtual void process(Candidate *candidate) const = 0
Process function This is the main function to work with, it is called during every ModuleList::run step. Derived functions need to override this overload of process!
- Parameters:
candidate – Candidate raw pointer
-
inline void process(ref_ptr<Candidate> candidate) const
Process function Overload for process function to explicitly make a conversion from ref_ptr to a raw pointer
-
inline size_t addReference() const
-
inline size_t removeReference() const
-
inline int removeReferenceNoDelete() const
-
inline size_t getReferenceCount() const
Protected Functions
-
void reject(Candidate *candidate) const
Function to reject particle This function rejects the particle, what that means is determined by the rejectAction and makeRejectedInactive variable.
- Parameters:
candidate – Candidate raw pointer to reject
-
inline void reject(ref_ptr<Candidate> candidate) const
Overload for reject(Candidate *candidate) This function wraps reject(Candidate *candidate) so a reference pointer can be conversed explicitly
Protected Attributes
-
mutable size_t _referenceCount
-
AbstractCondition()