00001 #include "artdaq/Application/Routing/RoutingMasterPolicy.hh" 00002 #include "artdaq/Application/Routing/PolicyMacros.hh" 00003 #include "fhiclcpp/ParameterSet.h" 00004 #include "tracemf.h" 00005 #define TRACE_NAME "NoOp_policy" 00006 namespace artdaq 00007 { 00011 class NoOpPolicy : public RoutingMasterPolicy 00012 { 00013 public: 00020 explicit NoOpPolicy(fhicl::ParameterSet ps) : RoutingMasterPolicy(ps) {} 00021 00025 virtual ~NoOpPolicy() = default; 00026 00031 detail::RoutingPacket GetCurrentTable() override; 00032 }; 00033 00034 detail::RoutingPacket NoOpPolicy::GetCurrentTable() 00035 { 00036 TLOG(12) << "NoOpPolicy::GetCurrentTable start"; 00037 auto tokens = getTokensSnapshot(); 00038 detail::RoutingPacket output; 00039 for(auto token : *tokens.get()) 00040 { 00041 output.emplace_back(detail::RoutingPacketEntry(next_sequence_id_++, token)); 00042 } 00043 00044 TLOG(12) << "NoOpPolicy::GetCurrentTable return"; 00045 return output; 00046 } 00047 } 00048 00049 DEFINE_ARTDAQ_ROUTING_POLICY(artdaq::NoOpPolicy)