All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IcarusGeometryHelper.h
Go to the documentation of this file.
1 /**
2  * @file icaruscode/Geometry/IcarusGeometryHelper.h
3  * @brief Geometry helper service for ICARUS geometries.
4  * @see `icaruscode/Geometry/IcarusGeometryHelper_service.cc`
5  *
6  * Handles Icarus-specific information for the generic Geometry service
7  * within LArSoft. Derived from the `geo::ExptGeoHelperInterface` class.
8  */
9 
10 #ifndef ICARUSCODE_GEOMETRY_ICARUSGEOMETRYHELPER_H
11 #define ICARUSCODE_GEOMETRY_ICARUSGEOMETRYHELPER_H
12 
13 // LArSoft libraries
14 // #include "larcore/Geometry/ChannelMapSetupTool.h"
16 
17 // framework libraries
18 #include "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
19 #include "fhiclcpp/ParameterSet.h"
20 
21 // C/C++ standard libraries
22 #include <memory> // std::unique_ptr<>, std::shared_ptr<>
23 
24 
25 // -----------------------------------------------------------------------------
26 // Forward declarations
27 namespace geo { class ChannelMapAlg; }
28 namespace icarus { class IcarusGeometryHelper; }
29 
30 // -----------------------------------------------------------------------------
31 /**
32  * @brief Implementation of `geo::ExptGeoHelperInterface` for ICARUS.
33  *
34  * This service utilizes a _art_ tool to create the proper channel mapper
35  * algorithm instance.
36  *
37  *
38  * Configuration
39  * --------------
40  *
41  * * *Mapper* (tool parameter set):
42  * the configuration includes a `tool_type` parameter to identify the tool
43  * to use, and the rest of the configuration is passed to the tool itself.
44  * The standard tool (_not default!_) is `icarus::ICARUSChannelMapAlgTool`
45  * By default, uses `icarus::ICARUSSingleInductionChannelMapAlgTool`
46  * (legacy).
47  *
48  *
49  */
51 
52  public:
53 
54  /// Constructor: records the configuration.
55  IcarusGeometryHelper(fhicl::ParameterSet const& pset): fPset(pset) {}
56 
57  private:
58 
59  fhicl::ParameterSet fPset; ///< Copy of configuration parameter set.
60 
61  // --- BEGIN -- Virtual interface definitions --------------------------------
63  fhicl::ParameterSet const& /* sortingParameters */,
64  std::string const& detectorName
65  ) const override;
66 
67  // --- END -- Virtual interface definitions ----------------------------------
68 
69  /// Creates and returns the channel mapping instance via a _art_ tool.
70  std::unique_ptr<geo::ChannelMapAlg> makeChannelMapping
71  (fhicl::ParameterSet const& parameters) const;
72 
73 }; // icarus::IcarusGeometryHelper
74 
75 
76 // -----------------------------------------------------------------------------
77 DECLARE_ART_SERVICE_INTERFACE_IMPL(icarus::IcarusGeometryHelper,
79  SHARED)
80 
81 #endif // ICARUSCODE_GEOMETRY_ICARUSGEOMETRYHELPER_H
std::unique_ptr< geo::ChannelMapAlg > makeChannelMapping(fhicl::ParameterSet const &parameters) const
Creates and returns the channel mapping instance via a art tool.
fhicl::ParameterSet fPset
Copy of configuration parameter set.
Interface to a service with detector-specific geometry knowledge.
IcarusGeometryHelper(fhicl::ParameterSet const &pset)
Constructor: records the configuration.
std::unique_ptr< ChannelMapAlg > ChannelMapAlgPtr_t
Implementation of geo::ExptGeoHelperInterface for ICARUS.
Interface to a service that handles any experiment-specific knowledge that is needed by the Geometry ...
virtual ChannelMapAlgPtr_t doConfigureChannelMapAlg(fhicl::ParameterSet const &, std::string const &detectorName) const override