Jpp  19.1.0
the software that should make you happy
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
JOSCPROB::JMassSquaredDifference< T > Struct Template Referencefinal

Implementation of mass-squared difference. More...

#include <JMassSquaredDifference.hh>

Inheritance diagram for JOSCPROB::JMassSquaredDifference< T >:
JOSCPROB::JOscParameter< T > JLANG::JParameter< T > JLANG::JComparable< JParameter< T > >

Public Types

typedef JMassSquaredDifference< T > JMassSquaredDifference_t
 
typedef JOscParameter< T > JOscParameter_t
 
typedef JOscParameter_t::JParameter_t JParameter_t
 
typedef JOscParameter_t::argument_type argument_type
 
typedef JOscParameter_t::value_type value_type
 

Public Member Functions

 JMassSquaredDifference ()
 Default constructor. More...
 
 JMassSquaredDifference (argument_type value)
 Constructor. More...
 
JMassSquaredDifference_toperator= (const value_type &value)
 Assignment operator. More...
 
bool is_valid () const override final
 Check validity of oscillation parameter. More...
 
void setValue (const value_type &value)
 Set parameter. More...
 
const value_type getValue () const
 Get value of parameter. More...
 
 operator const value_type () const
 Type conversion operator. More...
 
const bool isDefined () const
 Get status of parameter. More...
 
bool less (const JParameter< T > &parameter) const
 Less than method. More...
 

Static Public Member Functions

static JMassSquaredDifference_t make_parameter (argument_type value)
 Auxiliary function to create an mass-squared difference parameter grid. More...
 

Protected Attributes

__value
 
bool is_defined
 

Detailed Description

template<class T>
struct JOSCPROB::JMassSquaredDifference< T >

Implementation of mass-squared difference.

Definition at line 27 of file JMassSquaredDifference.hh.

Member Typedef Documentation

◆ JMassSquaredDifference_t

Definition at line 30 of file JMassSquaredDifference.hh.

◆ JOscParameter_t

template<class T >
typedef JOscParameter<T> JOSCPROB::JMassSquaredDifference< T >::JOscParameter_t

Definition at line 31 of file JMassSquaredDifference.hh.

◆ JParameter_t

Definition at line 33 of file JMassSquaredDifference.hh.

◆ argument_type

Definition at line 34 of file JMassSquaredDifference.hh.

◆ value_type

Definition at line 35 of file JMassSquaredDifference.hh.

Constructor & Destructor Documentation

◆ JMassSquaredDifference() [1/2]

template<class T >
JOSCPROB::JMassSquaredDifference< T >::JMassSquaredDifference ( )
inline

Default constructor.

Definition at line 41 of file JMassSquaredDifference.hh.

41  :
43  {}

◆ JMassSquaredDifference() [2/2]

template<class T >
JOSCPROB::JMassSquaredDifference< T >::JMassSquaredDifference ( argument_type  value)
inlineexplicit

Constructor.

Parameters
valuemass-squared difference value [eV2]

Definition at line 51 of file JMassSquaredDifference.hh.

51  :
52  JOscParameter_t(value)
53  {
54  using namespace JPP;
55 
56  if (!is_valid()) {
57  THROW(JValueOutOfRange, "JMassSquaredDifference::JMassSquaredDifference(): Invalid mass-squared difference " << value);
58  }
59  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:712
Exception for accessing a value in a collection that is outside of its range.
Definition: JException.hh:180
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
bool is_valid() const override final
Check validity of oscillation parameter.

Member Function Documentation

◆ operator=()

template<class T >
JMassSquaredDifference_t& JOSCPROB::JMassSquaredDifference< T >::operator= ( const value_type value)
inline

Assignment operator.

Parameters
valuemass-squared difference value [eV2]
Returns
mass-squared difference

Definition at line 68 of file JMassSquaredDifference.hh.

69  {
70  this->setValue(value);
71 
72  return *this;
73  }
void setValue(const value_type &value)
Set parameter.

◆ is_valid()

template<class T >
bool JOSCPROB::JMassSquaredDifference< T >::is_valid ( ) const
inlinefinaloverridevirtual

Check validity of oscillation parameter.

Returns
true if valid; else false

Implements JOSCPROB::JOscParameter< T >.

Definition at line 81 of file JMassSquaredDifference.hh.

82  {
83  return true;
84  }

◆ make_parameter()

template<class T >
static JMassSquaredDifference_t JOSCPROB::JMassSquaredDifference< T >::make_parameter ( argument_type  value)
inlinestatic

Auxiliary function to create an mass-squared difference parameter grid.

Parameters
valuemass-squared difference value [eV2]
Returns
mass-squared difference parameter

Definition at line 93 of file JMassSquaredDifference.hh.

94  {
95  return JMassSquaredDifference_t(value);
96  }
JMassSquaredDifference< T > JMassSquaredDifference_t

◆ setValue()

template<class T >
void JOSCPROB::JOscParameter< T >::setValue ( const value_type value)
inlineinherited

Set parameter.

Parameters
valueoscillation parameter value

Definition at line 74 of file JOscParameter.hh.

75  {
76  using namespace JPP;
77 
79 
80  if (!this->is_valid()) {
81  THROW(JValueOutOfRange, "JOscParameter<T>::setValue(): Given oscillation parameter is invalid " << value);
82  }
83  }
void setValue(const value_type &value)
Set value.
Definition: JParameter.hh:93
virtual bool is_valid() const =0
Check validity of oscillation parameter.

◆ getValue()

template<class T >
const value_type JLANG::JParameter< T >::getValue ( ) const
inlineinherited

Get value of parameter.

Returns
value

Definition at line 82 of file JParameter.hh.

83  {
84  return __value;
85  }

◆ operator const value_type()

template<class T >
JLANG::JParameter< T >::operator const value_type ( ) const
inlineinherited

Type conversion operator.

Returns
value

Definition at line 105 of file JParameter.hh.

106  {
107  return getValue();
108  }
const value_type getValue() const
Get value of parameter.
Definition: JParameter.hh:82

◆ isDefined()

template<class T >
const bool JLANG::JParameter< T >::isDefined ( ) const
inlineinherited

Get status of parameter.

Returns
true if value has been defined (by read or assignment); else false

Definition at line 116 of file JParameter.hh.

117  {
118  return is_defined;
119  }

◆ less()

template<class T >
bool JLANG::JParameter< T >::less ( const JParameter< T > &  parameter) const
inlineinherited

Less than method.

This method evaluates to true if both parameter values are defined and this value is less than the value of the given parameter object.

Parameters
parameterparameter
Returns
true if both defined and first value less than second value; else false

Definition at line 131 of file JParameter.hh.

132  {
133  return this->isDefined() && parameter.isDefined() && this->getValue() < parameter.getValue();
134  }
const bool isDefined() const
Get status of parameter.
Definition: JParameter.hh:116

Member Data Documentation

◆ __value

template<class T >
T JLANG::JParameter< T >::__value
protectedinherited

Definition at line 172 of file JParameter.hh.

◆ is_defined

template<class T >
bool JLANG::JParameter< T >::is_defined
protectedinherited

Definition at line 173 of file JParameter.hh.


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