ATLAS Offline Software
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-2017 CERN for the benefit of the ATLAS collaboration
5 */
6 
7 // $Id$
16 #ifndef ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
17 #define ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
18 
19 
20 #include <string>
21 
22 
23 namespace SG {
24 
25 
37 {
38 public:
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  std::string name() const;
67 
68 
72  int intVal() const;
73 
74 
78  float floatVal() const;
79 
80 
81 private:
83  std::string m_name;
84 
86  bool m_isInt;
87 
89  union {
90  float f;
91  int i;
92  } m_val;
93 };
94 
95 
96 } // namespace SG
97 
98 
100 
101 
102 #endif // not ATHCONTAINERSINTERFACES_AUXDATAOPTION_H
SG::AuxDataOption::intVal
int intVal() const
Return the option value as an integer.
SG::AuxDataOption::i
int i
Definition: AuxDataOption.h:91
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SG::AuxDataOption::AuxDataOption
AuxDataOption(const std::string &name, float val)
Constructor, with a float value.
SG::AuxDataOption::m_val
union SG::AuxDataOption::@27 m_val
The stored value.
SG::AuxDataOption::AuxDataOption
AuxDataOption(const std::string &name, double val)
Constructor, with a double value.
SG::AuxDataOption::floatVal
float floatVal() const
Return the option value as a float.
AuxDataOption.icc
SG::AuxDataOption
Hold information about an option setting request.
Definition: AuxDataOption.h:37
SG::AuxDataOption::f
float f
Definition: AuxDataOption.h:90
SG::AuxDataOption::name
std::string name() const
The name of the option.
Pythia8_RapidityOrderMPI.val
val
Definition: Pythia8_RapidityOrderMPI.py:14
SG::AuxDataOption::AuxDataOption
AuxDataOption(const std::string &name, int val)
Constructor, with an integer value.
SG::AuxDataOption::m_isInt
bool m_isInt
Are we holding an int or a float?
Definition: AuxDataOption.h:86
SG::AuxDataOption::m_name
std::string m_name
The option name.
Definition: AuxDataOption.h:83