Class providing information about the quality of channels. More...
#include <SIOVChannelStatusProvider.h>
Public Member Functions | |
SIOVChannelStatusProvider (fhicl::ParameterSet const &pset) | |
Constructor. More... | |
virtual | ~SIOVChannelStatusProvider ()=default |
Default destructor. More... | |
const ChannelStatus & | GetChannelStatus (raw::ChannelID_t channel) const |
Returns Channel Status. More... | |
Status_t | Status (raw::ChannelID_t channel) const override |
Returns a status integer with arbitrary meaning. More... | |
void | UpdateTimeStamp (DBTimeStamp_t ts) |
Update event time stamp. More... | |
Single channel queries | |
Returns whether the specified channel is physical and connected to wire | |
bool | IsPresent (raw::ChannelID_t channel) const override |
Returns whether the specified channel is physical and connected to wire. More... | |
bool | IsBad (raw::ChannelID_t channel) const override |
Returns whether the specified channel is bad in the current run. More... | |
bool | IsNoisy (raw::ChannelID_t channel) const override |
Returns whether the specified channel is noisy in the current run. More... | |
bool | IsGood (raw::ChannelID_t channel) const override |
Returns whether the specified channel is physical and good. More... | |
Global channel queries | |
Returns a copy of set of good channel IDs for the current run | |
ChannelSet_t | GoodChannels () const override |
Returns a copy of set of good channel IDs for the current run. More... | |
ChannelSet_t | BadChannels () const override |
Returns a copy of set of bad channel IDs for the current run. More... | |
ChannelSet_t | NoisyChannels () const override |
Returns a copy of set of noisy channel IDs for the current run. More... | |
Configuration functions | |
Prepares the object to provide information about the specified time | |
bool | Update (DBTimeStamp_t) |
void | AddNoisyChannel (raw::ChannelID_t ch) |
Allows a service to add to the list of noisy channels. More... | |
Public Member Functions inherited from lariov::DatabaseRetrievalAlg | |
DatabaseRetrievalAlg (const std::string &foldername, const std::string &url, const std::string &url2="", const std::string &tag="", bool usesqlite=false, bool testmode=false) | |
Constructors. More... | |
DatabaseRetrievalAlg (fhicl::ParameterSet const &p) | |
virtual | ~DatabaseRetrievalAlg () |
Default destructor. More... | |
virtual void | Reconfigure (fhicl::ParameterSet const &p) |
Configure using fhicl::ParameterSet. More... | |
bool | UpdateFolder (DBTimeStamp_t ts) |
Return true if fFolder is successfully updated. More... | |
const std::string & | URL () const |
Get connection information. More... | |
const std::string & | FolderName () const |
const std::string & | Tag () const |
const IOVTimeStamp & | Begin () const |
Get Timestamp information. More... | |
const IOVTimeStamp & | End () const |
Public Member Functions inherited from lariov::ChannelStatusProvider | |
ChannelStatusProvider ()=default | |
Default constructor. More... | |
ChannelStatusProvider (ChannelStatusProvider const &)=delete | |
ChannelStatusProvider (ChannelStatusProvider &&)=delete | |
ChannelStatusProvider & | operator= (ChannelStatusProvider const &)=delete |
ChannelStatusProvider & | operator= (ChannelStatusProvider &&)=delete |
virtual | ~ChannelStatusProvider ()=default |
Virtual destructor; destructs nothing. More... | |
virtual bool | HasStatus (raw::ChannelID_t channel) const |
Returns whether the specified status is a valid one. More... | |
Static Public Member Functions | |
static DBChannelID_t | rawToDBChannel (raw::ChannelID_t channel) |
Converts LArSoft channel ID in the one proper for the DB. More... | |
Static Public Member Functions inherited from lariov::ChannelStatusProvider | |
static bool | IsValidStatus (Status_t status) |
Returns whether the specified status is a valid one. More... | |
Private Member Functions | |
bool | DBUpdate () const |
Do actual database updates. More... | |
bool | DBUpdate (DBTimeStamp_t ts) const |
ChannelSet_t | GetChannelsWithStatus (chStatus status) const |
Private Attributes | |
DBTimeStamp_t | fEventTimeStamp |
DBTimeStamp_t | fCurrentTimeStamp |
DataSource::ds | fDataSource |
Snapshot< ChannelStatus > | fData |
Snapshot< ChannelStatus > | fNewNoisy |
ChannelStatus | fDefault |
Additional Inherited Members | |
Public Types inherited from lariov::ChannelStatusProvider | |
using | Status_t = unsigned short |
type representing channel status More... | |
using | ChannelSet_t = std::set< raw::ChannelID_t > |
Type of set of channel IDs. More... | |
Static Public Attributes inherited from lariov::ChannelStatusProvider | |
static constexpr Status_t | InvalidStatus = std::numeric_limits<Status_t>::max() |
Value or invalid status. More... | |
Protected Attributes inherited from lariov::DatabaseRetrievalAlg | |
std::unique_ptr< DBFolder > | fFolder |
Class providing information about the quality of channels.
This class serves information read from a FHiCL configuration file and/or a database.
LArSoft interface to this class is through the service SIOVChannelStatusService.
Definition at line 37 of file SIOVChannelStatusProvider.h.
lariov::SIOVChannelStatusProvider::SIOVChannelStatusProvider | ( | fhicl::ParameterSet const & | pset | ) |
Constructor.
Definition at line 27 of file SIOVChannelStatusProvider.cxx.
|
virtualdefault |
Default destructor.
void lariov::SIOVChannelStatusProvider::AddNoisyChannel | ( | raw::ChannelID_t | ch | ) |
Allows a service to add to the list of noisy channels.
Definition at line 203 of file SIOVChannelStatusProvider.cxx.
|
overridevirtual |
Returns a copy of set of bad channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 187 of file SIOVChannelStatusProvider.cxx.
|
private |
Do actual database updates.
Definition at line 93 of file SIOVChannelStatusProvider.cxx.
|
private |
Definition at line 100 of file SIOVChannelStatusProvider.cxx.
const ChannelStatus & lariov::SIOVChannelStatusProvider::GetChannelStatus | ( | raw::ChannelID_t | channel | ) | const |
Returns Channel Status.
Definition at line 136 of file SIOVChannelStatusProvider.cxx.
|
private |
Definition at line 152 of file SIOVChannelStatusProvider.cxx.
|
overridevirtual |
Returns a copy of set of good channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 180 of file SIOVChannelStatusProvider.cxx.
|
inlineoverridevirtual |
Returns whether the specified channel is bad in the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 65 of file SIOVChannelStatusProvider.h.
|
inlineoverridevirtual |
Returns whether the specified channel is physical and good.
Reimplemented from lariov::ChannelStatusProvider.
Definition at line 75 of file SIOVChannelStatusProvider.h.
|
inlineoverridevirtual |
Returns whether the specified channel is noisy in the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 70 of file SIOVChannelStatusProvider.h.
|
inlineoverridevirtual |
Returns whether the specified channel is physical and connected to wire.
Implements lariov::ChannelStatusProvider.
Definition at line 60 of file SIOVChannelStatusProvider.h.
|
overridevirtual |
Returns a copy of set of noisy channel IDs for the current run.
Implements lariov::ChannelStatusProvider.
Definition at line 197 of file SIOVChannelStatusProvider.cxx.
|
inlinestatic |
Converts LArSoft channel ID in the one proper for the DB.
Definition at line 112 of file SIOVChannelStatusProvider.h.
|
inlineoverridevirtual |
Returns a status integer with arbitrary meaning.
Reimplemented from lariov::ChannelStatusProvider.
Definition at line 80 of file SIOVChannelStatusProvider.h.
bool lariov::SIOVChannelStatusProvider::Update | ( | DBTimeStamp_t | ts | ) |
Definition at line 84 of file SIOVChannelStatusProvider.cxx.
void lariov::SIOVChannelStatusProvider::UpdateTimeStamp | ( | DBTimeStamp_t | ts | ) |
Update event time stamp.
Definition at line 76 of file SIOVChannelStatusProvider.cxx.
|
mutableprivate |
Definition at line 125 of file SIOVChannelStatusProvider.h.
|
mutableprivate |
Definition at line 128 of file SIOVChannelStatusProvider.h.
|
private |
Definition at line 127 of file SIOVChannelStatusProvider.h.
|
private |
Definition at line 130 of file SIOVChannelStatusProvider.h.
|
private |
Definition at line 124 of file SIOVChannelStatusProvider.h.
|
private |
Definition at line 129 of file SIOVChannelStatusProvider.h.