All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
StatusConfiguration Class Reference

Public Member Functions

 StatusConfiguration (const raw::ChannelID_t MaxChannel, const raw::ChannelID_t MaxPresentChannel, const std::set< unsigned int > BadChannels, const std::set< unsigned int > NoisyChannels)
 
std::unique_ptr
< lariov::SimpleChannelStatus
operator() () const
 
fhicl::ParameterSet CreateConfiguration () const
 
std::unique_ptr
< lariov::SimpleChannelStatus
CreateStatus () const
 

Public Attributes

const raw::ChannelID_t fMaxChannel
 
const raw::ChannelID_t fMaxPresentChannel
 
const std::set< unsigned int > fBadChannels
 
const std::set< unsigned int > fNoisyChannels
 

Detailed Description

Definition at line 67 of file SimpleChannelStatus_test.cxx.

Constructor & Destructor Documentation

StatusConfiguration::StatusConfiguration ( const raw::ChannelID_t  MaxChannel,
const raw::ChannelID_t  MaxPresentChannel,
const std::set< unsigned int >  BadChannels,
const std::set< unsigned int >  NoisyChannels 
)
inline

Definition at line 74 of file SimpleChannelStatus_test.cxx.

80  : fMaxChannel(MaxChannel)
81  , fMaxPresentChannel(MaxPresentChannel)
82  , fBadChannels(BadChannels)
83  , fNoisyChannels(NoisyChannels)
84  {}
const raw::ChannelID_t fMaxPresentChannel
const std::set< unsigned int > fNoisyChannels
const raw::ChannelID_t fMaxChannel
const std::set< unsigned int > fBadChannels

Member Function Documentation

fhicl::ParameterSet StatusConfiguration::CreateConfiguration ( ) const
inline

Definition at line 90 of file SimpleChannelStatus_test.cxx.

90  {
91  fhicl::ParameterSet cfg;
92 
93  std::any any {fhicl::detail::encode(fNoisyChannels)};
94  cfg.put("NoisyChannels", fNoisyChannels);
95  cfg.put("BadChannels", fBadChannels);
96 
97  return cfg;
98  } // CreateConfiguration()
::fhicl::detail::ps_atom_t encode(Interval< Args...> const &iv)
Encodes a quantity interval into a FHiCL parameter set atom.
const std::set< unsigned int > fNoisyChannels
const std::set< unsigned int > fBadChannels
std::unique_ptr<lariov::SimpleChannelStatus> StatusConfiguration::CreateStatus ( ) const
inline

Definition at line 101 of file SimpleChannelStatus_test.cxx.

101  {
102  fhicl::ParameterSet config = CreateConfiguration();
103 
105  = new lariov::SimpleChannelStatus(config);
107 
108  std::cout
109  << "\nConfiguration:"
110  << "\n { " << config.to_string() << " }"
111  << "\nLoaded from configuration:"
112  << "\n - " << pStatus->BadChannels().size() << " bad channels: "
113  << pStatus->BadChannels()
114  << "\n - " << pStatus->NoisyChannels().size() << " noisy channels: "
115  << pStatus->NoisyChannels()
116  << "\n - largest channel ID: " << pStatus->MaxChannel()
117  << ", largest present: " << pStatus->MaxChannelPresent()
118  << std::endl;
119 
120  return std::unique_ptr<lariov::SimpleChannelStatus>(pStatus);
121  } // CreateStatus()
raw::ChannelID_t MaxChannelPresent() const
Returns the ID of the largest present channel.
void Setup(raw::ChannelID_t MaxChannel, raw::ChannelID_t MaxGoodChannel)
Sets the service provider up.
virtual ChannelSet_t BadChannels() const override
Returns a copy of set of bad channel IDs for the current run.
raw::ChannelID_t MaxChannel() const
Returns the ID of the largest known channel.
virtual ChannelSet_t NoisyChannels() const override
Returns a copy of set of noisy channel IDs for the current run.
const raw::ChannelID_t fMaxPresentChannel
fhicl::ParameterSet CreateConfiguration() const
Class providing information about the quality of channels.
const raw::ChannelID_t fMaxChannel
BEGIN_PROLOG could also be cout
std::unique_ptr<lariov::SimpleChannelStatus> StatusConfiguration::operator() ( ) const
inline

Definition at line 86 of file SimpleChannelStatus_test.cxx.

87  { return CreateStatus(); }
std::unique_ptr< lariov::SimpleChannelStatus > CreateStatus() const

Member Data Documentation

const std::set<unsigned int> StatusConfiguration::fBadChannels

Definition at line 71 of file SimpleChannelStatus_test.cxx.

const raw::ChannelID_t StatusConfiguration::fMaxChannel

Definition at line 69 of file SimpleChannelStatus_test.cxx.

const raw::ChannelID_t StatusConfiguration::fMaxPresentChannel

Definition at line 70 of file SimpleChannelStatus_test.cxx.

const std::set<unsigned int> StatusConfiguration::fNoisyChannels

Definition at line 72 of file SimpleChannelStatus_test.cxx.


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