MarlinMT  0.1.0
marlinmt::VectorParameter< T > Class Template Reference

VectorParameter<T> class. More...

#include <Parameter.h>

Inherits marlinmt::ParameterBase< std::vector< T > >.

Public Types

using Base = ParameterBase< std::vector< T > >
 
- Public Types inherited from marlinmt::ParameterBase< std::vector< T > >
using ValueType = std::vector< T >
 

Public Member Functions

 VectorParameter ()=delete
 Deleted constructor. More...
 
 VectorParameter (const VectorParameter< T > &)=default
 Default copy constructor. More...
 
VectorParameter< T > & operator= (const VectorParameter< T > &)=default
 Default assignement operator. More...
 
 ~VectorParameter ()=default
 Default destructor. More...
 
 VectorParameter (const std::string &na, const std::string &desc)
 Constructor. More...
 
 VectorParameter (const std::string &na, const std::string &desc, const std::vector< T > &defVal)
 Constructor. More...
 
 VectorParameter (Configurable &conf, const std::string &na, const std::string &desc)
 Constructor. More...
 
 VectorParameter (Configurable &conf, const std::string &na, const std::string &desc, const std::vector< T > &defVal)
 Constructor. More...
 
auto at (typename std::vector< T >::size_type idx) const
 
auto operator[] (typename std::vector< T >::size_type idx) const
 
auto front () const
 
auto back () const
 
auto data () const
 
auto begin () const
 
auto end () const
 
auto cbegin () const
 
auto cend () const
 
auto rbegin () const
 
auto rend () const
 
auto crbegin () const
 
auto crend () const
 
auto empty () const
 
auto size () const
 
auto max_size () const
 
- Public Member Functions inherited from marlinmt::ParameterBase< std::vector< T > >
virtual ~ParameterBase ()=default
 Default destructor. More...
 
 ParameterBase (EParameterType paramType, const std::string &na, const std::string &desc)
 Constructor. More...
 
 ParameterBase (EParameterType paramType, const std::string &na, const std::string &desc, const std::vector< T > &defVal)
 Constructor. More...
 
 ParameterBase (Configurable &conf, EParameterType paramType, const std::string &na, const std::string &desc)
 Constructor. More...
 
 ParameterBase (Configurable &conf, EParameterType paramType, const std::string &na, const std::string &desc, const std::vector< T > &defVal)
 Constructor. More...
 
EParameterType type () const
 Get the parameter type. More...
 
const std::string & name () const
 Get the property name. More...
 
const std::string & description () const
 Get the parameter description. More...
 
bool isSet () const
 Whether the parameter has been set. More...
 
bool hasDefault () const
 Whether the parameter has a default value. More...
 
std::string str () const
 Get the parameter value as string. More...
 
std::string defaultStr () const
 Get the parameter default value as string. More...
 
std::string typeStr () const
 Get the parameter type as string. More...
 
const std::type_index & typeIndex () const
 Get a type index object of the underlying type. More...
 
 operator std::vector< T > () const
 Implicit conversion operator to get the parameter value. More...
 
std::vector< T > get () const
 Get the parameter value. More...
 
std::vector< T > get (const std::vector< T > &fallback) const
 Get the parameter value. More...
 
void set (const std::vector< T > &value)
 Set the parameter value. More...
 
void reset ()
 Reset the parameter value (only) More...
 
void setValidator (ValidatorFunctionT< std::vector< T > > validator)
 Set the validator function. More...
 

Additional Inherited Members

- Protected Attributes inherited from marlinmt::ParameterBase< std::vector< T > >
std::shared_ptr< std::vector< T > > _value
 The parameter value address. More...
 
std::shared_ptr< ParameterImpl_impl
 A shared pointer on the parameter implementation. More...
 

Detailed Description

template<typename T>
class marlinmt::VectorParameter< T >

VectorParameter<T> class.

High level interface to register vector parameters (std::vector<int>, std::vector<float>, ...). Defines also alias methods to std::vector<T> for easy use

Definition at line 677 of file Parameter.h.

Member Typedef Documentation

◆ Base

template<typename T>
using marlinmt::VectorParameter< T >::Base = ParameterBase<std::vector<T> >

Definition at line 679 of file Parameter.h.

Constructor & Destructor Documentation

◆ VectorParameter() [1/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( )
delete

Deleted constructor.

◆ VectorParameter() [2/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( const VectorParameter< T > &  )
default

Default copy constructor.

◆ ~VectorParameter()

template<typename T>
marlinmt::VectorParameter< T >::~VectorParameter ( )
default

Default destructor.

◆ VectorParameter() [3/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( const std::string &  na,
const std::string &  desc 
)
inline

Constructor.

Parameters
confthe configurable object owning the parameter
nathe parameter name
descthe parameter description

Definition at line 697 of file Parameter.h.

◆ VectorParameter() [4/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( const std::string &  na,
const std::string &  desc,
const std::vector< T > &  defVal 
)
inline

Constructor.

Parameters
confthe configurable object owning the parameter
nathe parameter name
descthe parameter description
defValthe parameter default value

Definition at line 710 of file Parameter.h.

◆ VectorParameter() [5/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( Configurable conf,
const std::string &  na,
const std::string &  desc 
)
inline

Constructor.

Parameters
confthe configurable object owning the parameter
nathe parameter name
descthe parameter description

Definition at line 722 of file Parameter.h.

◆ VectorParameter() [6/6]

template<typename T>
marlinmt::VectorParameter< T >::VectorParameter ( Configurable conf,
const std::string &  na,
const std::string &  desc,
const std::vector< T > &  defVal 
)
inline

Constructor.

Parameters
confthe configurable object owning the parameter
nathe parameter name
descthe parameter description
defValthe parameter default value

Definition at line 735 of file Parameter.h.

Member Function Documentation

◆ at()

template<typename T>
auto marlinmt::VectorParameter< T >::at ( typename std::vector< T >::size_type  idx) const
inline

Definition at line 741 of file Parameter.h.

Referenced by marlinmt::EventSelectorProcessor::init().

◆ back()

template<typename T>
auto marlinmt::VectorParameter< T >::back ( ) const
inline

Definition at line 744 of file Parameter.h.

◆ begin()

template<typename T>
auto marlinmt::VectorParameter< T >::begin ( ) const
inline

Definition at line 746 of file Parameter.h.

◆ cbegin()

template<typename T>
auto marlinmt::VectorParameter< T >::cbegin ( ) const
inline

Definition at line 748 of file Parameter.h.

◆ cend()

template<typename T>
auto marlinmt::VectorParameter< T >::cend ( ) const
inline

Definition at line 749 of file Parameter.h.

◆ crbegin()

template<typename T>
auto marlinmt::VectorParameter< T >::crbegin ( ) const
inline

Definition at line 752 of file Parameter.h.

◆ crend()

template<typename T>
auto marlinmt::VectorParameter< T >::crend ( ) const
inline

Definition at line 753 of file Parameter.h.

◆ data()

template<typename T>
auto marlinmt::VectorParameter< T >::data ( ) const
inline

Definition at line 745 of file Parameter.h.

◆ empty()

template<typename T>
auto marlinmt::VectorParameter< T >::empty ( ) const
inline

Definition at line 754 of file Parameter.h.

Referenced by marlinmt::LCIOFileSource::initialize().

◆ end()

template<typename T>
auto marlinmt::VectorParameter< T >::end ( ) const
inline

Definition at line 747 of file Parameter.h.

◆ front()

template<typename T>
auto marlinmt::VectorParameter< T >::front ( ) const
inline

Definition at line 743 of file Parameter.h.

◆ max_size()

template<typename T>
auto marlinmt::VectorParameter< T >::max_size ( ) const
inline

Definition at line 756 of file Parameter.h.

◆ operator=()

template<typename T>
VectorParameter<T>& marlinmt::VectorParameter< T >::operator= ( const VectorParameter< T > &  )
default

Default assignement operator.

◆ operator[]()

template<typename T>
auto marlinmt::VectorParameter< T >::operator[] ( typename std::vector< T >::size_type  idx) const
inline

Definition at line 742 of file Parameter.h.

◆ rbegin()

template<typename T>
auto marlinmt::VectorParameter< T >::rbegin ( ) const
inline

Definition at line 750 of file Parameter.h.

◆ rend()

template<typename T>
auto marlinmt::VectorParameter< T >::rend ( ) const
inline

Definition at line 751 of file Parameter.h.

◆ size()

template<typename T>
auto marlinmt::VectorParameter< T >::size ( ) const
inline

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