otsdaq  v2_03_00
DetectorConfiguration.h
1 #ifndef _ots_DetectorConfiguration_h_
2 #define _ots_DetectorConfiguration_h_
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "otsdaq-coreTableCore/TableBase.h"
9 
10 namespace ots
11 {
13 {
14  public:
16  virtual ~DetectorConfiguration(void);
17 
18  // Methods
19  void init(ConfigurationManager* configManager);
20 
21  // Getters
22  const std::vector<std::string>& getDetectorIDs(void) const;
23  const std::vector<std::string>& getDetectorTypes(
24  void) const; // TODO add a class or
25  // configuration.info
26  // where there is a list
27  // of supported
28  // DetectorTypes
29  const std::string& getDetectorType(const std::string& detectorID) const;
30  const std::string& getDetectorStatus(const std::string& detectorID) const;
31 
32  const std::map<std::string, unsigned int>& getNameToRowMap() const
33  {
34  return nameToRow_;
35  }
36 
37  private:
38  enum
39  {
40  DetectorID,
41  DetectorType,
42  DetectorStatus
43  };
44 
45  std::map<std::string, unsigned int> nameToRow_;
46  std::vector<std::string> detectorIDs_;
47  std::vector<std::string> detectorTypes_;
48 };
49 } // namespace ots
50 #endif