1 #ifndef artdaq_ArtModules_ArtdaqFragmentNamingService_h
2 #define artdaq_ArtModules_ArtdaqFragmentNamingService_h
4 #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
5 #include "artdaq-core/Plugins/FragmentNameHelper.hh"
33 auto unidentified_instance_name = ps.get<std::string>(
"unidentified_instance_name",
"unidentified");
34 auto extraTypes = ps.get<std::vector<std::pair<artdaq::Fragment::type_t, std::string>>>(
"fragment_type_map", std::vector<std::pair<artdaq::Fragment::type_t, std::string>>());
35 auto fragmentNameHelperPluginType = ps.get<std::string>(
"helper_plugin",
"Artdaq");
37 nameHelper_ = artdaq::makeNameHelper(fragmentNameHelperPluginType, unidentified_instance_name, extraTypes);
60 std::pair<bool, std::string>
ArtdaqFragmentNamingServiceInterface(fhicl::ParameterSet const &ps)
ArtdaqFragmentNamingServiceInterface constructor.
virtual ~ArtdaqFragmentNamingServiceInterface()=default
Default virtual destructor.
std::pair< bool, std::string > GetInstanceNameForFragment(artdaq::Fragment const &fragment) const
Returns the product instance name for the specified fragment, based on the types that have been speci...
std::set< std::string > GetAllProductInstanceNames() const
Returns the full set of product instance names which may be present in the data, based on the types t...
std::shared_ptr< artdaq::FragmentNameHelper > nameHelper_
FragmentNameHelper plugin used to resolve Fragment names.
std::string GetUnidentifiedInstanceName() const
Get the name used for unidentified Fragment types.
std::string GetInstanceNameForType(artdaq::Fragment::type_t type_id) const
Returns the basic translation for the specified type. Must be implemented by derived classes...
Interface for ArtdaqFragmentNamingService. This interface is declared to art as part of the required ...