Public Member Functions | Private Member Functions | Private Attributes | List of all members
lariov::SimpleChannelStatusService Class Reference

Service providing information about the quality of channels. More...

#include <SimpleChannelStatusService.h>

Inheritance diagram for lariov::SimpleChannelStatusService:
lariov::ChannelStatusService

Public Member Functions

 SimpleChannelStatusService (fhicl::ParameterSet const &pset)
 Constructor: reads the channel IDs from the configuration. More...
 
- Public Member Functions inherited from lariov::ChannelStatusService
virtual ~ChannelStatusService ()=default
 Destructor. More...
 
ChannelStatusProvider const * provider () const
 
ChannelStatusProvider const & GetProvider () const
 Returns a reference to the service provider. More...
 
ChannelStatusProvider const & GetFilter () const
 
ChannelStatusProvider const * GetProviderPtr () const
 Returns a pointer to the service provider. More...
 
ChannelStatusProvider const * GetFilterPtr () const
 

Private Member Functions

virtual ChannelStatusProvider const & DoGetProvider () const override
 Returns a reference to the service provider. More...
 
virtual ChannelStatusProvider const * DoGetProviderPtr () const override
 Returns a pointer to the service provider. More...
 
void UpdateChannelRange ()
 Update valid channel range. More...
 
void postBeginRun (art::Run const &run)
 React to a new run. More...
 

Private Attributes

std::unique_ptr< SimpleChannelStatusfProvider
 

Additional Inherited Members

- Public Types inherited from lariov::ChannelStatusService
using provider_type = ChannelStatusProvider
 

Detailed Description

Service providing information about the quality of channels.

This is a simple implementation of the ChannelStatusService service interface. Channel lists are passed by FHiCL configuration. Note that there is no support for conditions varying with time.

Note
This implementation requires Geometry service

Configuration parameters

In addition to the parameters supported by filter::SimpleChannelStatus, this service supports:

Definition at line 49 of file SimpleChannelStatusService.h.

Constructor & Destructor Documentation

lariov::SimpleChannelStatusService::SimpleChannelStatusService ( fhicl::ParameterSet const &  pset)

Constructor: reads the channel IDs from the configuration.

Definition at line 23 of file SimpleChannelStatusService_service.cc.

24  {
25  SimpleChannelStatus* simple_filter = new SimpleChannelStatus(pset);
26 
27  raw::ChannelID_t MaxChannel
29 
30  simple_filter->Setup(MaxChannel);
31 
32  fProvider.reset(simple_filter);
33 
34  mf::LogInfo("SimpleChannelStatusService") << "Loaded from configuration:"
35  << "\n - " << fProvider->BadChannels().size() << " bad channels"
36  << "\n - " << fProvider->NoisyChannels().size() << " noisy channels"
37  << "\n - largest channel ID: " << fProvider->MaxChannel()
38  << ", largest present: " << fProvider->MaxChannelPresent()
39  ;
40 
41  } // SimpleChannelStatusService::SimpleChannelStatusService()
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::unique_ptr< SimpleChannelStatus > fProvider

Member Function Documentation

virtual ChannelStatusProvider const& lariov::SimpleChannelStatusService::DoGetProvider ( ) const
inlineoverrideprivatevirtual

Returns a reference to the service provider.

Implements lariov::ChannelStatusService.

Definition at line 58 of file SimpleChannelStatusService.h.

59  { return *DoGetProviderPtr(); }
virtual ChannelStatusProvider const * DoGetProviderPtr() const override
Returns a pointer to the service provider.
virtual ChannelStatusProvider const* lariov::SimpleChannelStatusService::DoGetProviderPtr ( ) const
inlineoverrideprivatevirtual

Returns a pointer to the service provider.

Implements lariov::ChannelStatusService.

Definition at line 60 of file SimpleChannelStatusService.h.

61  { return fProvider.get(); }
std::unique_ptr< SimpleChannelStatus > fProvider
void lariov::SimpleChannelStatusService::postBeginRun ( art::Run const &  run)
private

React to a new run.

void lariov::SimpleChannelStatusService::UpdateChannelRange ( )
private

Update valid channel range.

Member Data Documentation

std::unique_ptr<SimpleChannelStatus> lariov::SimpleChannelStatusService::fProvider
private

Definition at line 69 of file SimpleChannelStatusService.h.


The documentation for this class was generated from the following files: