All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SimpleChannelStatusService.cc
Go to the documentation of this file.
1 /**
2  * @file SimpleChannelStatusService.cc
3  * @brief Service implementation for channel quality info
4  * @author Gianluca Petrillo (petrillo@fnal.gov)
5  * @date November 24th, 2014
6  * @see SimpleChannelStatusService.h
7  */
8 
9 // Our header
11 
12 // LArSoft libraries
14 
15 // Framework libraries
16 #include "art/Framework/Services/Registry/ServiceHandle.h"
17 #include "messagefacility/MessageLogger/MessageLogger.h"
18 
19 namespace lariov {
20 
21  //----------------------------------------------------------------------------
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()
41 
42 
43 }
void Setup(raw::ChannelID_t MaxChannel, raw::ChannelID_t MaxGoodChannel)
Sets the service provider up.
SimpleChannelStatusService(fhicl::ParameterSet const &pset)
Constructor: reads the channel IDs from the configuration.
Class providing information about the quality of channels.
unsigned int ChannelID_t
Type representing the ID of a readout channel.
Definition: RawTypes.h:28
std::unique_ptr< SimpleChannelStatus > fProvider
Service for channel quality info.
art framework interface to geometry description