LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
util::quantities::electronics_literals Namespace Reference

Literal constants for electronics quantities. More...

Functions

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

Detailed Description

Literal constants for electronics quantities.

These functions allow a simplified syntax for specifying a tick quantity. In order to use these, their namespace must be used:

// definition of `util::quantities::tick` constant:
constexpr auto i = 56_tick;
// definition of `util::quantities::counts` constant:
constexpr auto q = 675_ADC;

Function Documentation

constexpr counts util::quantities::electronics_literals::operator""_ADC ( long double  v)

Literal ADC count value.

Definition at line 163 of file electronics.h.

164  {
165  return counts{static_cast<signed short int>(v)};
166  }
counts_as<> counts
Number of ADC counts, represented by signed short int.
Definition: electronics.h:112
constexpr counts util::quantities::electronics_literals::operator""_ADC ( unsigned long long int  v)

Literal ADC count value.

Definition at line 167 of file electronics.h.

168  {
169  return counts{static_cast<signed short int>(v)};
170  }
counts_as<> counts
Number of ADC counts, represented by signed short int.
Definition: electronics.h:112
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf ( long double  v)

Literal ADC count value (single precision floating points).

Definition at line 175 of file electronics.h.

176  {
177  return counts_f{static_cast<float>(v)};
178  }
counts_as< float > counts_f
Number of ADC counts, represented by float.
Definition: electronics.h:115
constexpr counts_f util::quantities::electronics_literals::operator""_ADCf ( unsigned long long int  v)

Literal ADC count value (single precision floating points).

Definition at line 179 of file electronics.h.

180  {
181  return counts_f{static_cast<float>(v)};
182  }
counts_as< float > counts_f
Number of ADC counts, represented by float.
Definition: electronics.h:115
constexpr tick util::quantities::electronics_literals::operator""_tick ( long double  v)

Literal tick value.

Definition at line 139 of file electronics.h.

References util::quantities::concepts::Quantity< Unit, T >::castFrom().

140  {
141  return tick::castFrom(v);
142  }
constexpr tick util::quantities::electronics_literals::operator""_tick ( unsigned long long int  v)

Literal tick value.

Definition at line 143 of file electronics.h.

References util::quantities::concepts::Quantity< Unit, T >::castFrom().

144  {
145  return tick::castFrom(v);
146  }
constexpr tick_d util::quantities::electronics_literals::operator""_tickd ( long double  v)

Literal tick (double-based, tick_d) value.

Definition at line 151 of file electronics.h.

References util::quantities::concepts::Quantity< Unit, T >::castFrom().

152  {
153  return tick_d::castFrom(v);
154  }
constexpr tick_d util::quantities::electronics_literals::operator""_tickd ( unsigned long long int  v)

Literal tick (double-based, tick_d) value.

Definition at line 155 of file electronics.h.

References util::quantities::concepts::Quantity< Unit, T >::castFrom().

156  {
157  return tick_d::castFrom(v);
158  }