CLAM::SpectrumAdder2 Class Reference

This calss performs the sum of two Spectrum processing data objects. More...

#include <SpectrumAdder2.hxx>

List of all members.

Public Member Functions

 SpectrumAdder2 ()
 SpectrumAdder2 (const SpecAdder2Config &c)
 ~SpectrumAdder2 ()
const ProcessingConfigGetConfig () const
 Configuration getter.
bool Do (void)
 Supervised mode execution method (using ports).
bool Do (Spectrum &in1, Spectrum &in2, Spectrum &out)
bool SetPrototypes (const Spectrum &in1, const Spectrum &in2, const Spectrum &out)
 Change the internal type state.
bool SetPrototypes ()
bool UnsetPrototypes ()
bool MayDisableExecution () const

Detailed Description

This calss performs the sum of two Spectrum processing data objects.

It Allows any possible attribute configuration in its inputs and in its output, but it performs faster when prototype configuration of the data is specified using SetPrototypes(...), in certain situations:

Possible optimisations (which require more states):

The BPFxBPF sum is being thought. If both BPFs have the same range and point possition, the way to go is obvious, but in other situations it is not so simple. Whe should probably merge both BPFs, into a new BPF.

Definition at line 73 of file SpectrumAdder2.hxx.

Constructor & Destructor Documentation

CLAM::SpectrumAdder2::SpectrumAdder2 (  ) 

Definition at line 30 of file SpectrumAdder2.cxx.

References CLAM::Processing::Configure().

CLAM::SpectrumAdder2::SpectrumAdder2 ( const SpecAdder2Config c  ) 

Definition at line 40 of file SpectrumAdder2.cxx.

References CLAM::Processing::Configure().

CLAM::SpectrumAdder2::~SpectrumAdder2 (  )  [inline]

Definition at line 132 of file SpectrumAdder2.hxx.

Member Function Documentation

bool CLAM::SpectrumAdder2::Do ( Spectrum in1,
Spectrum in2,
Spectrum out 

Definition at line 69 of file SpectrumAdder2.cxx.

References CLAM_ASSERT, CLAM_DEBUG_ASSERT, and CLAM::Processing::IsRunning().

bool CLAM::SpectrumAdder2::Do ( void   )  [virtual]

Supervised mode execution method (using ports).

A boolean telling whether it has been output

Implements CLAM::Processing.

Definition at line 117 of file SpectrumAdder2.cxx.

References CLAM::InPort< Token >::Consume(), CLAM::OutPort< Token >::GetData(), CLAM::InPort< Token >::GetData(), and CLAM::OutPort< Token >::Produce().

Referenced by CLAM::FrameAdder::Do().

const ProcessingConfig& CLAM::SpectrumAdder2::GetConfig (  )  const [inline, virtual]

Configuration getter.

Gets the configuration parameters used to create the object.

Const reference to the configuration object. The usual way to perform a configuration change in the processing object is to take a copy of this reference, to change it and to send it with the Configure method. If not overriden, it returns a NullProcessingConfig.

Reimplemented from CLAM::Processing.

Definition at line 134 of file SpectrumAdder2.hxx.

bool CLAM::SpectrumAdder2::MayDisableExecution (  )  const [inline]

Definition at line 154 of file SpectrumAdder2.hxx.

bool CLAM::SpectrumAdder2::SetPrototypes (  ) 

Definition at line 306 of file SpectrumAdder2.cxx.

References CLAM_ASSERT.

bool CLAM::SpectrumAdder2::SetPrototypes ( const Spectrum in1,
const Spectrum in2,
const Spectrum out 

Change the internal type state.

Apart from prototype configuration, the Size, Scale and SpectralRange attributes of each Spectrum are also checked.

Definition at line 128 of file SpectrumAdder2.cxx.

References CLAM::SpecTypeFlags::bComplex, CLAM::SpecTypeFlags::bMagPhase, CLAM::SpecTypeFlags::bMagPhaseBPF, CLAM::SpecTypeFlags::bPolar, CLAM_ASSERT, CLAM::EScale::eLinear, CLAM::EScale::eLog, CLAM::Spectrum::GetSize(), and CLAM::Spectrum::GetType().

bool CLAM::SpectrumAdder2::UnsetPrototypes (  ) 

Definition at line 312 of file SpectrumAdder2.cxx.

The documentation for this class was generated from the following files:
Generated by  doxygen 1.6.3