LArSoft  v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
maybe_default_detector_name.cxx
Go to the documentation of this file.
2 
4 
5 #include "boost/filesystem/path.hpp"
6 
7 namespace geo::details {
9  std::string const& filename)
10  {
11  if (auto name = pset.get_if_present<std::string>("Name")) { return *name; }
12  return boost::filesystem::path{filename}.stem().native();
13  }
14 }
std::string maybe_default_detector_name(fhicl::ParameterSet const &pset, std::string const &filename)
std::optional< T > get_if_present(std::string const &key) const
Definition: ParameterSet.h:267