19 #ifndef ICARUSALG_GEOMETRY_LOADSTANDARDICARUSGEOMETRY_H
20 #define ICARUSALG_GEOMETRY_LOADSTANDARDICARUSGEOMETRY_H
29 #include "messagefacility/MessageLogger/MessageLogger.h"
30 #include "fhiclcpp/make_ParameterSet.h"
31 #include "fhiclcpp/ParameterSet.h"
32 #include "cetlib/filepath_maker.h"
41 namespace icarus::geo {
43 (std::string
const& configPath);
86 inline std::unique_ptr<::geo::GeometryCore>
88 (std::string
const& configPath)
97 using namespace std::string_literals;
100 static std::string
const MagicToolName
101 {
"ICARUSsplitInductionChannelMapSetupTool"s };
106 fhicl::ParameterSet config;
108 std::unique_ptr<cet::filepath_maker>
const policy
109 { cet::lookup_policy_selector{}.select(
"permissive",
"FHICL_FILE_PATH") };
110 fhicl::make_ParameterSet(configPath, *policy, config);
117 std::string mfConfigPath;
118 if (!mf::isMessageProcessingSetUp()) {
119 for (std::string
const&
path: {
"services.message"s,
"message"s }) {
120 if (!config.is_key_to_table(
path))
continue;
126 std::string geomConfigPath;
127 for (std::string
const&
path: {
"services.Geometry"s,
"Geometry"s }) {
128 if (!config.is_key_to_table(
path))
continue;
129 geomConfigPath =
path;
132 fhicl::ParameterSet
const geomConfig = geomConfigPath.empty()
133 ? config: config.get<fhicl::ParameterSet>(geomConfigPath);
135 if (!geomConfig.is_key_to_table(
"ChannelMapping")) {
136 throw std::runtime_error(
"icarus::geo::LoadStandardICARUSgeometry():"
137 " FHiCL configuration does not have a `ChannelMapping` section"
138 " (this is a ICARUS convention).\nConfiguration:\n"
139 + std::string(80,
'-') +
'\n'
140 + geomConfig.to_indented_string(1U)
141 + std::string(80,
'-') +
'\n'
145 std::string
const channelMappingToolType
146 = geomConfig.get(
"ChannelMapping.tool_type",
""s);
147 if (channelMappingToolType != MagicToolName) {
148 throw std::runtime_error(
"icarus::geo::LoadStandardICARUSgeometry() "
149 ": unexpected value '" + channelMappingToolType
150 +
"' for `ChannelMapping.tool_type` configuration parameter (expected: '"
151 + MagicToolName +
"').\nConfiguration:\n"
152 + std::string(80,
'-') +
'\n'
153 + geomConfig.to_indented_string(1U)
154 + std::string(80,
'-') +
'\n'
163 if (!mfConfigPath.empty())
164 mf::StartMessageFacility(config.get<fhicl::ParameterSet>(mfConfigPath));
168 return SetupICARUSGeometry<icarus::ICARUSChannelMapAlg>(geomConfig);
173 #endif // ICARUSALG_GEOMETRY_LOADSTANDARDICARUSGEOMETRY_H
Channel mapping algorithms for ICARUS detector.
std::unique_ptr<::geo::GeometryCore > LoadStandardICARUSgeometry(std::string const &configPath)
Returns an instance of geo::GeometryCore with ICARUS geometry loaded.
Functions to facilitate ICARUS geometry initialization outside art.
BEGIN_PROLOG triggeremu_data_config_icarus settings PMTADCthresholds sequence::icarus_stage0_multiTPC_TPC physics sequence::icarus_stage0_EastHits_TPC physics sequence::icarus_stage0_WestHits_TPC physics producers purityana0 caloskimCalorimetryCryoE physics caloskimCalorimetryCryoW physics path
Access the description of detector geometry.
then echo File list $list not found else cat $list while read file do echo $file sed s