4 #include "otsdaq-components/FEInterfaces/FEOtsUDPTemplateInterface.h"
5 #include "otsdaq/ConfigurationInterface/ConfigurationInterface.h"
6 #include "otsdaq/ConfigurationInterface/ConfigurationManager.h"
7 #include "otsdaq/TableCore/TableGroupKey.h"
16 int main(
int argc,
char** argv)
19 const int supervisorInstance_ = 1;
20 const unsigned int configurationKeyValue_ = 1;
22 ConfigurationManager* theConfigurationManager_ =
new ConfigurationManager();
24 std::string XDAQContextConfigurationName_ =
"XDAQContextTable";
25 std::string supervisorContextUID_ =
"mainContext";
26 std::string supervisorApplicationUID_ =
"FESupervisor";
27 std::string interfaceUID_ =
"ExampleInterface0";
28 std::string supervisorConfigurationPath_ =
29 "/" + supervisorContextUID_ +
"/LinkToApplicationConfiguration/" +
30 supervisorApplicationUID_ +
"/LinkToSupervisorConfiguration";
31 const ConfigurationTree theXDAQContextConfigTree_ =
32 theConfigurationManager_->getNode(XDAQContextConfigurationName_);
34 std::string configurationGroupName =
"defaultConfig";
35 std::pair<std::string, TableGroupKey> theGroup(configurationGroupName,
36 TableGroupKey(configurationKeyValue_));
38 theConfigurationManager_->loadTableGroup(theGroup.first, theGroup.second,
true);
40 FEOtsUDPTemplateInterface* theInterface_ =
new FEOtsUDPTemplateInterface(
42 theXDAQContextConfigTree_,
43 supervisorConfigurationPath_ +
"/LinkToFEInterfaceTable/" + interfaceUID_ +
44 "/LinkToFETypeConfiguration");
45 std::cout <<
"Done with new" << std::endl;
47 theInterface_->configure();
48 theInterface_->start(std::string(argv[1]));
49 unsigned int second = 1000;
50 unsigned int time = 60 * 60 * second;
51 unsigned int counter = 0;
52 while(counter++ < time)
54 theInterface_->running();
57 theInterface_->stop();