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