All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 "art/Framework/Services/Registry/ServiceDeclarationMacros.h"
28 namespace fhicl { class ParameterSet; }
29 
30 // C/C++ standard libraries
31 #include <memory> // std::unique_ptr<>
32 #include <vector>
33 
34 // LArSoft includes
36 
37 namespace geo
38 {
39 
40  /**
41  * @brief Interface to a service with detector-specific geometry knowledge
42  *
43  * This is an interface to a service that virtualizes detector or
44  * experiment-specific knowledge that is required by the Geometry service.
45  * Experiments implement the private virtual functions within a concrete
46  * service provider class to perform the specified actions as appropriate for
47  * the particular experiment.
48  * It is expected that such requests will occur infrequently within a job.
49  * Calculations that occur frequently should be handled via interfaces that
50  * are passed back to the Geometry service.
51  *
52  * @note The public interface for this service cannot be overriden.
53  * The experiment-specific sub-classes should implement only the private
54  * methods without promoting their visibility.
55  */
57  {
58  public:
59  using AuxDetChannelMapAlgPtr_t = std::unique_ptr<AuxDetChannelMapAlg>;
60 
61  /// Virtual destructor; does nothing
62  virtual ~AuxDetExptGeoHelperInterface() = default;
63 
64  /**
65  * @brief Configure and initialize the channel map
66  * @param sortingParameters parameters for the channel map algorithm
67  * @param geom pointer to a geometry description object
68  * @return a (shared) pointer to the channel mapping algorithm
69  *
70  * This method creates a new ChannelMapAlg according to the geometry and
71  * specified configuration, then it configures the geometry itself
72  * according to the channel map (usually, it resorts the data).
73  */
75  ConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const & sortingParameters) const;
76 
77  private:
78 
79  /// Implementation of ConfigureChannelMapAlg (pure virtual)
81  doConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const & sortingParameters) const = 0;
82 
83  }; // end ExptGeoHelperInterface class declaration
84 
85 
86 
87  //-------------------------------------------------------------------------------------------
88 
89  inline
91  AuxDetExptGeoHelperInterface::ConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const& sortingParameters) const
92  {
93  return doConfigureAuxDetChannelMapAlg(sortingParameters);
94  }
95 
96 }
97 
98 DECLARE_ART_SERVICE_INTERFACE(geo::AuxDetExptGeoHelperInterface, SHARED)
99 
100 #endif // GEO_ExptGeoHelperInterface_h
std::unique_ptr< AuxDetChannelMapAlg > AuxDetChannelMapAlgPtr_t
virtual ~AuxDetExptGeoHelperInterface()=default
Virtual destructor; does nothing.
virtual AuxDetChannelMapAlgPtr_t doConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const &sortingParameters) const =0
Implementation of ConfigureChannelMapAlg (pure virtual)
AuxDetChannelMapAlgPtr_t ConfigureAuxDetChannelMapAlg(fhicl::ParameterSet const &sortingParameters) const
Configure and initialize the channel map.
Interface to a service with detector-specific geometry knowledge.