1 #include "artdaq-core-demo/Overlays/FragmentType.hh"
10 std::transform(t_string.begin(), t_string.end(), t_string.begin(), toupper);
11 for (
auto& it :
names)
13 if (it.second == t_string)
return it.first;
15 return FragmentType::INVALID;
25 return "INVALID/UNKNOWN";
30 auto output = artdaq::Fragment::MakeSystemTypeMap();
31 for (
const auto& name :
names)
33 output[name.first] = name.second;
std::unordered_map< FragmentType, std::string > const names
List of names (in the order defined below) of the User types defined in artdaq_core_demo.
std::string fragmentTypeToString(FragmentType val)
Look up the name of the given FragmentType.
std::map< artdaq::Fragment::type_t, std::string > makeFragmentTypeMap()
Create a list of all Fragment types defined by this package, in the format that RawInput expects...
FragmentType toFragmentType(std::string t_string)
Lookup the type code for a fragment by its string name.