2 #include "otsdaq-core/Macros/TablePluginMacros.h"
3 #include "otsdaq-core/TablePluginDataFormats/ROCToFETable.h"
7 const std::string ROCToFEConfiguration::staticTableName_ =
"ROCToFEConfiguration";
9 ROCToFEConfiguration::ROCToFEConfiguration(
void)
35 ROCToFEConfiguration::~ROCToFEConfiguration(
void) {}
40 std::string tmpDetectorID;
41 for(
unsigned int row = 0; row < TableBase::activeTableView_->getNumberOfRows(); row++)
43 TableBase::activeTableView_->getValue(tmpDetectorID, row, DetectorID);
44 nameToInfoMap_[tmpDetectorID] = ROCInfo();
45 ROCInfo& aROCInfo = nameToInfoMap_[tmpDetectorID];
46 TableBase::activeTableView_->getValue(aROCInfo.theFEWName_, row, FEWName);
47 TableBase::activeTableView_->getValue(aROCInfo.theFEWChannel_, row, FEWChannel);
48 TableBase::activeTableView_->getValue(
49 aROCInfo.theFEWROCAddress_, row, FEWROCAddress);
50 TableBase::activeTableView_->getValue(aROCInfo.theFERName_, row, FERName);
51 TableBase::activeTableView_->getValue(aROCInfo.theFERChannel_, row, FEWChannel);
52 TableBase::activeTableView_->getValue(
53 aROCInfo.theFERROCAddress_, row, FERROCAddress);
58 std::vector<std::string> ROCToFEConfiguration::getFEWROCsList(std::string fECNumber)
const
60 std::string tmpDetectorID;
61 std::string tmpFEWName;
62 std::vector<std::string> list;
63 for(
unsigned int row = 0; row < TableBase::activeTableView_->getNumberOfRows(); row++)
65 TableBase::activeTableView_->getValue(tmpFEWName, row, FEWName);
66 if(tmpFEWName == fECNumber)
68 TableBase::activeTableView_->getValue(tmpDetectorID, row, DetectorID);
69 list.push_back(tmpDetectorID);
76 std::vector<std::string> ROCToFEConfiguration::getFERROCsList(std::string fEDNumber)
const
78 std::string tmpDetectorID;
79 std::string tmpFERName;
80 std::vector<std::string> list;
81 for(
unsigned int row = 0; row < TableBase::activeTableView_->getNumberOfRows(); row++)
83 TableBase::activeTableView_->getValue(tmpFERName, row, FERName);
84 if(tmpFERName == fEDNumber)
86 TableBase::activeTableView_->getValue(tmpDetectorID, row, DetectorID);
87 list.push_back(tmpDetectorID);
94 unsigned int ROCToFEConfiguration::getFEWChannel(
const std::string& rOCName)
const
96 return nameToInfoMap_.find(rOCName)->second.theFEWChannel_;
100 unsigned int ROCToFEConfiguration::getFEWROCAddress(
const std::string& rOCName)
const
102 return nameToInfoMap_.find(rOCName)->second.theFEWROCAddress_;
106 unsigned int ROCToFEConfiguration::getFERChannel(
const std::string& rOCName)
const
108 return nameToInfoMap_.find(rOCName)->second.theFERChannel_;