otsdaq  v2_04_01
FEConfiguration.h
1 #ifndef _ots_FEConfiguration_h_
2 #define _ots_FEConfiguration_h_
3 
4 #include <map>
5 #include <string>
6 #include <vector>
7 
8 #include "otsdaq-coreTableCore/TableBase.h"
9 
10 namespace ots
11 {
12 class FEConfiguration : public TableBase
13 {
14  public:
15  FEConfiguration(void);
16  virtual ~FEConfiguration(void);
17 
18  // Methods
19  void init(ConfigurationManager* configManager);
20  // Getters
21  // std::vector<std::string> getListOfFEIDs (void) const;
22  // std::vector<std::string> getListOfFEIDs (const std::string& supervisorType,
23  // unsigned int supervisorInstance) const;
24  // //FIXME This is wrong because there can be same name interfaces on different
25  // supervisors!!!!!!! I am doing it for the DQM :( const std::string
26  // getFEInterfaceType (const std::string& frontEndID) const; const std::string
27  // getFEInterfaceType (const std::string& supervisorType, unsigned int
28  // supervisorInstance, const std::string& frontEndID) const;
29 
30  // Getters
31  // std::vector<unsigned int> getListOfFEWRs (void) const;
32  // std::vector<unsigned int> getListOfFEWRs (unsigned int supervisorInstance)
33  // const; const std::string& getFEWRInterfaceName (unsigned int id)
34  // const;
35  //
36  // std::vector<unsigned int> getListOfFEWs (void) const;
37  // std::vector<unsigned int> getListOfFEWs (unsigned int supervisorInstance)
38  // const; const std::string& getFEWInterfaceName (unsigned int id)
39  // const;
40  //
41  // std::vector<unsigned int> getListOfFERs (void) const;
42  // std::vector<unsigned int> getListOfFERs (unsigned int supervisorInstance)
43  // const; const std::string& getFERInterfaceName (unsigned int id)
44  // const;
45 
46  private:
47  enum
48  {
49  SupervisorType,
50  SupervisorInstance,
51  FrontEndId,
52  FrontEndType
53  };
54  std::string composeUniqueName(std::string supervisorName,
55  unsigned int supervisorInstance) const
56  {
57  return supervisorName + std::to_string(supervisorInstance);
58  }
59  std::map<std::string, std::map<std::string, unsigned int>> typeNameToRow_;
60 };
61 } // namespace ots
62 #endif