LArSoft
v10_04_05
Liquid Argon Software toolkit - https://larsoft.org/
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
maybe_default_detector_name.cxx
Go to the documentation of this file.
1
#include "
larcorealg/Geometry/details/maybe_default_detector_name.h
"
2
3
#include "
fhiclcpp/ParameterSet.h
"
4
5
#include "boost/filesystem/path.hpp"
6
7
namespace
geo::details
{
8
std::string
maybe_default_detector_name
(
fhicl::ParameterSet
const
& pset,
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
}
ParameterSet.h
maybe_default_detector_name.h
geo::details
Definition:
element_iterators.h:19
geo::details::maybe_default_detector_name
std::string maybe_default_detector_name(fhicl::ParameterSet const &pset, std::string const &filename)
Definition:
maybe_default_detector_name.cxx:8
fhicl::ParameterSet::get_if_present
std::optional< T > get_if_present(std::string const &key) const
Definition:
ParameterSet.h:267
fhicl::ParameterSet
Definition:
ParameterSet.h:36
larcorealg
v10_00_02
source
larcorealg
Geometry
details
maybe_default_detector_name.cxx
Generated on Wed Mar 5 2025 17:09:28 for LArSoft by
1.8.11