LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
electronics.h File Reference

Dimensioned variables related to electronics. More...

#include "lardataalg/Utilities/intervals.h"
#include "lardataalg/Utilities/quantities.h"
#include <cstddef>
#include <ratio>
#include <string_view>

Go to the source code of this file.

Classes

struct  util::quantities::units::Tick
 
struct  util::quantities::units::Counts
 

Namespaces

 util::quantities
 Types of variables with a unit.
 
 util::quantities::units
 Definitions of actual units.
 
 util::quantities::electronics_literals
 Literal constants for electronics quantities.
 
 util::quantities::intervals
 
 util::quantities::points
 

Typedefs

template<typename T = util::quantities::tick_as<>::value_t>
using util::quantities::intervals::ticks_as = concepts::Interval< util::quantities::tick_as< T >>
 A units::Ticks-based interval. More...
 
using util::quantities::intervals::ticks = ticks_as<>
 A tick interval based on std::ptrdiff_t. More...
 
using util::quantities::intervals::ticks_f = ticks_as< float >
 A tick interval based on single precision real number. More...
 
using util::quantities::intervals::ticks_d = ticks_as< double >
 A tick interval based on double precision real number. More...
 
template<typename T = util::quantities::tick_as<>::value_t, typename Cat = NoCategory>
using util::quantities::points::tick_as = concepts::Point< util::quantities::tick_as< T >, Cat >
 A units::Ticks-based point. More...
 
using util::quantities::points::tick = tick_as<>
 A tick value based on std::ptrdiff_t. More...
 
using util::quantities::points::tick_f = tick_as< float >
 A tick value based on single precision real number. More...
 
using util::quantities::points::tick_d = tick_as< double >
 A tick value based on double precision real number. More...
 
Ticks

These tick quantities are tied to util::quantities::units::Tick. A few options are provided:

  • generic template (tick_as), allowing to choose which numerical representation to use
  • unsigned integer (tick), based on std::ptrdiff_t, ready for use

For this unit in particular, additional options are provided to accommodate the custom of using the unit in plural form: ticks_as and ticks are exactly equivalent to the singular-named counterparts.

template<typename T = std::ptrdiff_t>
using util::quantities::tick_as = concepts::scaled_quantity< units::Tick, std::ratio< 1 >, T >
 Tick number, represented by the specified type T. More...
 
template<typename T = tick_as<>::value_t>
using util::quantities::ticks_as = tick_as< T >
 Alias for common language habits. More...
 
using util::quantities::tick = tick_as<>
 Tick number, represented by std::ptrdiff_t. More...
 
using util::quantities::ticks = tick
 Alias for common language habits. More...
 
using util::quantities::tick_f = tick_as< float >
 Tick number, represented by float. More...
 
using util::quantities::ticks_f = tick_f
 Alias for common language habits. More...
 
using util::quantities::tick_d = tick_as< double >
 Tick number, represented by double. More...
 
using util::quantities::ticks_d = tick_d
 Alias for common language habits. More...
 
ADC counts

These ADC count quantities are tied to util::quantities::units::Counts. A few options are provided:

  • generic template (counts_as), allowing to choose which numerical representation to use
  • unsigned integer (counts), based on signed short int, ready for use
template<typename T = signed short int>
using util::quantities::counts_as = concepts::scaled_quantity< units::Counts, std::ratio< 1 >, T >
 Number of ADC counts, represented by the specified type T. More...
 
using util::quantities::counts = counts_as<>
 Number of ADC counts, represented by signed short int. More...
 
using util::quantities::counts_f = counts_as< float >
 Number of ADC counts, represented by float. More...
 

Functions

constexpr tick util::quantities::electronics_literals::operator""_tick (long double v)
 Literal tick value. More...
 
constexpr tick util::quantities::electronics_literals::operator""_tick (unsigned long long int v)
 Literal tick value. More...
 
constexpr tick_d util::quantities::electronics_literals::operator""_tickd (long double v)
 Literal tick (double-based, tick_d) value. More...
 
constexpr tick_d util::quantities::electronics_literals::operator""_tickd (unsigned long long int v)
 Literal tick (double-based, tick_d) value. More...
 
constexpr counts util::quantities::electronics_literals::operator""_ADC (long double v)
 Literal ADC count value. More...
 
constexpr counts util::quantities::electronics_literals::operator""_ADC (unsigned long long int v)
 Literal ADC count value. More...
 
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf (long double v)
 Literal ADC count value (single precision floating points). More...
 
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf (unsigned long long int v)
 Literal ADC count value (single precision floating points). More...
 

Detailed Description

Dimensioned variables related to electronics.

Author
Gianluca Petrillo (petri.nosp@m.llo@.nosp@m.slac..nosp@m.stan.nosp@m.ford..nosp@m.edu)
Date
November 2, 2018
See also
lardataalg/Utilities/quantities.h

Set of basic quantities related to electronics. Currently, quantities are defined based on the following units:

  • tick

This is a header-only library.

Definition in file electronics.h.