otsdaq  v2_03_00
Configurations.h
1 #ifndef _ots_Configurations_h_
2 #define _ots_Configurations_h_
3 
4 #include <set>
5 #include <string>
6 
7 #include "otsdaq-coreTableCore/TableBase.h"
8 #include "otsdaq-coreTableCore/TableGroupKey.h"
9 #include "otsdaq-coreTableCore/TableVersion.h"
10 
11 namespace ots
12 {
13 class Configurations : public TableBase
14 {
15  public:
16  Configurations(void);
17  virtual ~Configurations(void);
18 
19  // Methods
20  void init(ConfigurationManager* configManager);
21  bool findKOC(TableGroupKey TableGroupKey, std::string koc) const;
22 
23  // Getters
24  TableVersion getConditionVersion(const TableGroupKey& TableGroupKey,
25  std::string koc) const;
26 
27  std::set<std::string> getListOfKocs(
28  TableGroupKey TableGroupKey = TableGroupKey()) const; // INVALID to get all Kocs
29  void getListOfKocsForView(
30  TableView* cfgView,
31  std::set<std::string>& kocList,
32  TableGroupKey TableGroupKey = TableGroupKey()) const; // INVALID to get all Kocs
33 
34  // Setters
35  int setConditionVersionForView(TableView* cfgView,
36  TableGroupKey TableGroupKey,
37  std::string koc,
38  TableVersion newKOCVersion);
39 
40  private:
41  enum
42  {
43  TableGroupKeyAlias,
44  KOC,
45  ConditionVersion
46  };
47 };
48 } // namespace ots
49 #endif