RStationListXMLManager.h
Go to the documentation of this file.
1 #ifndef _rdet_RStationListXMLManager_h_
2 #define _rdet_RStationListXMLManager_h_
3 
4 #include <det/VManager.h>
5 #include <rdet/RStationListManager.h>
6 
7 
8 namespace rdet {
9 
30 
31  public:
33 
34  // overload VManager::Init to trigger XML read-in
35  virtual void Init(const std::string& configLink);
36 
39  VMANAGER_GETDATA_CALL(GetStationListData, std::string)
41  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<std::vector<int> >)
42 
43  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
44  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
45  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
46  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
47  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
48  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
49  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
50  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
51  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
52  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
53  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
54  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
55 
57  { return fStationManager; }
58 
59  private:
60  Status
61  GetStationListDataVectorInt(std::vector<int>& returnData, const std::string& componentProperty,
62  const std::string& componentName, const IndexMap& componentIndex)
63  const
64  {
65  if ((componentName == "RChannel" && componentProperty == "listOfChannelIds"))
66  return GetListOfChannelIds(returnData, componentProperty, componentIndex);
67 
68  // we only match componentProperty
69  if (componentName != "stationList")
70  return eNotFound;
71 
72  return fStationManager.GetData(returnData, componentProperty, componentIndex);
73  }
74 
75  template<typename T>
76  Status
77  GetStationListData(T& returnData, const std::string& componentProperty,
78  const std::string& componentName, const IndexMap& componentIndex)
79  const
80  {
81  // we only match componentProperty
82  if(componentName != "stationList")
83  return eNotFound;
84 
85  return fStationManager.GetData(returnData, componentProperty, componentIndex);
86  }
87 
88  det::VManager::Status GetListOfChannelIds(std::vector<int>& returnData,
89  const std::string& componentProperty,
90  const det::VManager::IndexMap& componentIndex) const;
91 
93 
95 
96  };
97 
98 }
99 
100 
101 #endif
const RStationListManager & GetStationListManager() const
VMANAGER_GETDATA_HANDLE_DENIED RStationListManager fStationManager
Interface for detector managers.
Definition: VManager.h:115
virtual void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
det::VManager::Status GetData(T &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Status GetStationListDataVectorInt(std::vector< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
det::VManager::Status GetListOfChannelIds(std::vector< int > &returnData, const std::string &componentProperty, const det::VManager::IndexMap &componentIndex) const
Status GetStationListData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
Common implementation of the station list manager.
Manager for Radio description in XML station lists.
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127

, generated on Tue Sep 26 2023.