1 #include "otsdaq-components/DetectorConfiguration/DACStream.h"
2 #include "otsdaq-core/ConfigurationInterface/ConfigurationTree.h"
3 #include "otsdaq-components/DetectorConfiguration/FSSRDACsConfiguration.h"
9 DACStream::DACStream(
void)
13 DACStream::~DACStream(
void)
17 void DACStream::makeStream(
const ConfigurationTree& feToDetectorTree)
19 theChannelStreamMap_.clear();
20 std::multimap<unsigned int, ROCStream>::iterator currentElement;
21 std::string detectorType =
"";
22 auto feWriterDetectorList = feToDetectorTree.getChildren();
25 for(
auto& it : feWriterDetectorList)
27 const ConfigurationTree& detectorConfiguration = it.second.getNode(
"LinkToDetectorTable");
28 const ConfigurationTree& dacsConfiguration = detectorConfiguration.getNode(
"LinkToDACsTable");
29 const ConfigurationTree& maskConfiguration = detectorConfiguration.getNode(
"LinkToMaskTable");
34 currentElement = theChannelStreamMap_.insert(std::pair<unsigned int, ROCStream>(it.second.getNode(
"FEWriterChannel").getValue<
unsigned int>(),
ROCStream()));
35 currentElement->second.setDetectorID (it.first);
36 detectorType = detectorConfiguration.getNode(
"DetectorType").getValue<std::string>();
37 currentElement->second.setROCType (detectorType);
38 currentElement->second.setROCStatus (detectorConfiguration.getNode(ViewColumnInfo::COL_NAME_STATUS).getValue<
bool>());
39 currentElement->second.setFEWROCAddress(it.second.getNode(
"FEWriterDetectorAddress").getValue<
unsigned int>());
40 currentElement->second.setROCDACs (dacsMaker.getROCDACs(dacsConfiguration));
43 currentElement->second.setROCMask (maskConfiguration.getNode(
"KillMask").getValue<std::string>());