FTelescopeListXMLManager.h
Go to the documentation of this file.
1 #ifndef _fdet_FTelescopeListXMLManager_h_
2 #define _fdet_FTelescopeListXMLManager_h_
3 
4 
5 #include <det/VManager.h>
6 #include <utl/ErrorLogger.h>
7 
8 
9 namespace utl {
10  class Reader;
11  class Branch;
12  class TabulatedFunction;
13 }
14 
15 
16 namespace fdet {
17 
33 
34  public:
35  virtual ~FTelescopeListXMLManager();
36 
40  VMANAGER_GETDATA_CALL(GetTelescopeListData, std::vector<double>)
42  VMANAGER_GETDATA_CALL(GetTelescopeListData, std::vector<std::string>)
44  VMANAGER_GETDATA_CALL(GetTelescopeListData, std::list<std::string>)
45  VMANAGER_GETDATA_CALL(GetTelescopePointingData, std::map<std::string, double>)
46 
47  // Special case of a request for full list of eyes and telescopes
49 
50  // Implemented only for relative efficiency
52  const std::string& componentProperty,
53  const std::string& componentName,
54  const IndexMap& componentIndex) const;
55 
56  VMANAGER_GETDATA_DENIED(std::list<std::pair<int, int> >)
57 
58  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
59  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
61  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
62 
63  private:
64  // Implement generic getters with template
65  template<typename T>
66  Status GetTelescopeListData(T& returnData,
67  const std::string& componentProperty,
68  const std::string& componentName,
69  const IndexMap& componentIndex) const;
70 
71  // Called by GetTelescopeListData for eye-level properties
72  template<typename T>
73  Status GetEyeData(T& returnData,
74  const std::string& componentProperty,
75  const std::string& componentName,
76  const IndexMap& componentIndex) const;
77 
78  // Called by GetTelescopeListData for telescope-level properties
79  template<typename T>
80  Status GetTelescopeData(T& returnData,
81  const std::string& componentProperty,
82  const std::string& componentName,
83  const IndexMap& componentIndex) const;
84 
85  // Special method to search the telescope list for all the Eye Id's
86  // and Telescope Id's present in the XML file.
87  // Note that for this manager, only the search for the full eye and
88  // telescope lists takes this particular function signature.
89  Status GetFullEyeTelescopeList(std::list<int>& returnData,
90  const std::string& componentProperty,
91  const std::string& componentName,
92  const IndexMap& componentIndex) const;
93 
94  // Fetch the telescope pointing information
95  Status GetTelescopePointingData(std::map<std::string, double>& returnData,
96  const std::string& componentProperty,
97  const std::string& componentName,
98  const IndexMap& componentIndex) const;
99 
101 
102  };
103 
104 }
105 
106 
107 #endif
108 
109 // Configure (x)emacs for this file ...
110 // Local Variables:
111 // mode: c++
112 // compile-command: "make -C .. -k"
113 // End:
Status GetData(utl::TabulatedFunction &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Class to hold collection (x,y) points and provide interpolation between them.
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
Status GetTelescopeData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Status GetFullEyeTelescopeList(std::list< int > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Class to hold collection (x,y) points and provide interpolation between them, where y are complex num...
Status GetTelescopePointingData(std::map< std::string, double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_DENIED(_T_...)
Definition: VManager.h:21
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
Reads data from XML file(s) containing data unique to telescopes and eyes (eg. positions, orientations, commission times, and so forth).
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
#define VMANAGER_GETDATA_NOTFOUND(_T_...)
Definition: VManager.h:41
Status GetTelescopeListData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Status
Specifies success or (eventually) various possible failure modes.
Definition: VManager.h:127
Status GetEyeData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const

, generated on Tue Sep 26 2023.