All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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
< SimpleChannelStatus
fProvider
 

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 22 of file SimpleChannelStatusService.cc.

23  {
24  SimpleChannelStatus* simple_filter = new SimpleChannelStatus(pset);
25 
26  raw::ChannelID_t MaxChannel
27  = raw::ChannelID_t(art::ServiceHandle<geo::Geometry const>()->Nchannels() - 1);
28 
29  simple_filter->Setup(MaxChannel);
30 
31  fProvider.reset(simple_filter);
32 
33  mf::LogInfo("SimpleChannelStatusService") << "Loaded from configuration:"
34  << "\n - " << fProvider->BadChannels().size() << " bad channels"
35  << "\n - " << fProvider->NoisyChannels().size() << " noisy channels"
36  << "\n - largest channel ID: " << fProvider->MaxChannel()
37  << ", largest present: " << fProvider->MaxChannelPresent()
38  ;
39 
40  } // SimpleChannelStatusService::SimpleChannelStatusService()
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: