$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 #include "otsdaq-core/ConfigurationInterface/ConfigurationManager.h" 00002 #include "otsdaq-core/Macros/TablePluginMacros.h" 00003 #include "otsdaq-core/TablePluginDataFormats/TemplateTable.h" 00004 00005 #include <iostream> 00006 #include <string> 00007 00008 using namespace ots; 00009 00010 //============================================================================== 00011 TemplateTable::TemplateTable(void) : TableBase("TemplateTable") 00012 { 00014 // WARNING: the field names used in C++ MUST match the Table INFO // 00016 } 00017 00018 //============================================================================== 00019 TemplateTable::~TemplateTable(void) {} 00020 00021 //============================================================================== 00022 void TemplateTable::init(ConfigurationManager* configManager) 00023 { 00024 // do something to validate or refactor table 00025 __COUT__ << "*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*&*" << std::endl; 00026 __COUT__ << configManager->__SELF_NODE__ << std::endl; 00027 00028 // __COUT__ << configManager->getNode(this->getTableName()).getValueAsString() 00029 // << std::endl; 00030 00031 std::string value; 00032 std::vector<std::pair<std::string, ConfigurationTree> > children = 00033 configManager->__SELF_NODE__.getChildren(); 00034 for(auto& childPair : children) 00035 { 00036 // do something for each row in table 00037 __COUT__ << childPair.first << std::endl; 00038 __COUT__ << childPair.second.getNode(colNames_.colColumnName_) << std::endl; 00039 childPair.second.getNode(colNames_.colColumnName_).getValue(value); 00040 } 00041 } 00042 00043 DEFINE_OTS_TABLE(TemplateTable)