 |
Belle II Software
release-05-02-19
|
13 #include <framework/core/FrameworkExceptions.h>
14 #include <framework/gearbox/Unit.h>
50 virtual int getNumberNodes(
const std::string& path =
"")
const = 0;
56 bool exists(
const std::string& path =
"")
const {
return getNumberNodes(path) > 0; }
62 operator bool()
const {
return exists(); }
69 std::vector<GearDir> getNodes(
const std::string& path =
"")
const;
72 std::string
getPath()
const {
return m_path; }
80 virtual std::string getString(
const std::string& path =
"") const noexcept(false) = 0;
93 virtual std::pair<std::
string, std::
string> getStringWithUnit(const std::
string& path) const noexcept(false) = 0;
103 std::
string getString(const std::
string& path, const std::
string& defaultValue) const;
114 virtual const TObject* getTObject(const std::
string& path) const noexcept(false) = 0;
123 double getDouble(const std::
string& path = "") const noexcept(false);
134 double getDouble(const std::
string& path,
double defaultValue) const noexcept(false);
143 int getInt(const std::
string& path = "") const noexcept(false);
154 int getInt(const std::
string& path,
int defaultValue) const noexcept(false);
162 bool getBool(const std::
string& path = "") const noexcept(false);
172 bool getBool(const std::
string& path,
bool defaultValue) const;
187 double getWithUnit(const std::
string& path) const noexcept(false);
205 double getWithUnit(const std::
string& path,
double defaultValue) const noexcept(false);
224 std::vector<
double> getArray(const std::
string& path) const noexcept(false);
245 std::vector<
double> getArray(const std::
string& path, const std::vector<
double>& defaultValue) const noexcept(false);
261 double getLength(const std::
string& path = "") const noexcept(false)
263 return getWithUnit(path);
283 double getLength(
const std::string& path,
double defaultValue)
const noexcept(
false)
285 return getWithUnit(path, defaultValue);
301 double getAngle(
const std::string& path =
"") const noexcept(false)
303 return getWithUnit(path);
323 double getAngle(
const std::string& path,
double defaultValue)
const noexcept(
false)
325 return getWithUnit(path, defaultValue);
341 double getEnergy(
const std::string& path =
"") const noexcept(false)
343 return getWithUnit(path);
363 double getEnergy(
const std::string& path,
double defaultValue)
const noexcept(
false)
365 return getWithUnit(path, defaultValue);
381 double getDensity(
const std::string& path =
"") const noexcept(false)
383 return getWithUnit(path);
403 double getDensity(
const std::string& path,
double defaultValue)
const noexcept(
false)
405 return getWithUnit(path, defaultValue);
421 double getTime(
const std::string& path =
"") const noexcept(false)
423 return getWithUnit(path);
443 double getTime(
const std::string& path,
double defaultValue)
const noexcept(
false)
445 return getWithUnit(path, defaultValue);
461 double getFrequency(
const std::string& path =
"") const noexcept(false)
463 return getWithUnit(path);
483 double getFrequency(
const std::string& path,
double defaultValue)
const noexcept(
false)
485 return getWithUnit(path, defaultValue);
491 std::string ensureNode(
const std::string& path)
const ;
493 std::string ensurePath(
const std::string& path)
const;
495 std::string addIndex(
const std::string& path,
int index)
const;
497 std::string joinPath(
const std::string& path,
const std::string& subpath)
const;
double getAngle(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
double getTime(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard time unit.
double getDensity(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard density unit.
double getFrequency(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard frequency unit.
virtual ~Interface()
empty, virtual destructor
double getTime(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard time unit.
std::string getPath() const
Return path of the current interface.
bool exists(const std::string &path="") const
Check if a given parameter path exists.
double getAngle(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard angle unit.
double getFrequency(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard frequency unit.
Abstract base class for different kinds of events.
double getLength(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard length unit.
double getDensity(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard density unit.
double getEnergy(const std::string &path="") const noexcept(false)
Get the parameter path as a double converted to the standard energy unit.
Exception to be thrown in case of an empty result.
#define BELLE2_DEFINE_EXCEPTION(ClassName, Message)
Macro that defines an exception with the given message template.
Interface()
default constructor initializing to toplevel parameter space
double getEnergy(const std::string &path, double defaultValue) const noexcept(false)
Get the parameter path as a double converted to the standard energy unit.
std::string m_path
path of the current interface