COverrideXMLManager.h
Go to the documentation of this file.
1 #ifndef _cdet_COverrideXMLManager_h_
2 #define _cdet_COverrideXMLManager_h_
3 
4 #include <det/VManager.h>
5 #include <utl/ErrorLogger.h>
6 
7 
8 namespace utl {
9  class Reader;
10  class Branch;
11  class TabulatedFunction;
12 }
13 
14 
15 namespace cdet {
16 
39 
40  public:
41  virtual ~COverrideXMLManager() { }
42 
45  VMANAGER_GETDATA_CALL(GetOverrideData, std::string)
46  VMANAGER_GETDATA_CALL(GetOverrideData, std::vector<double>)
47  VMANAGER_GETDATA_CALL(GetOverrideData, std::vector<int>)
48  VMANAGER_GETDATA_CALL(GetOverrideData, std::vector<std::string>)
49  VMANAGER_GETDATA_CALL(GetOverrideData, std::list<double>)
50  VMANAGER_GETDATA_CALL(GetOverrideData, std::list<int>)
51  VMANAGER_GETDATA_CALL(GetOverrideData, std::list<std::string>)
52  VMANAGER_GETDATA_CALL(GetOverrideData, std::vector<bool>)
53 
54  // Tabulated data has a special getter to do the tabulation
55  Status GetData(utl::TabulatedFunction& returnData,
56  const std::string& componentProperty,
57  const std::string& componentName,
58  const IndexMap& componentIndex) const;
59 
60  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
61  VMANAGER_GETDATA_DENIED(std::map<int, utl::TabulatedFunction>)
62  VMANAGER_GETDATA_DENIED(std::list<std::pair<int, int> >)
63  VMANAGER_GETDATA_DENIED(std::map<std::string, double>)
64  VMANAGER_GETDATA_DENIED(utl::TabulatedFunctionComplexLgAmpPhase)
65 
66 
67  private:
68  // Implement generic getters with template
69  template<typename T>
70  Status GetOverrideData(T& returnData,
71  const std::string& componentProperty,
72  const std::string& componentName,
73  const IndexMap& componentIndex) const;
74 
75  // Return Branch for the requested data.
76  utl::Branch FindBranch(const std::string& componentProperty,
77  const std::string& modelType,
78  const IndexMap& componentIndex) const;
79 
80  };
81 
82 } // namespace cdet
83 
84 
85 #endif // _cdet_COverrideXMLManager_h_
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
Status GetOverrideData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Status GetData(utl::TabulatedFunction &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_DENIED(_T_...)
Definition: VManager.h:21
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
utl::Branch FindBranch(const std::string &componentProperty, const std::string &modelType, const IndexMap &componentIndex) const
Manager for SD description in XML &quot;override&quot; files.
#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.