AuxDetExptGeoHelperInterface.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////////////
2 /// \file AuxDetExptGeoHelperInterface.h
3 /// \brief Interface to a service that handles any experiment-specific knowledge
4 /// that is needed by the AuxDetGeometry 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_AuxDetExptGeoHelperInterface_h
23 #define GEO_AuxDetExptGeoHelperInterface_h
24 
25 
26 // framework libraries
27 #include "fhiclcpp/ParameterSet.h"
29 
30 // C/C++ standard libraries
31 #include <memory> // std::unique_ptr<>
32 #include <vector>
33 
34 
35 // prototypes of geometry classes
36 namespace geo
37 {
38  class AuxDetChannelMapAlg;
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 functions within a concrete
50  * service provider class to perform the specified actions as appropriate for
51  * the particular experiment.
52  * It is expected that such requests will occur infrequently within a job.
53  * Calculations that occur frequently should be handled via interfaces that
54  * are passed back to the Geometry service.
55  *
56  * @note The public interface for this service cannot be overriden.
57  * The experiment-specific sub-classes should implement only the private
58  * methods without promoting their visibility.
59  */
61  {
62  public:
63  using AuxDetChannelMapAlgPtr_t = std::unique_ptr<AuxDetChannelMapAlg>;
64 
65  /// Virtual destructor; does nothing
66  virtual ~AuxDetExptGeoHelperInterface() = default;
67 
68  /**
69  * @brief Configure and initialize the channel map
70  * @param sortingParameters parameters for the channel map algorithm
71  * @param geom pointer to a geometry description object
72  * @return a (shared) pointer to the channel mapping algorithm
73  *
74  * This method creates a new ChannelMapAlg according to the geometry and
75  * specified configuration, then it configures the geometry itself
76  * according to the channel map (usually, it resorts the data).
77  */
79  ConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const & sortingParameters) const;
80 
81  private:
82 
83  /// Implementation of ConfigureChannelMapAlg (pure virtual)
85  doConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const & sortingParameters) const = 0;
86 
87  }; // end ExptGeoHelperInterface class declaration
88 
89 
90 
91  //-------------------------------------------------------------------------------------------
92 
93  inline
96  {
97  return doConfigureAuxDetChannelMapAlg(sortingParameters);
98  }
99 
100 }
101 
103 
104 #endif // GEO_ExptGeoHelperInterface_h
virtual AuxDetChannelMapAlgPtr_t doConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const &sortingParameters) const =0
Implementation of ConfigureChannelMapAlg (pure virtual)
std::unique_ptr< AuxDetChannelMapAlg > AuxDetChannelMapAlgPtr_t
virtual ~AuxDetExptGeoHelperInterface()=default
Virtual destructor; does nothing.
AuxDetChannelMapAlgPtr_t ConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const &sortingParameters) const
Configure and initialize the channel map.
#define DECLARE_ART_SERVICE_INTERFACE(svc, scope)
LArSoft geometry interface.
Definition: ChannelGeo.h:16
Interface to a service with detector-specific geometry knowledge.