LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
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 |
void | UpdateTimeStamp (DBTimeStamp_t ts) |
Update event time stamp. 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 |
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 bad in the current run. 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 bad 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) |
Allows a service to add to the list of noisy channels. More... | |
void | AddNoisyChannel (raw::ChannelID_t ch) |
Allows a service to add to the list of noisy channels. 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... | |
Protected Attributes | |
std::unique_ptr< DBFolder > | fFolder |
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 |
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 26 of file SIOVChannelStatusProvider.cxx.
References lariov::DataSource::Database, lariov::DataSource::Default, fData, fDataSource, fDefault, file, lariov::DataSource::File, fhicl::ParameterSet::get(), lariov::ChannelStatus::GetStatusFromInt(), lariov::kGOOD, lariov::ChData::SetChannel(), and lariov::ChannelStatus::SetStatus().
|
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 206 of file SIOVChannelStatusProvider.cxx.
References fNewNoisy, IsBad(), IsPresent(), lariov::kNOISY, rawToDBChannel(), and lariov::ChannelStatus::SetStatus().
|
override |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 191 of file SIOVChannelStatusProvider.cxx.
References GetChannelsWithStatus(), lariov::kDEAD, and lariov::kLOWNOISE.
|
inlineinherited |
Get Timestamp information.
Definition at line 63 of file DatabaseRetrievalAlg.h.
Referenced by lariov::SIOVPmtGainProvider::DBUpdate(), lariov::SIOVElectronicsCalibProvider::DBUpdate(), lariov::DetPedestalRetrievalAlg::DBUpdate(), and DBUpdate().
|
private |
Do actual database updates.
Definition at line 97 of file SIOVChannelStatusProvider.cxx.
References fEventTimeStamp.
Referenced by GetChannelStatus(), and Update().
|
private |
Definition at line 105 of file SIOVChannelStatusProvider.cxx.
References lariov::DatabaseRetrievalAlg::Begin(), lariov::DataSource::Database, lariov::DatabaseRetrievalAlg::End(), fCurrentTimeStamp, fData, fDataSource, lariov::DatabaseRetrievalAlg::fFolder, lariov::ChannelStatus::GetStatusFromInt(), lariov::ChannelStatus::SetStatus(), and lariov::DatabaseRetrievalAlg::UpdateFolder().
|
inlineinherited |
Definition at line 64 of file DatabaseRetrievalAlg.h.
Referenced by lariov::SIOVPmtGainProvider::DBUpdate(), lariov::SIOVElectronicsCalibProvider::DBUpdate(), lariov::DetPedestalRetrievalAlg::DBUpdate(), and DBUpdate().
|
inlineinherited |
Definition at line 59 of file DatabaseRetrievalAlg.h.
const ChannelStatus & lariov::SIOVChannelStatusProvider::GetChannelStatus | ( | raw::ChannelID_t | channel | ) | const |
Returns Channel Status.
Definition at line 146 of file SIOVChannelStatusProvider.cxx.
References DBUpdate(), lariov::DataSource::Default, fData, fDataSource, fDefault, fNewNoisy, and rawToDBChannel().
Referenced by GetChannelsWithStatus().
|
private |
Definition at line 157 of file SIOVChannelStatusProvider.cxx.
References lariov::DataSource::Default, fDataSource, fDefault, GetChannelStatus(), and lariov::ChannelStatus::Status().
Referenced by BadChannels(), GoodChannels(), and NoisyChannels().
|
override |
Returns a copy of set of bad channel IDs for the current run.
Definition at line 185 of file SIOVChannelStatusProvider.cxx.
References GetChannelsWithStatus(), and lariov::kGOOD.
|
inlineoverride |
Returns whether the specified channel is bad in the current run.
Definition at line 65 of file SIOVChannelStatusProvider.h.
References lariov::ChannelStatus::IsDead(), and lariov::ChannelStatus::IsLowNoise().
Referenced by AddNoisyChannel().
|
inlineoverride |
Returns whether the specified channel is physical and good.
Definition at line 78 of file SIOVChannelStatusProvider.h.
References lariov::ChannelStatus::IsGood().
|
inlineoverride |
Returns whether the specified channel is noisy in the current run.
Definition at line 72 of file SIOVChannelStatusProvider.h.
References lariov::ChannelStatus::IsNoisy().
|
inlineoverride |
Returns whether the specified channel is bad in the current run.
Definition at line 59 of file SIOVChannelStatusProvider.h.
References lariov::ChannelStatus::IsPresent().
Referenced by AddNoisyChannel().
|
override |
Returns a copy of set of noisy channel IDs for the current run.
Definition at line 200 of file SIOVChannelStatusProvider.cxx.
References GetChannelsWithStatus(), and lariov::kNOISY.
|
inlinestatic |
Converts LArSoft channel ID in the one proper for the DB.
Definition at line 115 of file SIOVChannelStatusProvider.h.
Referenced by AddNoisyChannel(), and GetChannelStatus().
|
virtualinherited |
Configure using fhicl::ParameterSet.
Reimplemented in lariov::DetPedestalRetrievalAlg, lariov::SIOVElectronicsCalibProvider, and lariov::SIOVPmtGainProvider.
Definition at line 11 of file DatabaseRetrievalAlg.cxx.
References lariov::DatabaseRetrievalAlg::fFolder, and fhicl::ParameterSet::get().
Referenced by lariov::SIOVPmtGainProvider::Reconfigure(), lariov::SIOVElectronicsCalibProvider::Reconfigure(), and lariov::DetPedestalRetrievalAlg::Reconfigure().
|
inlineoverride |
Definition at line 84 of file SIOVChannelStatusProvider.h.
References lariov::ChannelStatus::Status(), and tca::Update().
|
inlineinherited |
Definition at line 60 of file DatabaseRetrievalAlg.h.
bool lariov::SIOVChannelStatusProvider::Update | ( | DBTimeStamp_t | ts | ) |
Allows a service to add to the list of noisy channels.
Definition at line 87 of file SIOVChannelStatusProvider.cxx.
References DBUpdate(), fEventTimeStamp, and fNewNoisy.
|
inlineinherited |
Return true if fFolder is successfully updated.
Definition at line 55 of file DatabaseRetrievalAlg.h.
Referenced by lariov::SIOVPmtGainProvider::DBUpdate(), lariov::SIOVElectronicsCalibProvider::DBUpdate(), lariov::DetPedestalRetrievalAlg::DBUpdate(), and DBUpdate().
void lariov::SIOVChannelStatusProvider::UpdateTimeStamp | ( | DBTimeStamp_t | ts | ) |
Update event time stamp.
Definition at line 77 of file SIOVChannelStatusProvider.cxx.
References fEventTimeStamp, and fNewNoisy.
Referenced by DECLARE_ART_SERVICE_INTERFACE_IMPL().
|
inlineinherited |
Get connection information.
Definition at line 58 of file DatabaseRetrievalAlg.h.
|
mutableprivate |
Definition at line 126 of file SIOVChannelStatusProvider.h.
Referenced by DBUpdate().
|
mutableprivate |
Definition at line 129 of file SIOVChannelStatusProvider.h.
Referenced by DBUpdate(), GetChannelStatus(), and SIOVChannelStatusProvider().
|
private |
Definition at line 128 of file SIOVChannelStatusProvider.h.
Referenced by DBUpdate(), GetChannelStatus(), GetChannelsWithStatus(), and SIOVChannelStatusProvider().
|
private |
Definition at line 131 of file SIOVChannelStatusProvider.h.
Referenced by GetChannelStatus(), GetChannelsWithStatus(), and SIOVChannelStatusProvider().
|
private |
Definition at line 125 of file SIOVChannelStatusProvider.h.
Referenced by DBUpdate(), Update(), and UpdateTimeStamp().
|
protectedinherited |
Definition at line 67 of file DatabaseRetrievalAlg.h.
Referenced by lariov::SIOVPmtGainProvider::DBUpdate(), lariov::SIOVElectronicsCalibProvider::DBUpdate(), lariov::DetPedestalRetrievalAlg::DBUpdate(), DBUpdate(), and lariov::DatabaseRetrievalAlg::Reconfigure().
|
private |
Definition at line 130 of file SIOVChannelStatusProvider.h.
Referenced by AddNoisyChannel(), GetChannelStatus(), Update(), and UpdateTimeStamp().