$treeview $search $mathjax $extrastylesheet
otsdaq
v2_03_00
$projectbrief
|
$projectbrief
|
$searchbox |
00001 //#include <otsdaq_demo/otsdaq-demo/FEInterfaces/FEWROtsUDPFSSRInterface.h> 00002 //#include 00003 //<otsdaq_demo/otsdaq-demo/UserConfigurationDataFormats/FEWROtsUDPFSSRInterfaceConfiguration.h> 00004 #include "otsdaq-core/ConfigurationInterface/ConfigurationManager.h" 00005 #include "otsdaq-core/FECore/FEVInterfacesManager.h" 00006 //#include "otsdaq-core/TableDataFormats/TableGroupKey.h" 00007 00008 //#include "otsdaq-demo/FEInterfaces/FEWOtsGenericInterface.h" 00009 #include "otsdaq-core/FECore/FEVInterface.h" 00010 00011 #include <iostream> 00012 #include <memory> 00013 00014 #include "otsdaq-core/ConfigurationInterface/ConfigurationInterface.h" 00015 #include "otsdaq-core/PluginMakers/MakeInterface.h" 00016 #include "otsdaq-core/PluginMakers/MakeTable.h" 00017 00018 //#include "otsdaq-components/FEInterfaces/FEWOtsUDPFSSRInterface.h" 00019 //#include "otsdaq-components/FEInterfaces/FEWOtsUDPHCALInterface.h" 00020 00021 using namespace ots; 00022 00023 int main() 00024 { 00025 // Variables 00026 std::string supervisorContextUID_ = "MainContext"; 00027 std::string supervisorApplicationUID_ = "FeSupervisor0"; 00028 std::string ConfigurationAlias_ = "Physics"; 00029 std::string theSupervisorConfigurationPath_ = 00030 supervisorContextUID_ + "/LinkToApplicationTable/" + supervisorApplicationUID_ + 00031 "/LinkToSupervisorTable"; 00032 // const int TableGroupKeyValue_ = 0; 00033 // std::shared_ptr<TableGroupKey> theConfigurationTableGroupKey_(new 00034 // TableGroupKey(TableGroupKeyValue_)); 00035 00037 // INSERTED GLOBALLY IN THE CODE 00038 ConfigurationManager* theConfigurationManager_ = new ConfigurationManager; 00039 FEVInterfacesManager theFEVInterfacesManager_( 00040 theConfigurationManager_->getNode(ConfigurationManager::XDAQ_CONTEXT_TABLE_NAME), 00041 theSupervisorConfigurationPath_); 00042 00043 std::pair<std::string /*group name*/, TableGroupKey> theGroup = 00044 theConfigurationManager_->getTableGroupFromAlias(ConfigurationAlias_); 00045 00046 theConfigurationManager_->loadTableGroup(theGroup.first, theGroup.second, true); 00047 00048 theFEVInterfacesManager_.configure(); 00050 exit(0); 00052 // Getting just the informations about the FEWInterface 00053 00054 // const std::string feId_ = "0"; 00055 // ConfigurationInterface* theInterface_; 00056 // theInterface_ = ConfigurationInterface::getInstance(true);//FIXME This will be 00057 // variable because if false it takes it from the database Configurations* 00058 // configurations = 0; 00059 // theInterface_->get((TableBase*&)configurations,"Configurations"); 00060 // TableBase* frontEndConfiguration = 0; 00061 // theInterface_->get(frontEndConfiguration, "FEConfiguration", 00062 // theConfigurationTableGroupKey_, 00063 // configurations); 00064 // 00065 // const std::string interfaceName = "FEOtsUDPFSSRInterface"; 00066 // const std::string configurationName = interfaceName + "Table"; 00067 // 00068 // //FEWOtsUDPHardwareConfiguration* interfaceConfiguration_ = 0; 00069 // 00070 // TableBase* interfaceConfiguration_ = 00071 // 0;//makeConfigurationInterface(configurationName); 00072 // 00073 // if(configurations->findKOC(*theConfigurationTableGroupKey_,configurationName)) 00074 // { 00075 // theInterface_->get(interfaceConfiguration_, configurationName, 00076 // theConfigurationTableGroupKey_, configurations); 00077 // } 00078 // 00079 // std::unique_ptr<FEVInterface> theFEWInterface = makeInterface(interfaceName, 00080 // feId_, (FEInterfaceTableBase*)interfaceConfiguration_); 00081 00083 00084 return 0; 00085 }