ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
SG::AuxDataOption Class Reference

Hold information about an option setting request. More...

#include <AuxDataOption.h>

Collaboration diagram for SG::AuxDataOption:

Public Member Functions

 AuxDataOption (const std::string &name, int val)
 Constructor, with an integer value. More...
 
 AuxDataOption (const std::string &name, float val)
 Constructor, with a float value. More...
 
 AuxDataOption (const std::string &name, double val)
 Constructor, with a double value. More...
 
const std::string & name () const
 The name of the option. More...
 
int intVal () const
 Return the option value as an integer. More...
 
float floatVal () const
 Return the option value as a float. More...
 

Private Attributes

std::string m_name
 The option name. More...
 
bool m_isInt
 Are we holding an int or a float? More...
 
union {
   float   f
 
   int   i
 
m_val
 The stored value. More...
 

Detailed Description

Hold information about an option setting request.

This is used to pass an option setting through the setOption interface, which is used to decouple the user interface from the auxiliary store representation classes.

This class holds a name and a value, which can be either an int or a float.

Definition at line 36 of file AuxDataOption.h.

Constructor & Destructor Documentation

◆ AuxDataOption() [1/3]

SG::AuxDataOption::AuxDataOption ( const std::string &  name,
int  val 
)

Constructor, with an integer value.

Parameters
nameThe option name.
valThe option value.

◆ AuxDataOption() [2/3]

SG::AuxDataOption::AuxDataOption ( const std::string &  name,
float  val 
)

Constructor, with a float value.

Parameters
nameThe option name.
valThe option value.

◆ AuxDataOption() [3/3]

SG::AuxDataOption::AuxDataOption ( const std::string &  name,
double  val 
)

Constructor, with a double value.

Parameters
nameThe option name.
valThe option value.

Member Function Documentation

◆ floatVal()

float SG::AuxDataOption::floatVal ( ) const

Return the option value as a float.

◆ intVal()

int SG::AuxDataOption::intVal ( ) const

Return the option value as an integer.

◆ name()

const std::string& SG::AuxDataOption::name ( ) const

The name of the option.

Member Data Documentation

◆ f

float SG::AuxDataOption::f

Definition at line 90 of file AuxDataOption.h.

◆ i

int SG::AuxDataOption::i

Definition at line 91 of file AuxDataOption.h.

◆ m_isInt

bool SG::AuxDataOption::m_isInt
private

Are we holding an int or a float?

Definition at line 86 of file AuxDataOption.h.

◆ m_name

std::string SG::AuxDataOption::m_name
private

The option name.

Definition at line 83 of file AuxDataOption.h.

◆ m_val

union { ... } SG::AuxDataOption::m_val

The stored value.


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