8#ifndef _Belle2_ConfigFile_h
9#define _Belle2_ConfigFile_h
24 typedef std::map<std::string, std::string> ValueList;
32 ConfigFile(
const std::string& file1,
const std::string& file2)
38 const std::string& file2,
39 const std::string& file3)
53 void read(
const std::string& filename,
bool overload =
true);
54 void read(std::istream& is,
bool overload =
true);
55 bool hasKey(
const std::string& label);
56 const std::string get(
const std::string& label);
57 int getInt(
const std::string& label);
58 bool getBool(
const std::string& label);
59 double getFloat(
const std::string& label);
60 ValueList& getValues() {
return m_value_m; }
61 std::vector<std::string>& getLabels() {
return m_label_v; }
62 void add(
const std::string& label,
63 const std::string& value,
bool overload);
64 void write(
const std::string& path);
68 const std::string getFilePath(
const std::string& filename);
72 std::vector<std::string> m_label_v;
74 std::map<std::string, int> m_count;
78 inline bool ConfigFile::hasKey(
const std::string& label)
80 return m_value_m.find((m_dir.size() > 0) ? m_dir +
"." + label : label)
Abstract base class for different kinds of events.