Public Member Functions | Private Attributes | List of all members
lar_content::MvaTypes::InitializedDouble Class Reference

InitializedDouble class used to define mva features. More...

#include <LArMvaInterface.h>

Public Member Functions

 InitializedDouble ()
 Default constructor. More...
 
 InitializedDouble (const double number)
 Constructor. More...
 
 InitializedDouble (const InitializedDouble &rhs)
 Copy constructor. More...
 
InitializedDoubleoperator= (const double number)
 Assignment operator. More...
 
InitializedDoubleoperator= (const InitializedDouble rhs)
 Assignment operator. More...
 
double Get () const
 Get number held in class. More...
 
bool IsInitialized () const
 Check number has been initialized. More...
 

Private Attributes

double m_number
 Number held by class. More...
 
bool m_isInitialized
 Whether the number has been initialized. More...
 

Detailed Description

InitializedDouble class used to define mva features.

Definition at line 27 of file LArMvaInterface.h.

Constructor & Destructor Documentation

lar_content::MvaTypes::InitializedDouble::InitializedDouble ( )
inline

Default constructor.

Definition at line 130 of file LArMvaInterface.h.

130  : m_number(0.), m_isInitialized(false)
131 {
132 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.
lar_content::MvaTypes::InitializedDouble::InitializedDouble ( const double  number)
inline

Constructor.

Parameters
numberto hold in class

Definition at line 136 of file LArMvaInterface.h.

136  : m_number(number), m_isInitialized(true)
137 {
138 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.
lar_content::MvaTypes::InitializedDouble::InitializedDouble ( const InitializedDouble rhs)
inline

Copy constructor.

Parameters
rhsthe initialized double to copy

Definition at line 142 of file LArMvaInterface.h.

142  :
143  m_number(rhs.m_number),
144  m_isInitialized(rhs.m_isInitialized)
145 {
146 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.

Member Function Documentation

double lar_content::MvaTypes::InitializedDouble::Get ( void  ) const
inline

Get number held in class.

Returns
number held in class

Definition at line 173 of file LArMvaInterface.h.

174 {
175  if (!m_isInitialized)
176  throw pandora::StatusCodeException(pandora::STATUS_CODE_NOT_INITIALIZED);
177 
178  return m_number;
179 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.
bool lar_content::MvaTypes::InitializedDouble::IsInitialized ( ) const
inline

Check number has been initialized.

Returns
whether number has been initialized

Definition at line 183 of file LArMvaInterface.h.

184 {
185  return m_isInitialized;
186 }
bool m_isInitialized
Whether the number has been initialized.
MvaTypes::InitializedDouble & lar_content::MvaTypes::InitializedDouble::operator= ( const double  number)
inline

Assignment operator.

Parameters
numberthe double to assign

Definition at line 150 of file LArMvaInterface.h.

151 {
152  m_number = number;
153  m_isInitialized = true;
154 
155  return *this;
156 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.
MvaTypes::InitializedDouble & lar_content::MvaTypes::InitializedDouble::operator= ( const InitializedDouble  rhs)
inline

Assignment operator.

Parameters
rhsthe initialized double to assign

Definition at line 160 of file LArMvaInterface.h.

161 {
162  if (this != &rhs)
163  {
164  m_number = rhs.m_number;
165  m_isInitialized = rhs.m_isInitialized;
166  }
167 
168  return *this;
169 }
bool m_isInitialized
Whether the number has been initialized.
double m_number
Number held by class.

Member Data Documentation

bool lar_content::MvaTypes::InitializedDouble::m_isInitialized
private

Whether the number has been initialized.

Definition at line 79 of file LArMvaInterface.h.

double lar_content::MvaTypes::InitializedDouble::m_number
private

Number held by class.

Definition at line 78 of file LArMvaInterface.h.


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