IDSpec.h
Go to the documentation of this file.
1 #ifndef _DBUTILS_DAQCONFIG_IDSPEC_H
2 #define _DBUTILS_DAQCONFIG_IDSPEC_H
3 
4 #include <string>
5 #include <stdint.h>
6 
7 namespace dbutils {
8 namespace daqconfig {
9 
10 /**
11  * Simple container class to hold the ID-based parameters that
12  * specify a particular configuration.
13  *
14  * @author Kurt Biery
15  * @version $Revision: 1.1.24.1 $ $Date: 2019/09/27 00:07:03 $
16  */
17 
18 class IDSpec {
19 
20  public:
21 
24 
25  // ********************
26  // *** Constructors ***
27  // ********************
28 
29  explicit IDSpec(const int64_t& configId, CONFIG_LEVEL globalOrSubsytem,
30  MAJOR_SYSTEM_TYPE daqOrSlowControls);
31 
32  // *****************
33  // *** Accessors ***
34  // *****************
35 
36  int64_t getConfigId() const {return _configId;}
37 
38  bool isGlobalConfiguration() const {return (! _isSubsystemConfig);}
40 
41  bool isDAQConfiguration() const {return (! _isSlowControlsConfig);}
43 
44  // *****************
45  // *** Modifiers ***
46  // *****************
47 
48  void isGlobalConfiguration(bool setting) {
49  _isSubsystemConfig = (! setting);
50  }
51  void isSubsystemConfiguration(bool setting) {
52  _isSubsystemConfig = setting;
53  }
54 
55  void isDAQConfiguration(bool setting) {
56  _isSlowControlsConfig = (! setting);
57  }
58  void isSlowControlsConfiguration(bool setting) {
59  _isSlowControlsConfig = setting;
60  }
61 
62  private:
63 
64  int64_t _configId;
67 
68 };
69 
70 } // end of namespace daqconfig
71 } // end of namespace dbutils
72 
73 #endif
IDSpec(const int64_t &configId, CONFIG_LEVEL globalOrSubsytem, MAJOR_SYSTEM_TYPE daqOrSlowControls)
Definition: IDSpec.cpp:13
bool isSlowControlsConfiguration() const
Definition: IDSpec.h:42
void isDAQConfiguration(bool setting)
Definition: IDSpec.h:55
int64_t getConfigId() const
Definition: IDSpec.h:36
void isGlobalConfiguration(bool setting)
Definition: IDSpec.h:48
void isSlowControlsConfiguration(bool setting)
Definition: IDSpec.h:58
bool isSubsystemConfiguration() const
Definition: IDSpec.h:39
void isSubsystemConfiguration(bool setting)
Definition: IDSpec.h:51
bool isDAQConfiguration() const
Definition: IDSpec.h:41
bool isGlobalConfiguration() const
Definition: IDSpec.h:38