$treeview $search $mathjax $extrastylesheet
otsdaq_components
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #include "otsdaq-components/DetectorConfiguration/DACStream.h" 00002 #include "otsdaq-components/DetectorConfiguration/FSSRDACsConfiguration.h" 00003 #include "otsdaq-core/ConfigurationInterface/ConfigurationTree.h" 00004 00005 using namespace ots; 00006 00007 //============================================================================== 00008 DACStream::DACStream(void) {} 00009 00010 //============================================================================== 00011 DACStream::~DACStream(void) {} 00012 00013 //============================================================================== 00014 void DACStream::makeStream(const ConfigurationTree& feToDetectorTree) 00015 { 00016 theChannelStreamMap_.clear(); 00017 std::multimap<unsigned int, ROCStream>::iterator currentElement; 00018 std::string detectorType = ""; 00019 auto feWriterDetectorList = feToDetectorTree.getChildren(); 00020 00021 FSSRDACsConfiguration dacsMaker; 00022 for(auto& it : feWriterDetectorList) 00023 { 00024 const ConfigurationTree& detectorConfiguration = 00025 it.second.getNode("LinkToDetectorTable"); 00026 const ConfigurationTree& dacsConfiguration = 00027 detectorConfiguration.getNode("LinkToDACsTable"); 00028 const ConfigurationTree& maskConfiguration = 00029 detectorConfiguration.getNode("LinkToMaskTable"); 00030 //__COUT__ << feToDetectorTree << std::endl; 00031 //__COUT__ << detectorConfiguration << std::endl; 00032 //__COUT__ << dacsConfiguration << std::endl; 00033 //__COUT__ << dacsConfiguration << std::endl; 00034 currentElement = theChannelStreamMap_.insert(std::pair<unsigned int, ROCStream>( 00035 it.second.getNode("FEWriterChannel").getValue<unsigned int>(), ROCStream())); 00036 currentElement->second.setDetectorID(it.first); 00037 detectorType = 00038 detectorConfiguration.getNode("DetectorType").getValue<std::string>(); 00039 currentElement->second.setROCType(detectorType); 00040 currentElement->second.setROCStatus( 00041 detectorConfiguration.getNode(TableViewColumnInfo::COL_NAME_STATUS) 00042 .getValue<bool>()); 00043 currentElement->second.setFEWROCAddress( 00044 it.second.getNode("FEWriterDetectorAddress").getValue<unsigned int>()); 00045 currentElement->second.setROCDACs(dacsMaker.getROCDACs(dacsConfiguration)); 00046 // __COUT__ << "MASK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" << std::endl; 00047 // __COUT__ << maskConfiguration.getNode("KillMask").getValue<std::string>() 00048 //<< std::endl; 00049 currentElement->second.setROCMask( 00050 maskConfiguration.getNode("KillMask").getValue<std::string>()); 00051 } 00052 }