1 #ifndef _Belle2_DBRecord_h
2 #define _Belle2_DBRecord_h
14 typedef std::map<std::string, std::string> DBFieldList;
23 std::vector<std::string>& getFieldNames() {
return m_name_v; }
24 DBFieldList& getFieldValues() {
return m_value_m; }
25 bool hasField(
const std::string& name)
27 return m_value_m.find(name) != m_value_m.end();
29 size_t getNFields()
const {
return m_name_v.size(); }
30 const std::string get(
const std::string& name)
const;
31 const std::string get(
int i)
const;
32 unsigned long long int getULLInt(
const std::string& name)
const;
33 int getInt(
const std::string& name)
const;
34 int getInt(
int i)
const;
35 bool getBool(
const std::string& name)
const;
36 bool getBool(
int i)
const;
37 float getFloat(
const std::string& name)
const;
38 float getFloat(
int i)
const;
39 std::vector<std::string> getArray(
const std::string& name)
const;
40 std::vector<std::string> getArray(
int i)
const;
41 std::vector<int> getIntArray(
const std::string& name)
const;
42 std::vector<int> getIntArray(
int i)
const;
43 std::vector<float> getFloatArray(
const std::string& name)
const;
44 std::vector<float> getFloatArray(
int i)
const;
45 const std::string getFieldName(
int i)
const;
47 void add(std::string name, std::string value);
50 std::vector<std::string> m_name_v;
51 mutable DBFieldList m_value_m;
55 typedef std::vector<DBRecord> DBRecordList;