DetectorPropertiesServiceStandard.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 // DetectorPropertiesServiceStandard.h
3 //
4 // Service interface for DetectorProperties functions
5 //
6 // jpaley@fnal.gov
7 //
8 ////////////////////////////////////////////////////////////////////////
9 #ifndef DETECTORPROPERTIESSERVICESTANDARD_H
10 #define DETECTORPROPERTIESSERVICESTANDARD_H
11 
16 #include "fhiclcpp/ParameterSet.h"
17 #include "fhiclcpp/types/Atom.h"
20 
21 /// General LArSoft Utilities
22 namespace detinfo {
23 
24  /**
25  * Configuration parameters
26  * -------------------------
27  *
28  * This service passes the whole configuration down to its service provider,
29  * but it also reacts to:
30  * - *InheritNumberTimeSamples* (boolean; default: false): if true, the
31  * configuration database in the ROOT input file is queried and if a
32  * configuration for this service is found, it's used instead of the
33  * one from the current FHiCL configuration
34  *
35  */
36 
38 
39  public:
40  // the following is currently not used for validation,
41  // but only for documentation
43 
44  // service-specific configuration
46  fhicl::Name("InheritNumberTimeSamples"),
47  fhicl::Comment(""),
48  false /* default value */
49  };
50 
51  // provider configuration
53 
54  }; // ServiceConfiguration_t
55 
56  // this enables art to print the configuration help:
58 
60 
61  private:
63  getDataForJob(DetectorClocksData const& clockData) const override
64  {
65  return fProp.DataFor(clockData);
66  }
67 
69  getDataFor(art::Event const&, DetectorClocksData const& clockData) const override
70  {
71  return fProp.DataFor(clockData);
72  }
73 
74  void postOpenFile(const std::string& filename);
75 
77  fhicl::ParameterSet fPS; ///< Original parameter set.
78 
79  bool fInheritNumberTimeSamples; ///< Flag saying whether to inherit NumberTimeSamples
80 
82 
83  }; // class DetectorPropertiesService
84 } // namespace detinfo
85 
88  SHARED)
89 #endif // DETECTORPROPERTIESSERVICESTANDARD_H
DetectorPropertiesData getDataFor(art::Event const &, DetectorClocksData const &clockData) const override
DetectorPropertiesData getDataForJob(DetectorClocksData const &clockData) const override
std::string string
Definition: nybbler.cc:12
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
ChannelGroupService::Name Name
string filename
Definition: train.py:213
DetectorPropertiesData DataFor(detinfo::DetectorClocksData const &clock_data) const override
DetectorPropertiesServiceStandard(fhicl::ParameterSet const &pset, art::ActivityRegistry &reg)
fhicl::ParameterSet fPS
Original parameter set.
General LArSoft Utilities.
static constexpr double ps
Definition: Units.h:99
bool isDetectorPropertiesServiceStandard(const fhicl::ParameterSet &ps) const
#define Comment
Contains all timing reference information for the detector.
bool fInheritNumberTimeSamples
Flag saying whether to inherit NumberTimeSamples.
detinfo::DetectorPropertiesStandard::Configuration_t ProviderConfiguration