 |
Belle II Software
release-05-02-19
|
13 #include <framework/gearbox/Interface.h>
14 #include <framework/gearbox/Gearbox.h>
33 class GearDir:
public gearbox::Interface {
36 GearDir(
const gearbox::Interface& start,
const std::string& path,
int index = 0)
42 GearDir(
const std::string& path =
"",
int index = 0)
60 virtual int getNumberNodes(
const std::string& path =
"")
const override
71 virtual std::string
getString(
const std::string& path =
"") const noexcept(false)
override
84 std::string
getString(
const std::string& path,
const std::string& defaultValue)
const
100 virtual std::pair<std::string, std::string>
getStringWithUnit(
const std::string& path =
"") const noexcept(false)
override
114 virtual const TObject*
getTObject(
const std::string& path)
const noexcept(
false)
override
virtual std::pair< std::string, std::string > getStringWithUnit(const std::string &path="") const noexcept(false) override
Get the parameter path as string and also return the unit it was defined with.
GearDir(const gearbox::Interface &start, const std::string &path, int index=0)
Create a GearDir starting at a given base path and appending some subpath and optionally an index.
std::string ensurePath(const std::string &path) const
make sure the path really corresponds to a path by appending a trailing slash if neccessary
virtual const TObject * getTObject(const std::string &path) const noexcept(false) override
Get the parameter path as a TObject.
static Gearbox & getInstance()
Return reference to the Gearbox instance.
virtual const TObject * getTObject(const std::string &path) const noexcept(false) override
Get the parameter path as a TObject.
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.
virtual std::pair< std::string, std::string > getStringWithUnit(const std::string &path="") const noexcept(false) override
Get the parameter path as string and also return the unit it was defined with.
virtual std::string getString(const std::string &path="") const noexcept(false)=0
Get the parameter path as a string.
Abstract base class for different kinds of events.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
std::string addIndex(const std::string &path, int index) const
add [index] to the path (after stripping trailing slashes)
GearDir is the basic class used for accessing the parameter store.
void append(const std::string &path)
Append something to the current path, modifying the GearDir in place.
virtual std::string getString(const std::string &path="") const noexcept(false) override
Get the parameter path as a string.
Exception to be thrown in case of an empty result.
std::string m_path
path of the current interface
virtual int getNumberNodes(const std::string &path="") const override
Return the number of nodes a given path will expand to.