otsdaq  v2_04_01
ARTDAQConsumerConfiguration_configuration.cc
1 #include <iostream>
2 #include "otsdaq-core/ConfigurationPluginDataFormats/ARTDAQConsumerTable.h"
3 #include "otsdaq-coreMacros/TablePluginMacros.h"
4 
5 using namespace ots;
6 
7 //==============================================================================
8 ARTDAQConsumerConfiguration::ARTDAQConsumerConfiguration(void)
9  : TableBase("ARTDAQConsumerConfiguration")
10 {
12  // WARNING: the names and the order MUST match the ones in the enum //
14  // FSSRDACsConfigurationInfo.xml
15  //<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
16  //<ROOT xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17  // xsi:noNamespaceSchemaLocation="TableInfo.xsd">
18  // <CONFIGURATION Name="ARTDAQConsumerConfiguration">
19  // <VIEW Name="ARTDAQ_CONSUMER_CONFIGURATION" Type="File,Database,DatabaseTest">
20  // <COLUMN Name="ProcessorID" StorageName="PROCESSOR_ID"
21  // DataType="VARCHAR2" /> // <COLUMN Name="Status"
22  // StorageName="STATUS" DataType="VARCHAR2" /> <COLUMN
23  // Name="ConfigurationString" StorageName="CONFIGURATION_STRING"
24  // DataType="VARCHAR2"/>
25  // </VIEW>
26  // </CONFIGURATION>
27  //</ROOT>
28 }
29 
30 //==============================================================================
31 ARTDAQConsumerConfiguration::~ARTDAQConsumerConfiguration(void) {}
32 
33 //==============================================================================
34 void ARTDAQConsumerConfiguration::init(ConfigurationManager* configManager) {}
35 
36 //==============================================================================
37 const std::string ARTDAQConsumerConfiguration::getConfigurationString(
38  std::string processorUID) const
39 {
40  std::string tmpConfiguration;
41  TableBase::activeTableView_->getValue(
42  tmpConfiguration,
43  TableBase::activeTableView_->findRow(ProcessorID, processorUID),
44  ConfigurationString);
45  return tmpConfiguration;
46 }
47 
48 DEFINE_OTS_CONFIGURATION(ARTDAQConsumerConfiguration)