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 std::cout <<
"Usage: " << std::string(argv[0]) <<
" <run number>" << std::endl;
24 const unsigned int configurationKeyValue_ = 1;
26 ConfigurationManager* theConfigurationManager_ =
new ConfigurationManager();
28 std::string XDAQContextTableName_ =
"XDAQContextTable";
29 std::string supervisorContextUID_ =
"mainContext";
30 std::string supervisorApplicationUID_ =
"FESupervisor";
31 std::string interfaceUID_ =
"ExampleInterface0";
32 std::string supervisorConfigurationPath_ =
33 "/" + supervisorContextUID_ +
"/LinkToApplicationConfiguration/" +
34 supervisorApplicationUID_ +
"/LinkToSupervisorConfiguration";
35 const ConfigurationTree theXDAQContextConfigTree_ =
36 theConfigurationManager_->getNode(XDAQContextTableName_);
38 std::string configurationGroupName =
"defaultConfig";
39 std::pair<std::string, TableGroupKey> theGroup(configurationGroupName,
40 TableGroupKey(configurationKeyValue_));
42 theConfigurationManager_->loadTableGroup(theGroup.first, theGroup.second,
true);
44 FEOtsUDPTemplateInterface* theInterface_ =
new FEOtsUDPTemplateInterface(
46 theXDAQContextConfigTree_,
47 supervisorConfigurationPath_ +
"/LinkToFEInterfaceTable/" + interfaceUID_ +
48 "/LinkToFETypeConfiguration");
49 std::cout <<
"Done with new" << std::endl;
51 theInterface_->configure();
52 theInterface_->start(std::string(argv[1]));
53 unsigned int second = 1000;
54 unsigned int time = 60 * 60 * second;
55 unsigned int counter = 0;
56 while(counter++ < time)
58 theInterface_->running();
61 theInterface_->stop();