1 #include "otsdaq-components/DetectorConfiguration/DACStream.h"
2 #include "otsdaq-components/DetectorConfiguration/FSSRDACsConfiguration.h"
3 #include "otsdaq-core/ConfigurationInterface/ConfigurationTree.h"
8 DACStream::DACStream(
void) {}
11 DACStream::~DACStream(
void) {}
14 void DACStream::makeStream(
const ConfigurationTree& feToDetectorTree)
16 theChannelStreamMap_.clear();
17 std::multimap<unsigned int, ROCStream>::iterator currentElement;
18 std::string detectorType =
"";
19 auto feWriterDetectorList = feToDetectorTree.getChildren();
22 for(
auto& it : feWriterDetectorList)
24 const ConfigurationTree& detectorConfiguration =
25 it.second.getNode(
"LinkToDetectorTable");
26 const ConfigurationTree& dacsConfiguration =
27 detectorConfiguration.getNode(
"LinkToDACsTable");
28 const ConfigurationTree& maskConfiguration =
29 detectorConfiguration.getNode(
"LinkToMaskTable");
34 currentElement = theChannelStreamMap_.insert(std::pair<unsigned int, ROCStream>(
35 it.second.getNode(
"FEWriterChannel").getValue<
unsigned int>(),
ROCStream()));
36 currentElement->second.setDetectorID(it.first);
38 detectorConfiguration.getNode(
"DetectorType").getValue<std::string>();
39 currentElement->second.setROCType(detectorType);
40 currentElement->second.setROCStatus(
41 detectorConfiguration.getNode(TableViewColumnInfo::COL_NAME_STATUS)
43 currentElement->second.setFEWROCAddress(
44 it.second.getNode(
"FEWriterDetectorAddress").getValue<
unsigned int>());
45 currentElement->second.setROCDACs(dacsMaker.getROCDACs(dacsConfiguration));
49 currentElement->second.setROCMask(
50 maskConfiguration.getNode(
"KillMask").getValue<std::string>());