SStationListXMLManager.h
Go to the documentation of this file.
1 #ifndef _sdet_SStationListXMLManager_h_
2 #define _sdet_SStationListXMLManager_h_
3 
4 #include <det/VManager.h>
5 #include <sdet/SStationListManager.h>
6 
7 
8 namespace sdet {
9 
28 
29  public:
31 
32  // overload VManager::Init to trigger XML read-in
33  virtual void Init(const std::string& configLink);
34 
37  VMANAGER_GETDATA_CALL(GetStationListData, std::string)
38  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<int>)
39  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<std::vector<int> >)
40  VMANAGER_GETDATA_CALL(GetStationListData, std::vector<bool>)
41 
42  //
43  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
44  VMANAGER_GETDATA_NOTFOUND(std::vector<std::string>)
45  VMANAGER_GETDATA_NOTFOUND(std::list<double>)
46  VMANAGER_GETDATA_NOTFOUND(std::list<std::string>)
47  VMANAGER_GETDATA_NOTFOUND(std::list<int>)
48  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
49  VMANAGER_GETDATA_NOTFOUND(std::vector<double>)
50  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
51  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunctionComplexLgAmpPhase)
52  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
53  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
54 
56  { return fStationManager; }
57 
58  private:
59  template<typename T>
60  Status
61  GetStationListData(T& returnData,
62  const std::string& componentProperty,
63  const std::string& componentName,
64  const IndexMap& componentIndex)
65  const
66  {
67  // we only match componentProperty
68  if (componentName != "stationList")
69  return eNotFound;
70  return fStationManager.GetData(returnData, componentProperty,
71  componentIndex);
72  }
73 
75 
77 
78  };
79 
80 }
81 
82 
83 #endif
const SStationListManager & GetStationListManager() const
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
virtual void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
Manager for SD description in XML station lists.
VMANAGER_GETDATA_HANDLE_DENIED SStationListManager fStationManager
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
det::VManager::Status GetData(T &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
Common implementation of the station list manager.
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
#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.