ExptGeoHelperInterface.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 /// \file ExptGeoHelperInterface.h
3 /// \brief Interface to a service that handles any experiment-specific knowledge
4 /// that is needed by the Geometry service.
5 ///
6 /// This is an interface to a service that virtualizes detector or experiment-specific
7 /// knowledge that is required by the Geometry service. Experiments implement the
8 /// private virtual functions within a concrete service provider class to perform
9 /// the specified actions as appropriate for the particular experiment. It is
10 /// expected that such requests will occur infrequently within a job. Calculations
11 /// that occur frequently should be handled via interfaces that are passed
12 /// back to the Geometry service.
13 ///
14 /// Note that the public interface for this service cannot be overriden. The
15 /// experiment-specific sub-classes should implement only the private methods
16 /// without promoting their visibility.
17 ///
18 /// \author rs@fnal.gov
19 ////////////////////////////////////////////////////////////////////////////////
20 
21 
22 #ifndef GEO_ExptGeoHelperInterface_h
23 #define GEO_ExptGeoHelperInterface_h
24 
25 
26 // framework libraries
28 #include "fhiclcpp/ParameterSet.h"
29 
30 // C/C++ standard libraries
31 #include <memory> // std::shared_ptr<>
32 #include <string>
33 #include <vector>
34 
35 // prototypes of geometry classes
36 namespace geo
37 {
38  class ChannelMapAlg;
39 }
40 
41 namespace geo
42 {
43 
44  /**
45  * @brief Interface to a service with detector-specific geometry knowledge
46  *
47  * This is an interface to a service that virtualizes detector or
48  * experiment-specific knowledge that is required by the Geometry service.
49  * Experiments implement the private virtual function within a concrete
50  * service provider class to perform the specified actions as appropriate for
51  * the particular experiment.
52  *
53  * It is expected that such requests will occur infrequently within a job.
54  * Calculations that occur frequently should be handled via interfaces that
55  * are passed back to the Geometry service.
56  *
57  * @note The public interface for this service cannot be overriden.
58  * The experiment-specific sub-classes should implement only the private
59  * methods without promoting their visibility.
60  */
62  {
63  public:
64  using ChannelMapAlgPtr_t = std::unique_ptr<ChannelMapAlg>;
65 
66  /// Virtual destructor; does nothing
67  virtual ~ExptGeoHelperInterface() = default;
68 
69  /**
70  * @brief Configure and initialize the channel map
71  * @param sortingParameters parameters for the channel map algorithm
72  * @param detectorName name of detector described by geometry
73  * @return a (shared) pointer to the channel mapping algorithm
74  *
75  * This method creates a new ChannelMapAlg according to the geometry and
76  * specified configuration.
77  */
79  ConfigureChannelMapAlg(fhicl::ParameterSet const& sortingParameters,
80  std::string const& detectorName) const
81  {
82  return doConfigureChannelMapAlg(sortingParameters, detectorName);
83  }
84 
85  private:
86 
87  virtual
89  doConfigureChannelMapAlg(fhicl::ParameterSet const& sortingParameters,
90  std::string const& detectorName) const = 0;
91 
92  }; // end ExptGeoHelperInterface class declaration
93 
94 }
95 
97 
98 #endif // GEO_ExptGeoHelperInterface_h
virtual ChannelMapAlgPtr_t doConfigureChannelMapAlg(fhicl::ParameterSet const &sortingParameters, std::string const &detectorName) const =0
std::string string
Definition: nybbler.cc:12
Interface to a service with detector-specific geometry knowledge.
virtual ~ExptGeoHelperInterface()=default
Virtual destructor; does nothing.
std::unique_ptr< ChannelMapAlg > ChannelMapAlgPtr_t
ChannelMapAlgPtr_t ConfigureChannelMapAlg(fhicl::ParameterSet const &sortingParameters, std::string const &detectorName) const
Configure and initialize the channel map.
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)
LArSoft geometry interface.
Definition: ChannelGeo.h:16