SModelsXMLManager.h
Go to the documentation of this file.
1 #ifndef _sdet_SModelsXMLManager_h_
2 #define _sdet_SModelsXMLManager_h_
3 
4 #include <map>
5 #include <string>
6 
7 #include <det/VManager.h>
8 #include <utl/ErrorLogger.h>
9 
10 
11 namespace utl {
12  class Reader;
13  class Branch;
14  class TabulatedFunction;
15 }
16 
17 namespace sdet {
18 
38 
39  public:
40  virtual ~SModelsXMLManager() { }
41 
42  void Init(const std::string& configLink);
43 
46  VMANAGER_GETDATA_CALL(InternalGetData, std::string)
47  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<double>)
48  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<int>)
49  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<std::string>)
50  VMANAGER_GETDATA_CALL(InternalGetData, std::list<double>)
51  VMANAGER_GETDATA_CALL(InternalGetData, std::list<int>)
52  VMANAGER_GETDATA_CALL(InternalGetData, std::list<std::string>)
53 
66  Status GetData(utl::TabulatedFunction& returnData,
67  const std::string& componentProperty,
68  const std::string& componentName,
69  const IndexMap& componentIndex) const;
70 
71  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
72  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
73  VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
74  VMANAGER_GETDATA_DENIED(std::list<std::pair<int, int> >)
75  VMANAGER_GETDATA_DENIED(std::map<int, utl::TabulatedFunction>)
76  VMANAGER_GETDATA_DENIED(utl::TabulatedFunctionComplexLgAmpPhase)
77  //VMANAGER_GETDATA_DENIED(unsigned long long int)
78 
79  private:
80  template<typename T>
81  Status InternalGetData(T& returnData,
82  const std::string& componentProperty,
83  const std::string& componentName,
84  const IndexMap& componentIndex) const;
85 
86  // Find Branch where the requested data resides
87  utl::Branch FindBranch(const std::string& property, const std::string& modelType,
88  const IndexMap& componentIndex) const;
89 
90  // Utility function to fill aforementioned maps
91  void FillMaps();
92 
93  // VMANAGER_GETDATA_HANDLE_DENIED
94  virtual
95  Status
96  GenericGetData(Handle& returnData,
97  const std::string& component,
98  const std::string& property,
99  const IndexMap& index) const;
100 
101  // map Station Id to a map of model type, model id
102  // (map <Id, map<model type, model id>)
103  typedef std::map<std::string, IndexMap> IndexIndexMap;
104  std::map<std::string, IndexIndexMap> fStationModelMap;
105  // map when <station id="all">
106  IndexIndexMap fAllStationsModelMap;
107  };
108 
109 }
110 
111 
112 #endif
Status GetData(utl::TabulatedFunction &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
virtual Status GenericGetData(Handle &returnData, const std::string &component, const std::string &property, const IndexMap &index) const
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
Manager for SD description in XML &quot;model&quot; files.
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
#define VMANAGER_GETDATA_DENIED(_T_...)
Definition: VManager.h:21
Status InternalGetData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< std::string, IndexIndexMap > fStationModelMap
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
utl::Branch FindBranch(const std::string &property, const std::string &modelType, const IndexMap &componentIndex) const
std::map< std::string, IndexMap > IndexIndexMap
IndexIndexMap fAllStationsModelMap
#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.