SimpleChannelStatusService.h
Go to the documentation of this file.
1 /**
2  * @file SimpleChannelStatusService.h
3  * @brief Service for channel quality info
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date November 24th, 2014
6  * @see ChannelStatusService.h SimpleChannelStatus.h
7  *
8  * Service serving a SimpleChannelStatus.
9  */
10 
11 
12 #ifndef SIMPLECHANNELFILTERSERVICE_H
13 #define SIMPLECHANNELFILTERSERVICE_H
14 
15 // LArSoft libraries
19 
20 // C/C++ standard libraries
21 #include <memory> //std::unique_ptr<>
22 
23 namespace art {
24  class Run;
25 } // namespace art
26 
27 
28 namespace lariov {
29 
30  /**
31  * @brief Service providing information about the quality of channels
32  *
33  * This is a simple implementation of the ChannelStatusService
34  * service interface.
35  * Channel lists are passed by FHiCL configuration.
36  * Note that there is no support for conditions varying with time.
37  *
38  * @note This implementation requires Geometry service
39  *
40  * Configuration parameters
41  * =========================
42  *
43  * In addition to the parameters supported by filter::SimpleChannelStatus,
44  * this service supports:
45  *
46  * - *service_type* (string): must be set to "SimpleChannelStatusService"
47  *
48  */
50  public:
51 
52  /// Constructor: reads the channel IDs from the configuration
54 
55 
56  private:
57 
58  virtual ChannelStatusProvider const& DoGetProvider() const override
59  { return *DoGetProviderPtr(); }
60  virtual ChannelStatusProvider const* DoGetProviderPtr() const override
61  { return fProvider.get(); }
62 
63  /// Update valid channel range
64  void UpdateChannelRange();
65 
66  /// React to a new run
67  void postBeginRun(art::Run const& run);
68 
69  std::unique_ptr<SimpleChannelStatus> fProvider;
70 
71  }; // class SimpleChannelStatusService
72 
73 
74 } // namespace lariov
75 
78 
79 #endif // SIMPLECHANNELFILTERSERVICE_H
virtual ChannelStatusProvider const * DoGetProviderPtr() const override
Returns a pointer to the service provider.
DECLARE_ART_SERVICE_INTERFACE_IMPL(MySharedService, art::test::MyServiceInterface, SHARED) DEFINE_ART_SERVICE_INTERFACE_IMPL(MySharedService
Definition: Run.h:17
Service providing information about the quality of channels.
Channel quality provider with information from configuration file.
virtual ChannelStatusProvider const & DoGetProvider() const override
Returns a reference to the service provider.
Class providing information about the quality of channels.
Filters for channels, events, etc.
Interface for experiment-specific service for channel quality info.
std::unique_ptr< SimpleChannelStatus > fProvider
Service providing information about the quality of channels.