RModelsXMLManager.h
Go to the documentation of this file.
1 #ifndef _rdet_RModelsXMLManager_h_
2 #define _rdet_RModelsXMLManager_h_
3 
4 #include <map>
5 #include <string>
6 
7 #include <det/VManager.h>
8 #include <utl/ErrorLogger.h>
9 
10 #include <utl/ResponseMap.h>
11 
12 
13 namespace utl {
14  class Reader;
15  class Branch;
16  class TabulatedFunction;
17  class TabulatedFunctionComplexLgAmpPhase;
18 }
19 
20 namespace rdet {
21 
43 
44  public:
45  virtual ~RModelsXMLManager() { }
46 
47  void Init(const std::string& configLink);
48 
51  //VMANAGER_GETDATA_NOTFOUND(unsigned long long int)
52  VMANAGER_GETDATA_CALL(InternalGetData, std::string)
53  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<double>)
54  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<int>)
55  VMANAGER_GETDATA_CALL(InternalGetData, std::vector<std::string>)
56  VMANAGER_GETDATA_CALL(InternalGetData, std::list<double>)
57  VMANAGER_GETDATA_CALL(InternalGetData, std::list<int>)
58  VMANAGER_GETDATA_CALL(InternalGetData, std::list<std::string>)
59  VMANAGER_GETDATA_CALL(GetTFCLAPData, utl::TabulatedFunctionComplexLgAmpPhase)
60  VMANAGER_GETDATA_CALL(GetDataMap, std::map<std::string, double>)
61 
62  VMANAGER_GETDATA_NOTFOUND(std::vector<bool>)
63  VMANAGER_GETDATA_NOTFOUND(std::vector<std::vector<int> >)
64  //VMANAGER_GETDATA_NOTFOUND(std::map<std::string, double>)
65  VMANAGER_GETDATA_NOTFOUND(std::list<std::pair<int, int> >)
66  VMANAGER_GETDATA_NOTFOUND(std::map<int, utl::TabulatedFunction>)
67  VMANAGER_GETDATA_NOTFOUND(utl::TabulatedFunction)
68  // VMANAGER_GETDATA_DENIED(utl::TabulatedFunctionComplexLgAmpPhase)
69 
82  /*
83  Status GetData(utl::TabulatedFunction& returnData,
84  const std::string& componentProperty,
85  const std::string& componentName,
86  const IndexMap& componentIndex) const;
87  */
88  Status GetTFCLAPData(utl::TabulatedFunctionComplexLgAmpPhase& returnData,
89  const std::string& componentProperty,
90  const std::string& componentName,
91  const IndexMap& componentIndex) const;
92  Status GetDataMap(std::map<std::string,double>& returnData,
93  const std::string& componentProperty,
94  const std::string& componentName,
95  const IndexMap& componentIndex) const;
96 
97  private:
98  template<typename T>
99  Status InternalGetData(T& returnData,
100  const std::string& componentProperty,
101  const std::string& componentName,
102  const IndexMap& componentIndex) const;
103 
104  // Find Branch where the requested data resides
105  utl::Branch FindBranch(const std::string& property, const std::string& modelType,
106  const IndexMap& componentIndex) const;
107 
108  // Utility function to fill aforementioned maps
109  void FillMaps();
110 
112 
113  // map Channel Id to a map of model type, model id
114  // (map <Id, map<model type, model id>>)
115  std::map<std::pair<std::string, std::string>, IndexMap> fStationChannelModelMap;
116 
117  // map when <stations id="default">, but check for right channel
118  std::map<std::string, IndexMap> fDefaultStationsModelMap;
119 
120  // map when <stations id="AugerPrime">, but check for right channel
121  std::map<std::string, IndexMap> fAugerPrimeStationsModelMap;
122 
123  };
124 
125 }
126 
127 
128 #endif
Status GetDataMap(std::map< std::string, double > &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
std::map< std::string, IndexMap > fAugerPrimeStationsModelMap
std::map< std::string, IndexMap > fDefaultStationsModelMap
Interface for detector managers.
Definition: VManager.h:115
#define VMANAGER_GETDATA_CALL(_GetData_, _T_...)
Definition: VManager.h:59
Status InternalGetData(T &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
#define VMANAGER_GETDATA_HANDLE_DENIED
Definition: VManager.h:75
void Init(const std::string &configLink)
Manager Initialization. configLink is the CentralConfig hook for the configuration file...
utl::Branch FindBranch(const std::string &property, const std::string &modelType, const IndexMap &componentIndex) const
VMANAGER_GETDATA_HANDLE_DENIED std::map< std::pair< std::string, std::string >, IndexMap > fStationChannelModelMap
std::map< std::string, std::string > IndexMap
Definition: VManager.h:133
Status GetTFCLAPData(utl::TabulatedFunctionComplexLgAmpPhase &returnData, const std::string &componentProperty, const std::string &componentName, const IndexMap &componentIndex) const
Manager for RD description in XML &quot;model&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.