1 #include <sdet/SManagerRegister.h>
2 #include <sdet/SdSimCalibrationManager.h>
3 #include <boost/lexical_cast.hpp>
16 SdSimCalibrationManager::GetData(
double& returnData,
17 const
string& componentProperty,
18 const
string& componentName,
19 const IndexMap& componentIndex)
22 const int nIndices = componentIndex.size();
25 const auto pmtIt = componentIndex.find(
"PMTId");
26 if (pmtIt == componentIndex.end()) {
27 if (IsReportingErrors())
28 INFO(
string(
"Request with " + boost::lexical_cast<string>(nIndices) +
29 " indices, none of which specifies 'PMTId'; ") +
30 QueryInfoMessage(componentProperty, componentName, componentIndex));
33 const string& pmtId = pmtIt->second;
36 const auto uubIt = componentIndex.find(
"isUUB");
37 if (uubIt == componentIndex.end()) {
38 if (IsReportingErrors())
39 INFO(
string(
"Request with " + boost::lexical_cast<string>(nIndices) +
40 " indices, none of which specifies 'isUUB'; ") +
41 QueryInfoMessage(componentProperty, componentName, componentIndex));
44 const string& isUUB = uubIt->second;
47 for (
auto simB = fBranch.GetFirstChild(); simB; simB = simB.GetNextSibling()) {
49 const auto& simAtts = simB.GetAttributes();
51 if (simAtts.find(
"name")->second != componentName)
55 for (
auto elecB = simB.GetFirstChild(); elecB; elecB = elecB.GetNextSibling()) {
57 const auto& elecAtts = elecB.GetAttributes();
59 if (elecAtts.find(
"isUUB")->second != isUUB)
63 for (
auto pmtB = elecB.GetFirstChild(); pmtB; pmtB = pmtB.GetNextSibling()) {
65 const auto& pmtAtts = pmtB.GetAttributes();
67 if (pmtAtts.find(
"id")->second != pmtId)
70 pmtB.GetChild(componentProperty).GetData(returnData);
#define INFO(message)
Macro for logging informational messages.
Interface for detector managers.
Status
Return code for seek operation.
#define REGISTER_S_MANAGER(_name_, _Type_)