SubsystemNameSpec.h
Go to the documentation of this file.
1 #ifndef _DBUTILS_DAQCONFIG_SUBSYSTEMNAMESPEC_H
2 #define _DBUTILS_DAQCONFIG_SUBSYSTEMNAMESPEC_H
3 
4 #include <string>
5 
6 namespace dbutils {
7 namespace daqconfig {
8 
9 /**
10  * Simple container class to hold the identifiers that specify a particular
11  * named subsystem configuration.
12  *
13  * @author Kurt Biery
14  * @version $Revision: 1.14.12.1 $ $Date: 2019/09/27 00:07:03 $
15  */
16 
18 
19  public:
20 
32 
33  // ********************
34  // *** Constructors ***
35  // ********************
36 
37  SubsystemNameSpec(const std::string& configName,
38  const std::string& dcmOperatingMode,
39  const std::string& detectorId,
40  const std::string& subsystemName,
41  const std::string& configType);
42 
43  SubsystemNameSpec(const std::string& configName,
44  const std::string& dcmOperatingMode,
45  const std::string& detectorId,
46  const std::string& subsystemName,
47  const std::string& configType,
48  const std::string& timestamp);
49 
50  // *****************
51  // *** Accessors ***
52  // *****************
53 
58 
61 
62  bool hasTimestamp() const {return _hasTimestamp;}
64 
66  bool isDAQConfiguration() const {return (! _isSlowControlsConfig);}
67 
68  int getUsageCount() const {return _usageCount;}
69 
70  std::string toString(int overallIndent = 0) const;
71 
72  // *****************
73  // *** Modifiers ***
74  // *****************
75 
76  void isSlowControlsConfiguration(bool setting) {
77  _isSlowControlsConfig = setting;
78  }
79  void isDAQConfiguration(bool setting) {
80  _isSlowControlsConfig = (! setting);
81  }
84 
85  // *****************
86  // *** Operators ***
87  // *****************
88 
89  bool operator<(const SubsystemNameSpec& other) const;
90 
91  private:
92 
93  void _addSpaces(std::string& workString, int count) const;
94 
98 
101 
104 
106 
109 };
110 
111 } // end of namespace daqconfig
112 } // end of namespace dbutils
113 
114 #endif
static const std::string CONNECT_CONFIG_TYPE
static const std::string DL_SUBSYSTEM_NAME
std::string toString(int overallIndent=0) const
static const std::string HARDWARE_CONFIG_TYPE
static const std::string DDT_SUBSYSTEM_NAME
static const std::string DCM_SUBSYSTEM_NAME
bool operator<(const SubsystemNameSpec &other) const
static const std::string GT_SUBSYSTEM_NAME
void _addSpaces(std::string &workString, int count) const
static const std::string BNEVB_SUBSYSTEM_NAME
static const std::string SM_SUBSYSTEM_NAME
const XML_Char int const XML_Char * value
Definition: expat.h:331
static const std::string DAQMONITOR_SUBSYSTEM_NAME
SubsystemNameSpec(const std::string &configName, const std::string &dcmOperatingMode, const std::string &detectorId, const std::string &subsystemName, const std::string &configType)
static const std::string TDUMANAGER_SUBSYSTEM_NAME
static const std::string RUN_CONFIG_TYPE
enum BeamMode string