1 #include <boost/lambda/lambda.hpp>
3 #include <rdet/RHardwareProfileXMLManager.h>
4 #include <utl/ErrorLogger.h>
5 #include <utl/TabulatedFunction.h>
6 #include <utl/TabulatedFunctionComplexLgAmpPhase.h>
7 #include <rdet/RDetector.h>
8 #include <rdet/RManagerRegister.h>
14 using namespace xercesc;
15 using namespace boost::lambda;
29 const string& hardwareProp)
32 Branch hardwareB = FindHardwareProfile(hardwareType);
39 for ( ; hardwarePropB; hardwarePropB = hardwarePropB.
GetNextSibling())
40 if (hardwarePropB.
GetName() == hardwareProp)
43 if (IsReportingErrors()) {
45 err <<
"Cannot find " + hardwareProp +
" while parsing for hardwareType "+ hardwareType +
" in XML." ;
59 if (hardwareB.
GetName() ==
"RResponse" &&
63 if (IsReportingErrors()) {
65 err <<
"Cannot find specifications for '" + hardwareType +
"' while XML parsing.";
76 const string& hardwareProp,
77 const string& hardwareType,
84 FindHardwareProfileProperty(hardwareType, hardwareProp);
103 vector<double> lgAmp;
107 for_each(lgAmp.begin(), lgAmp.end(), _1 *= 0.05);
109 AmpB = dataBranch.
GetChild(
"LgAmp");
113 AmpB = dataBranch.
GetChild(
"LgPow");
116 for_each(lgAmp.begin(), lgAmp.end(), _1 *= 0.5);
126 vector<double> phase;
129 const unsigned int n = x.size();
131 for (
unsigned int i = 0; i < n; ++i)
Manager for RD description in XML "HardwareProfile" files.
void Init()
Initialise the registry.
Branch GetChild(const std::string &childName) const
Get child of this Branch by child name.
utl::Branch FindHardwareProfileProperty(const std::string &hardwareType, const std::string &hardwareProp) const
Find the Branch corresponding for given hardwareType and hardwarePoperty.
AttributeMap GetAttributes() const
Get a map<string, string> containing all the attributes of this Branch.
Branch GetNextSibling() const
Get next sibling of this branch.
#define REGISTER_R_MANAGER(_name_, _Type_)
Class representing a document branch.
Class to hold collection (x,y) points and provide interpolation between them, where y are complex num...
void GetData(bool &b) const
Overloads of the GetData member template function.
std::string GetName() const
function to get the Branch name
A class to store complex numbers which are internally represented by log10(amplitude) and phase (and ...
void PushBack(const double x, const utl::ComplexLgAmpPhase &y)
utl::Branch FindHardwareProfile(const std::string &hardwareType) const
Find Branch for a given hardwareType.
Branch GetFirstChild() const
Get first child of this Branch.
#define ERROR(message)
Macro for logging error messages.
Status
Specifies success or (eventually) various possible failure modes.