Public Types | Public Member Functions | Private Attributes | List of all members
detinfo::DetectorClocksWithUnits Class Reference

A partial detinfo::DetectorClocksData supporting units. More...

#include <DetectorTimings.h>

Inheritance diagram for detinfo::DetectorClocksWithUnits:
detinfo::DetectorTimings

Public Types

using nanosecond = util::quantities::nanosecond
 
using microsecond = util::quantities::microsecond
 
using megahertz = util::quantities::megahertz
 
using ticks_d = util::quantities::ticks_d
 

Public Member Functions

detinfo::DetectorClocksData const & clockData () const
 Returns the detector clocks data object. More...
 
microsecond TriggerTime () const
 Equivalent to detinfo::DetectorClocksData::TriggerTime(). More...
 
microsecond BeamGateTime () const
 Equivalent to detinfo::DetectorClocksData::BeamGateTime(). More...
 
microsecond TPCTime () const
 Equivalent to detinfo::DetectorClocksData::TPCTime(). More...
 
microsecond OpticalClockPeriod () const
 
megahertz OpticalClockFrequency () const
 
 DetectorClocksWithUnits (detinfo::DetectorClocksData const *detClocks)
 Constructor: uses detClocks for internal conversions. More...
 
 DetectorClocksWithUnits (detinfo::DetectorClocksData const &detClocks)
 
microsecond G4ToElecTime (nanosecond simTime) const
 Equivalent to detinfo::DetectorClocksData::G4ToElecTime(). More...
 
microsecond G4ToElecTime (double simTime) const
 
ticks_d TPCTick2TDC (ticks_d tpcticks) const
 Equivalent to detinfo::DetectorClocksData::G4ToElecTime(). More...
 
ticks_d TPCTick2TDC (double tpcticks) const
 

Private Attributes

detinfo::DetectorClocksData fClockData
 The backend instance of detinfo::DetectorClocksData this object uses. More...
 

Detailed Description

A partial detinfo::DetectorClocksData supporting units.

This class is instantiated based on a detinfo::DetectorClocksData, which is relied upon to provide the underlying functionality.

Example of usage:

The timing data is copied locally; see detinfo::DetectorClocksData for considerations on the validity time span of the timing information.

Definition at line 45 of file DetectorTimings.h.

Member Typedef Documentation

Definition at line 54 of file DetectorTimings.h.

Definition at line 53 of file DetectorTimings.h.

Definition at line 52 of file DetectorTimings.h.

Definition at line 55 of file DetectorTimings.h.

Constructor & Destructor Documentation

detinfo::DetectorClocksWithUnits::DetectorClocksWithUnits ( detinfo::DetectorClocksData const *  detClocks)
inlineexplicit

Constructor: uses detClocks for internal conversions.

Definition at line 59 of file DetectorTimings.h.

60  : DetectorClocksWithUnits(*detClocks)
61  {}
DetectorClocksWithUnits(detinfo::DetectorClocksData const *detClocks)
Constructor: uses detClocks for internal conversions.
detinfo::DetectorClocksWithUnits::DetectorClocksWithUnits ( detinfo::DetectorClocksData const &  detClocks)
inlineexplicit

Definition at line 62 of file DetectorTimings.h.

63  : fClockData(detClocks)
64  {}
detinfo::DetectorClocksData fClockData
The backend instance of detinfo::DetectorClocksData this object uses.

Member Function Documentation

microsecond detinfo::DetectorClocksWithUnits::BeamGateTime ( ) const
inline

Equivalent to detinfo::DetectorClocksData::BeamGateTime().

Definition at line 83 of file DetectorTimings.h.

84  {
86  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
double BeamGateTime() const
Beam gate electronics clock time in [us].
util::quantities::microsecond microsecond
detinfo::DetectorClocksData const& detinfo::DetectorClocksWithUnits::clockData ( ) const
inline

Returns the detector clocks data object.

Definition at line 69 of file DetectorTimings.h.

70  {
71  return fClockData;
72  }
detinfo::DetectorClocksData fClockData
The backend instance of detinfo::DetectorClocksData this object uses.
microsecond detinfo::DetectorClocksWithUnits::G4ToElecTime ( nanosecond  simTime) const
inline

Equivalent to detinfo::DetectorClocksData::G4ToElecTime().

Definition at line 98 of file DetectorTimings.h.

99  {
100  return microsecond{clockData().G4ToElecTime(simTime.value())};
101  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
double G4ToElecTime(double const g4_time) const
util::quantities::microsecond microsecond
microsecond detinfo::DetectorClocksWithUnits::G4ToElecTime ( double  simTime) const
inline

Definition at line 103 of file DetectorTimings.h.

104  {
105  return G4ToElecTime(nanosecond{simTime});
106  }
microsecond G4ToElecTime(nanosecond simTime) const
Equivalent to detinfo::DetectorClocksData::G4ToElecTime().
util::quantities::nanosecond nanosecond
megahertz detinfo::DetectorClocksWithUnits::OpticalClockFrequency ( ) const
inline

Equivalent to detinfo::DetectorClocksData::OpticalClock().TickPeriod().

Definition at line 134 of file DetectorTimings.h.

135  {
137  }
util::quantities::megahertz megahertz
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
ElecClock const & OpticalClock() const noexcept
Borrow a const Optical clock with time set to Trigger time [us].
constexpr double Frequency() const
Frequency in MHz.
Definition: ElecClock.h:191
microsecond detinfo::DetectorClocksWithUnits::OpticalClockPeriod ( ) const
inline

Equivalent to detinfo::DetectorClocksData::OpticalClock().TickPeriod().

Definition at line 126 of file DetectorTimings.h.

127  {
129  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
constexpr double TickPeriod() const noexcept
A single tick period in microseconds.
Definition: ElecClock.h:352
ElecClock const & OpticalClock() const noexcept
Borrow a const Optical clock with time set to Trigger time [us].
util::quantities::microsecond microsecond
ticks_d detinfo::DetectorClocksWithUnits::TPCTick2TDC ( ticks_d  tpcticks) const
inline

Equivalent to detinfo::DetectorClocksData::G4ToElecTime().

Definition at line 112 of file DetectorTimings.h.

113  {
114  return ticks_d{clockData().TPCTick2TDC(tpcticks.value())};
115  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
util::quantities::ticks_d ticks_d
double TPCTick2TDC(double const tick) const
ticks_d detinfo::DetectorClocksWithUnits::TPCTick2TDC ( double  tpcticks) const
inline

Definition at line 117 of file DetectorTimings.h.

118  {
119  return TPCTick2TDC(ticks_d{tpcticks});
120  }
ticks_d TPCTick2TDC(ticks_d tpcticks) const
Equivalent to detinfo::DetectorClocksData::G4ToElecTime().
util::quantities::ticks_d ticks_d
microsecond detinfo::DetectorClocksWithUnits::TPCTime ( ) const
inline

Equivalent to detinfo::DetectorClocksData::TPCTime().

Definition at line 90 of file DetectorTimings.h.

91  {
92  return microsecond{clockData().TPCTime()};
93  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
util::quantities::microsecond microsecond
microsecond detinfo::DetectorClocksWithUnits::TriggerTime ( ) const
inline

Equivalent to detinfo::DetectorClocksData::TriggerTime().

Definition at line 76 of file DetectorTimings.h.

77  {
78  return microsecond{clockData().TriggerTime()};
79  }
detinfo::DetectorClocksData const & clockData() const
Returns the detector clocks data object.
double TriggerTime() const
Trigger electronics clock time in [us].
util::quantities::microsecond microsecond

Member Data Documentation

detinfo::DetectorClocksData detinfo::DetectorClocksWithUnits::fClockData
private

The backend instance of detinfo::DetectorClocksData this object uses.

Definition at line 48 of file DetectorTimings.h.


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