ATLAS Offline Software
Loading...
Searching...
No Matches
AuxDataOption.h
Go to the documentation of this file.
1// This file's extension implies that it's C, but it's really -*- C++ -*-.
2
3/*
4 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
5*/
6
7// $Id$
14
15
16#ifndef ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
17#define ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
18
19
20#include <string>
21
22
23namespace SG {
24
25
37{
38public:
44 AuxDataOption (const std::string& name, int val);
45
46
52 AuxDataOption (const std::string& name, float val);
53
54
60 AuxDataOption (const std::string& name, double val);
61
62
66 const std::string& name() const;
67
68
72 int intVal() const;
73
74
78 float floatVal() const;
79
80
81private:
83 std::string m_name;
84
86 bool m_isInt;
87
89 union {
90 float f;
91 int i;
93};
94
95
96} // namespace SG
97
98
100
101
102#endif // not ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
AuxDataOption(const std::string &name, float val)
Constructor, with a float value.
const std::string & name() const
The name of the option.
AuxDataOption(const std::string &name, int val)
Constructor, with an integer value.
AuxDataOption(const std::string &name, double val)
Constructor, with a double value.
float floatVal() const
Return the option value as a float.
std::string m_name
The option name.
int intVal() const
Return the option value as an integer.
union SG::AuxDataOption::@012046073170141375101144331163376072171307065176 m_val
The stored value.
bool m_isInt
Are we holding an int or a float?
Forward declaration.