Belle II Software  release-08-01-10
MonitorDB.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #ifndef _Belle2_MonitorDB_h
9 #define _Belle2_MonitorDB_h
10 
11 #include <daq/slc/base/Date.h>
12 
13 #include <daq/slc/nsm/NSMVar.h>
14 
15 #include <daq/slc/database/DBInterface.h>
16 
17 namespace Belle2 {
23  class MonitorDB {
24 
25  public:
26  static void add(DBInterface& db, const std::string& tablename,
27  const std::string& vname, int val);
28  static void add(DBInterface& db, const std::string& tablename,
29  const std::string& vname, float val);
30  static void add(DBInterface& db, const std::string& tablename,
31  const std::string& vname, const std::string& val);
32  static NSMVarList get(DBInterface& db,
33  const std::string& tablename,
34  const std::string& vname);
35  static NSMVarList get(DBInterface& db,
36  const std::string& tablename,
37  const std::string& vname, int max);
38  static NSMVarList get(DBInterface& db,
39  const std::string& tablename,
40  const std::string& vname, const Date& start,
41  const Date& end);
42  static NSMVarList get(DBInterface& db,
43  const std::string& tablename,
44  const std::string& vname, int max,
45  const Date& start, const Date& end);
46  private:
47  static NSMVarList readTable(DBInterface& db, const std::string& vname);
48  static void createTable(DBInterface& db, const std::string& tablename);
49 
50  };
51 
53 }
54 
55 #endif
Abstract base class for different kinds of events.