All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Attributes | Static Public Attributes | List of all members
sbn::OpDetWaveformMeta Struct Reference

Derivative information from raw::OpDetWaveform data. More...

#include <OpDetWaveformMeta.h>

Classes

struct  bits
 Namespace for bits in the flags. More...
 

Public Types

using Flags_t = ::util::flags::FlagSet< 32U >
 Type of flag interface. More...
 

Public Member Functions

`raw::OpDetWaveform` interface replica

Partial mirror of raw::OpDetWaveform interface is provided here to facilitate static polymorphism ("metaprogramming"). This version reflects the interface as found in LArSoft 9.36.00.

These methods are supposed to return a value equivalent to the one from the original waveform.

Note
At this time TimeStamp() returns directly startTime, implicitly assuming that raw::OpDetWaveform::TimeStamp() time scale matches the electronics time scale. If this assumption is broken, an additional data member needs to be added.
raw::Channel_t ChannelNumber () const
 Returns the channnel ID of the PMT waveform. More...
 
raw::TimeStamp_t TimeStamp () const
 Returns the timestamp at the start of the waveform. More...
 
Bit query

Note that each bit may be in an undefined state. The definition of a bit may be tested directly; for example: info.flags.isDefined(bits::WithBeamGate) returns whether info has the beam gate bit defined.

bool withBeamGate () const
 Returns whether the time interval includes for sure the beam opening time. More...
 
bool withoutBeamGate () const
 
bool withTrigger () const
 Returns whether the time interval includes for sure the trigger time. More...
 
bool withoutTrigger () const
 

Public Attributes

raw::Channel_t channel = NoChannel
 ID of the PMT channel. More...
 
std::size_t nSamples = 0
 Number of samples in the waveform. More...
 
double startTime = NoTime
 Time of the first sample in the waveform [us]. More...
 
double endTime = NoTime
 Time at the end of the last sample in the waveform [us]. More...
 
Flags_t flags
 All flags (may be set, unset or undefined); see bits. More...
 

Static Public Attributes

static constexpr double NoTime = std::numeric_limits<double>::lowest()
 Magic value denoting the absence of time information. More...
 
static constexpr raw::Channel_t NoChannel = std::numeric_limits<raw::Channel_t>::max()
 

Detailed Description

Derivative information from raw::OpDetWaveform data.

This objects stores some of the information from raw::OpDetWaveform, with the notable exception of the content of the waveform. In particular, it reports the time range covered by one waveform, and it may store whether the range includes the beam gate opening time.

Times are in the same scale as for raw::OpDetWaveform, that is the electronics time scale. The exact type of that time is detinfo::timescales::electronics_time.

Definition at line 35 of file OpDetWaveformMeta.h.

Member Typedef Documentation

Type of flag interface.

Definition at line 40 of file OpDetWaveformMeta.h.

Member Function Documentation

raw::Channel_t sbn::OpDetWaveformMeta::ChannelNumber ( ) const
inline

Returns the channnel ID of the PMT waveform.

Definition at line 99 of file OpDetWaveformMeta.h.

99 { return channel; }
raw::Channel_t channel
ID of the PMT channel.
raw::TimeStamp_t sbn::OpDetWaveformMeta::TimeStamp ( ) const
inline

Returns the timestamp at the start of the waveform.

Definition at line 102 of file OpDetWaveformMeta.h.

102 { return startTime; }
double startTime
Time of the first sample in the waveform [us].
bool sbn::OpDetWaveformMeta::withBeamGate ( ) const
inline

Returns whether the time interval includes for sure the beam opening time.

Definition at line 144 of file OpDetWaveformMeta.h.

144  {
146 }
constexpr bool isSet(Flag_t flag) const
Returns if the specified flag is set.
static constexpr Flag_t WithBeamGate
Whether this time interval includes the nominal beam gate opening.
Flags_t flags
All flags (may be set, unset or undefined); see bits.
constexpr bool isDefined(Flag_t flag) const
Returns whether the flag is defined.
bool sbn::OpDetWaveformMeta::withoutBeamGate ( ) const
inline

Returns whether the time interval for sure does not include the beam opening time.

Definition at line 148 of file OpDetWaveformMeta.h.

148  {
149  return
151 }
constexpr bool isUnset(Flag_t flag) const
Returns if the specified flag is unset.
static constexpr Flag_t WithBeamGate
Whether this time interval includes the nominal beam gate opening.
Flags_t flags
All flags (may be set, unset or undefined); see bits.
constexpr bool isDefined(Flag_t flag) const
Returns whether the flag is defined.
bool sbn::OpDetWaveformMeta::withoutTrigger ( ) const
inline

Returns whether the time interval for sure does not include the trigger time.

Definition at line 157 of file OpDetWaveformMeta.h.

157  {
159 }
constexpr bool isUnset(Flag_t flag) const
Returns if the specified flag is unset.
Flags_t flags
All flags (may be set, unset or undefined); see bits.
static constexpr Flag_t WithTrigger
Whether this time interval includes the hardware trigger time.
constexpr bool isDefined(Flag_t flag) const
Returns whether the flag is defined.
bool sbn::OpDetWaveformMeta::withTrigger ( ) const
inline

Returns whether the time interval includes for sure the trigger time.

Definition at line 153 of file OpDetWaveformMeta.h.

153  {
155 }
constexpr bool isSet(Flag_t flag) const
Returns if the specified flag is set.
Flags_t flags
All flags (may be set, unset or undefined); see bits.
static constexpr Flag_t WithTrigger
Whether this time interval includes the hardware trigger time.
constexpr bool isDefined(Flag_t flag) const
Returns whether the flag is defined.

Member Data Documentation

raw::Channel_t sbn::OpDetWaveformMeta::channel = NoChannel

ID of the PMT channel.

Definition at line 66 of file OpDetWaveformMeta.h.

double sbn::OpDetWaveformMeta::endTime = NoTime

Time at the end of the last sample in the waveform [us].

Definition at line 73 of file OpDetWaveformMeta.h.

Flags_t sbn::OpDetWaveformMeta::flags

All flags (may be set, unset or undefined); see bits.

Definition at line 75 of file OpDetWaveformMeta.h.

constexpr raw::Channel_t sbn::OpDetWaveformMeta::NoChannel = std::numeric_limits<raw::Channel_t>::max()
static

Definition at line 45 of file OpDetWaveformMeta.h.

constexpr double sbn::OpDetWaveformMeta::NoTime = std::numeric_limits<double>::lowest()
static

Magic value denoting the absence of time information.

Definition at line 43 of file OpDetWaveformMeta.h.

std::size_t sbn::OpDetWaveformMeta::nSamples = 0

Number of samples in the waveform.

Definition at line 68 of file OpDetWaveformMeta.h.

double sbn::OpDetWaveformMeta::startTime = NoTime

Time of the first sample in the waveform [us].

Definition at line 71 of file OpDetWaveformMeta.h.


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