GlobalNameSpec.h
Go to the documentation of this file.
1 #ifndef _DBUTILS_DAQCONFIG_GLOBALNAMESPEC_H
2 #define _DBUTILS_DAQCONFIG_GLOBALNAMESPEC_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 global configuration.
12  *
13  * @author Kurt Biery
14  * @version $Revision: 1.7.24.1 $ $Date: 2019/09/27 00:07:03 $
15  */
16 
18 
19  public:
20 
21  // ********************
22  // *** Constructors ***
23  // ********************
24 
25  GlobalNameSpec(const std::string& configName,
26  const std::string& dcmOperatingMode,
27  const std::string& detectorId);
28 
29  GlobalNameSpec(const std::string& configName,
30  const std::string& dcmOperatingMode,
31  const std::string& detectorId,
32  const std::string& timestamp);
33 
34  // *****************
35  // *** Accessors ***
36  // *****************
37 
42 
43  bool hasTimestamp() const {return _hasTimestamp;}
45 
48  bool isDAQConfiguration() const {return (! _isSlowControlsConfig);}
49 
50  int getUsageCount() const {return _usageCount;}
51 
52  std::string toString(int overallIndent = 0) const;
53 
54  // *****************
55  // *** Modifiers ***
56  // *****************
57 
58  void skipInvalidStateTest(bool setting) {
59  _skipInvalidStateTest = setting;
60  }
61  void isSlowControlsConfiguration(bool setting) {
62  _isSlowControlsConfig = setting;
63  }
64  void isDAQConfiguration(bool setting) {
65  _isSlowControlsConfig = (! setting);
66  }
69 
70  // *****************
71  // *** Operators ***
72  // *****************
73 
74  bool operator<(const GlobalNameSpec& other) const;
75 
76  private:
77 
78  void _addSpaces(std::string& workString, int count) const;
79 
83 
86 
89 
92 };
93 
94 } // end of namespace daqconfig
95 } // end of namespace dbutils
96 
97 #endif
std::string getDetectorId() const
void isSlowControlsConfiguration(bool setting)
void _addSpaces(std::string &workString, int count) const
const XML_Char int const XML_Char * value
Definition: expat.h:331
void isDAQConfiguration(bool setting)
std::string getDCMOpMode() const
GlobalNameSpec(const std::string &configName, const std::string &dcmOperatingMode, const std::string &detectorId)
std::string getTimestamp() const
void skipInvalidStateTest(bool setting)
bool operator<(const GlobalNameSpec &other) const
std::string getConfigName() const
std::string toString(int overallIndent=0) const
std::string getDetectorName() const
enum BeamMode string