Class Module
Defined in File Module.h
Inheritance Relationships
Base Type
public Referenced(Class Referenced)
Derived Types
public AbstractAccelerationModule(Class AbstractAccelerationModule)public AbstractCondition(Class AbstractCondition)public AdiabaticCooling(Class AdiabaticCooling)public CandidateSplitting(Class CandidateSplitting)public ConstantMomentumDiffusion(Class ConstantMomentumDiffusion)public DiffusionSDE(Class DiffusionSDE)public EMDoublePairProduction(Class EMDoublePairProduction)public EMInverseComptonScattering(Class EMInverseComptonScattering)public EMPairProduction(Class EMPairProduction)public EMTripletPairProduction(Class EMTripletPairProduction)public ElasticScattering(Class ElasticScattering)public ElectronPairProduction(Class ElectronPairProduction)public EmissionMapFiller(Class EmissionMapFiller)public FutureRedshift(Class FutureRedshift)public ModuleList(Class ModuleList)public ModuleListRunner(Class ModuleListRunner)public NuclearDecay(Class NuclearDecay)public Observer(Class Observer)public Output(Class Output)public ParticleCollector(Class ParticleCollector)public ParticleSplitting(Class ParticleSplitting)public PerformanceModule(Class PerformanceModule)public PeriodicBox(Class PeriodicBox)public PhotoDisintegration(Class PhotoDisintegration)public PhotoPionProduction(Class PhotoPionProduction)public PhotonOutput1D(Class PhotonOutput1D)public PropagationBP(Class PropagationBP)public PropagationCK(Class PropagationCK)public Redshift(Class Redshift)public ReflectiveBox(Class ReflectiveBox)public ReflectiveShell(Class ReflectiveShell)public RestrictToRegion(Class RestrictToRegion)public ShellOutput(Class ShellOutput)public ShellOutput1D(Class ShellOutput1D)public ShellPropertyOutput(Class ShellPropertyOutput)public SimplePropagation(Class SimplePropagation)public SynchrotronRadiation(Class SynchrotronRadiation)
Class Documentation
-
class Module : public Referenced
Abstract base class for modules.
This class is the abstract base for any module, that means if your module should be made usable over the ModuleList::add function it needs to be derived from Module
Subclassed by AbstractAccelerationModule, AbstractCondition, AdiabaticCooling, CandidateSplitting, ConstantMomentumDiffusion, DiffusionSDE, EMDoublePairProduction, EMInverseComptonScattering, EMPairProduction, EMTripletPairProduction, ElasticScattering, ElectronPairProduction, EmissionMapFiller, FutureRedshift, ModuleList, ModuleListRunner, NuclearDecay, Observer, Output, ParticleCollector, ParticleSplitting, PerformanceModule, PeriodicBox, PhotoDisintegration, PhotoPionProduction, PhotonOutput1D, PropagationBP, PropagationCK, Redshift, ReflectiveBox, ReflectiveShell, RestrictToRegion, ShellOutput, ShellOutput1D, ShellPropertyOutput, SimplePropagation, SynchrotronRadiation
Public Functions
-
Module()
Constructor Automatically sets the description to the name of the derived class
-
inline virtual ~Module() override
Destructor Virtual destructor that overrides Referenced::~Referenced, does nothing per default.
-
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 Attributes
-
mutable size_t _referenceCount
-
Module()