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::SimpleChannelStatusoperator() () const
 
fhicl::ParameterSet CreateConfiguration () const
 
std::unique_ptr< lariov::SimpleChannelStatusCreateStatus () 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  {
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()
ps_atom_t encode(std::string const &)
Definition: coding.cc:87
const std::set< unsigned int > fNoisyChannels
void put(std::string const &key)
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  {
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.
raw::ChannelID_t MaxChannel() const
Returns the ID of the largest known channel.
const raw::ChannelID_t fMaxPresentChannel
fhicl::ParameterSet CreateConfiguration() const
virtual ChannelSet_t NoisyChannels() const override
Returns a copy of set of noisy channel IDs for the current run.
static Config * config
Definition: config.cpp:1054
virtual ChannelSet_t BadChannels() const override
Returns a copy of set of bad channel IDs for the current run.
Class providing information about the quality of channels.
const raw::ChannelID_t fMaxChannel
QTextStream & endl(QTextStream &s)
std::string to_string() const
Definition: ParameterSet.h:153
std::unique_ptr<lariov::SimpleChannelStatus> StatusConfiguration::operator() ( void  ) 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: