HOPS
HOPS class reference
Public Member Functions | Protected Member Functions | List of all members
hops::MHO_ChannelLabeler< XArrayType > Class Template Reference

Class MHO_ChannelLabeler. More...

#include <MHO_ChannelLabeler.hh>

Inheritance diagram for hops::MHO_ChannelLabeler< XArrayType >:
[legend]

Public Member Functions

 MHO_ChannelLabeler ()
 
virtual ~MHO_ChannelLabeler ()
 
void SetChannelLabelToFrequencyMap (const std::map< std::string, double > &map)
 Setter for channel label to frequency map so if there is a user provided labeling scheme, use that (i.e. chan_ids) More...
 
void SetTolerance (double tol)
 Setter for tolerance - allows channel freq association to use a (freq) difference tolerance. More...
 
- Public Member Functions inherited from hops::MHO_UnaryOperator< XArrayType >
 MHO_UnaryOperator ()
 
virtual ~MHO_UnaryOperator ()
 
virtual bool Execute () override
 Executes operation using provided arguments and return type. More...
 
virtual bool Execute () override=0
 Function Execute. More...
 
virtual bool Initialize () override
 Initializes the system using in-place or out-of-place arguments. More...
 
virtual bool Initialize () override=0
 Function Initialize. More...
 
 MHO_Operator ()
 
virtual void SetArgs (const XArrayType *in, XArrayType *out)
 Setter for args. More...
 
virtual void SetArgs (XArrayType *in)
 Setter for args. More...
 
- Public Member Functions inherited from hops::MHO_Operator
 MHO_Operator ()
 
virtual ~MHO_Operator ()
 
std::string GetName () const
 Getter for operator name. More...
 
virtual double Priority () const
 Get the the priority field value. More...
 
void SetName (std::string name)
 Setter for operator name. More...
 
virtual void SetPriority (const double &priority)
 Setter for operator priority (determines order of execution within a operator category) More...
 
- Public Member Functions inherited from hops::MHO_ChannelIndexLabeler
 MHO_ChannelIndexLabeler ()
 
virtual ~MHO_ChannelIndexLabeler ()
 
uint64_t DecodeLabelToValue (const std::string &label) const
 Decodes a channel label to its corresponding value. More...
 
std::string EncodeValueToLabel (const uint64_t &value) const
 Encodes a uint64_t value into a label string using default and extended encoding schemes. More...
 
void SetDefaultChannelChars (const std::string &ch_set)
 Setter for channel chars - provides the option to use different character sets. More...
 
void SetExtendedChannelChars (const std::string &ex_set)
 Setter for extended channel chars. More...
 

Protected Member Functions

virtual bool ExecuteInPlace (XArrayType *in) override
 Function ExecuteInPlace - attaches channel labels based on sky frequency or user specified map. More...
 
virtual bool ExecuteOutOfPlace (const XArrayType *in, XArrayType *out) override
 Copies input array to output and executes in-place operation on output. More...
 
virtual bool InitializeInPlace (XArrayType *in) override
 Initializes XArrayType in-place and returns success. More...
 
virtual bool InitializeOutOfPlace (const XArrayType *, XArrayType *) override
 Initializes output array out-of-place from input array. More...
 

Additional Inherited Members

- Protected Attributes inherited from hops::MHO_UnaryOperator< XArrayType >
bool fInPlace
 
std::tuple< XArrayType * > fInPlaceArgs
 
std::tuple< const XArrayType *, XArrayType * > fOutOfPlaceArgs
 
- Protected Attributes inherited from hops::MHO_ChannelIndexLabeler
std::string fDefaultChannelChars
 
std::string fExtendedChannelChars
 

Detailed Description

template<typename XArrayType>
class hops::MHO_ChannelLabeler< XArrayType >

Class MHO_ChannelLabeler.

Applies 'fourfit' labels to each channel (e.g. a, b,...), if no user-defined map is supplied then the default mapping is in order of frequency low -> high, starting with 'a'.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Thu Jun 1 13:20:19 2023 -0400

Constructor & Destructor Documentation

◆ MHO_ChannelLabeler()

template<typename XArrayType >
hops::MHO_ChannelLabeler< XArrayType >::MHO_ChannelLabeler ( )
inline

◆ ~MHO_ChannelLabeler()

template<typename XArrayType >
virtual hops::MHO_ChannelLabeler< XArrayType >::~MHO_ChannelLabeler ( )
inlinevirtual

Member Function Documentation

◆ ExecuteInPlace()

template<typename XArrayType >
virtual bool hops::MHO_ChannelLabeler< XArrayType >::ExecuteInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Function ExecuteInPlace - attaches channel labels based on sky frequency or user specified map.

Parameters
in(XArrayType*)
Returns
Return value (bool)
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ ExecuteOutOfPlace()

template<typename XArrayType >
virtual bool hops::MHO_ChannelLabeler< XArrayType >::ExecuteOutOfPlace ( const XArrayType *  in,
XArrayType *  out 
)
inlineoverrideprotectedvirtual

Copies input array to output and executes in-place operation on output.

Parameters
inConst reference to input XArrayType
outReference to output XArrayType
Returns
Result of ExecuteInPlace operation on out
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeInPlace()

template<typename XArrayType >
virtual bool hops::MHO_ChannelLabeler< XArrayType >::InitializeInPlace ( XArrayType *  in)
inlineoverrideprotectedvirtual

Initializes XArrayType in-place and returns success.

Parameters
inPointer to XArrayType object to initialize.
Returns
True if initialization was successful, false otherwise.
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ InitializeOutOfPlace()

template<typename XArrayType >
virtual bool hops::MHO_ChannelLabeler< XArrayType >::InitializeOutOfPlace ( const XArrayType *  ,
XArrayType *   
)
inlineoverrideprotectedvirtual

Initializes output array out-of-place from input array.

Parameters
!inConst input XArrayType
!outOutput XArrayType initialized out-of-place
Returns
True if initialization was successful, false otherwise
Note
This is a virtual function.

Implements hops::MHO_UnaryOperator< XArrayType >.

◆ SetChannelLabelToFrequencyMap()

template<typename XArrayType >
void hops::MHO_ChannelLabeler< XArrayType >::SetChannelLabelToFrequencyMap ( const std::map< std::string, double > &  map)
inline

Setter for channel label to frequency map so if there is a user provided labeling scheme, use that (i.e. chan_ids)

Parameters
mapInput map of channel labels to frequencies

◆ SetTolerance()

template<typename XArrayType >
void hops::MHO_ChannelLabeler< XArrayType >::SetTolerance ( double  tol)
inline

Setter for tolerance - allows channel freq association to use a (freq) difference tolerance.

Parameters
tolNew tolerance value for frequency mapping

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