#include <DetectorClocksStandardGAr.h>
Public Member Functions | |
DetectorClocksStandardGAr () | |
DetectorClocksStandardGAr (fhicl::ParameterSet const &pset) | |
DetectorClocksStandardGAr (DetectorClocksStandardGAr const &)=delete | |
virtual | ~DetectorClocksStandardGAr () |
bool | Configure (fhicl::ParameterSet const &pset) |
bool | Update (uint64_t ts=0) |
virtual double | TriggerOffsetTPC () const |
void | debugReport () const |
std::string | TrigModuleName () const |
virtual double | G4ToElecTime (double g4_time) const |
Given Geant4 time [ns], returns relative time [ns] w.r.t. electronics time T0. More... | |
virtual double | TriggerTime () const |
Trigger electronics clock time in [us]. More... | |
virtual double | BeamGateTime () const |
Beam gate electronics clock time in [us]. More... | |
virtual double | SpillLength () const |
Duration of spill [ns]. More... | |
virtual std::vector< std::string > | ConfigNames () const |
virtual std::vector< double > | ConfigValues () const |
void | SetConfigValue (size_t i, double val) |
virtual void | SetTriggerTime (double trig_time, double beam_time) |
Setter for trigger times. More... | |
virtual void | SetSpillLength (double spillLength) |
virtual const ElecClock & | TPCClock () const |
Borrow a const TPC clock with time set to Trigger time [us]. More... | |
virtual ElecClock | TPCClock (double time) const |
Create a TPC clock for a given time [us] from clock counting start. More... | |
detinfo::ElecClock | TPCClock (unsigned int sample, unsigned int frame) const |
Create a TPC clock for a given sample/frame number in TPC clock frequency. More... | |
virtual const detinfo::ElecClock & | TriggerClock () const |
Borrow a const Trigger clock with time set to Trigger time [us]. More... | |
virtual detinfo::ElecClock | TriggerClock (double time) const |
Create a Trigger clock for a given time [us] from clock counting start. More... | |
virtual detinfo::ElecClock | TriggerClock (unsigned int sample, unsigned int frame) const |
Create a Trigger clock for a given sample/frame number in Trigger clock frequency. More... | |
virtual const detinfo::ElecClock & | ExternalClock () const |
Borrow a const Trigger clock with time set to External Time [us]. More... | |
virtual detinfo::ElecClock | ExternalClock (double time) const |
Create a External clock for a given time [us] from clock counting start. More... | |
virtual detinfo::ElecClock | ExternalClock (unsigned int sample, unsigned int frame) const |
Create a External clock for a given sample/frame number in External clock frequency. More... | |
virtual double | TPCTick2TrigTime (double tick) const |
Given TPC time-tick (waveform index), returns time [ns] w.r.t. trigger time stamp. More... | |
virtual double | TPCTick2BeamTime (double tick) const |
Given TPC time-tick (waveform index), returns time [ns] w.r.t. beam gate time. More... | |
virtual double | ExternalTick2TrigTime (double tick, size_t sample, size_t frame) const |
Given External time-tick (waveform index), sample and frame number, returns time [ns] w.r.t. trigger time stamp. More... | |
virtual double | ExternalTick2BeamTime (double tick, size_t sample, size_t frame) const |
Given External time-tick (waveform index), sample and frame number, returns time [ns] w.r.t. beam gate time stamp. More... | |
virtual double | TPCTick2TDC (double tick) const |
Given TPC time-tick (waveform index), returns electronics clock count [tdc]. More... | |
virtual double | TPCG4Time2TDC (double g4time) const |
Given G4 time [ns], returns corresponding TPC electronics clock count [tdc]. More... | |
virtual double | ExternalTick2TDC (double tick, size_t sample, size_t frame) const |
Given External time-tick (waveform index), sample and frame number, returns time electronics clock count [tdc]. More... | |
virtual double | ExternalG4Time2TDC (double g4time) const |
Given G4 time [ns], returns corresponding External electronics clock count [tdc]. More... | |
virtual double | TPCTick2Time (double tick) const |
Given TPC time-tick (waveform index), returns electronics clock [us]. More... | |
virtual double | ExternalTick2Time (double tick, size_t sample, size_t frame) const |
Given External time-tick (waveform index), sample and frame number, returns electronics clock [us]. More... | |
virtual double | TPCTDC2Tick (double tdc) const |
Given electronics clock count [tdc] returns TPC time-tick. More... | |
virtual double | TPCG4Time2Tick (double g4time) const |
Given G4 time returns electronics clock count [tdc]. More... | |
bool | InheritClockConfig () |
void | ApplyParams () |
Internal function to apply loaded parameters to member attributes. More... | |
bool | IsRightConfig (const fhicl::ParameterSet &ps) const |
Internal function used to search for the right configuration set in the data file. More... | |
Public Member Functions inherited from gar::detinfo::DetectorClocks | |
DetectorClocks (const DetectorClocks &)=delete | |
DetectorClocks (DetectorClocks &&)=delete | |
DetectorClocks & | operator= (const DetectorClocks &)=delete |
DetectorClocks & | operator= (DetectorClocks &&)=delete |
virtual | ~DetectorClocks ()=default |
Protected Attributes | |
std::vector< std::string > | fConfigName |
std::vector< double > | fConfigValue |
bool | fInheritClockConfig |
std::string | fTrigModuleName |
double | fG4RefTime |
Electronics clock counting start time in G4 time frame [us]. More... | |
double | fFramePeriod |
Frame period. More... | |
ElecClock | fTPCClock |
TPC clock. More... | |
ElecClock | fTriggerClock |
Trigger clock. More... | |
ElecClock | fExternalClock |
External clock. More... | |
double | fTriggerOffsetTPC |
Time offset from trigger to TPC readout start. More... | |
double | fTriggerTime |
Trigger time in [ns]. More... | |
double | fBeamGateTime |
BeamGate time in [ns]. More... | |
double | fSpillLength |
Duration of beam spill, ns. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from gar::detinfo::DetectorClocks | |
DetectorClocks ()=default | |
Definition at line 24 of file DetectorClocksStandardGAr.h.
gar::detinfo::DetectorClocksStandardGAr::DetectorClocksStandardGAr | ( | ) |
Definition at line 8 of file DetectorClocksStandardGAr.cxx.
gar::detinfo::DetectorClocksStandardGAr::DetectorClocksStandardGAr | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 36 of file DetectorClocksStandardGAr.cxx.
|
delete |
|
inlinevirtual |
Definition at line 30 of file DetectorClocksStandardGAr.h.
void gar::detinfo::DetectorClocksStandardGAr::ApplyParams | ( | ) |
Internal function to apply loaded parameters to member attributes.
Definition at line 80 of file DetectorClocksStandardGAr.cxx.
|
inlinevirtual |
Beam gate electronics clock time in [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 54 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Implements gar::detinfo::DetectorClocks.
Definition at line 60 of file DetectorClocksStandardGAr.h.
bool gar::detinfo::DetectorClocksStandardGAr::Configure | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 55 of file DetectorClocksStandardGAr.cxx.
|
inlinevirtual |
Implements gar::detinfo::DetectorClocks.
Definition at line 61 of file DetectorClocksStandardGAr.h.
void gar::detinfo::DetectorClocksStandardGAr::debugReport | ( | ) | const |
Definition at line 109 of file DetectorClocksStandardGAr.cxx.
|
inlinevirtual |
Borrow a const Trigger clock with time set to External Time [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 111 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a External clock for a given time [us] from clock counting start.
Implements gar::detinfo::DetectorClocks.
Definition at line 115 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a External clock for a given sample/frame number in External clock frequency.
Implements gar::detinfo::DetectorClocks.
Definition at line 119 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given G4 time [ns], returns corresponding External electronics clock count [tdc].
Implements gar::detinfo::DetectorClocks.
Definition at line 161 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given External time-tick (waveform index), sample and frame number, returns time [ns] w.r.t. beam gate time stamp.
Implements gar::detinfo::DetectorClocks.
Definition at line 141 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given External time-tick (waveform index), sample and frame number, returns time electronics clock count [tdc].
Implements gar::detinfo::DetectorClocks.
Definition at line 157 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given External time-tick (waveform index), sample and frame number, returns electronics clock [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 172 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given External time-tick (waveform index), sample and frame number, returns time [ns] w.r.t. trigger time stamp.
Implements gar::detinfo::DetectorClocks.
Definition at line 137 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given Geant4 time [ns], returns relative time [ns] w.r.t. electronics time T0.
Implements gar::detinfo::DetectorClocks.
Definition at line 48 of file DetectorClocksStandardGAr.h.
|
inline |
Definition at line 187 of file DetectorClocksStandardGAr.h.
bool gar::detinfo::DetectorClocksStandardGAr::IsRightConfig | ( | const fhicl::ParameterSet & | ps | ) | const |
Internal function used to search for the right configuration set in the data file.
Definition at line 94 of file DetectorClocksStandardGAr.cxx.
|
inline |
Definition at line 63 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Definition at line 73 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Setter for trigger times.
Definition at line 66 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Duration of spill [ns].
Implements gar::detinfo::DetectorClocks.
Definition at line 57 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Borrow a const TPC clock with time set to Trigger time [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 79 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a TPC clock for a given time [us] from clock counting start.
Implements gar::detinfo::DetectorClocks.
Definition at line 83 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a TPC clock for a given sample/frame number in TPC clock frequency.
Implements gar::detinfo::DetectorClocks.
Definition at line 87 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given G4 time [ns], returns corresponding TPC electronics clock count [tdc].
Implements gar::detinfo::DetectorClocks.
Definition at line 153 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given G4 time returns electronics clock count [tdc].
Implements gar::detinfo::DetectorClocks.
Definition at line 184 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given electronics clock count [tdc] returns TPC time-tick.
Implements gar::detinfo::DetectorClocks.
Definition at line 180 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given TPC time-tick (waveform index), returns time [ns] w.r.t. beam gate time.
Implements gar::detinfo::DetectorClocks.
Definition at line 133 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given TPC time-tick (waveform index), returns electronics clock count [tdc].
Implements gar::detinfo::DetectorClocks.
Definition at line 149 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given TPC time-tick (waveform index), returns electronics clock [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 168 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Given TPC time-tick (waveform index), returns time [ns] w.r.t. trigger time stamp.
Implements gar::detinfo::DetectorClocks.
Definition at line 129 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Borrow a const Trigger clock with time set to Trigger time [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 95 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a Trigger clock for a given time [us] from clock counting start.
Implements gar::detinfo::DetectorClocks.
Definition at line 99 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Create a Trigger clock for a given sample/frame number in Trigger clock frequency.
Implements gar::detinfo::DetectorClocks.
Definition at line 103 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Implements gar::detinfo::DetectorClocks.
Definition at line 35 of file DetectorClocksStandardGAr.h.
|
inlinevirtual |
Trigger electronics clock time in [us].
Implements gar::detinfo::DetectorClocks.
Definition at line 51 of file DetectorClocksStandardGAr.h.
|
inline |
Definition at line 45 of file DetectorClocksStandardGAr.h.
bool gar::detinfo::DetectorClocksStandardGAr::Update | ( | uint64_t | ts = 0 | ) |
Definition at line 49 of file DetectorClocksStandardGAr.cxx.
|
protected |
BeamGate time in [ns].
Definition at line 227 of file DetectorClocksStandardGAr.h.
|
protected |
Definition at line 197 of file DetectorClocksStandardGAr.h.
|
protected |
Definition at line 199 of file DetectorClocksStandardGAr.h.
|
protected |
External clock.
Definition at line 218 of file DetectorClocksStandardGAr.h.
|
protected |
Frame period.
Definition at line 209 of file DetectorClocksStandardGAr.h.
|
protected |
Electronics clock counting start time in G4 time frame [us].
Definition at line 206 of file DetectorClocksStandardGAr.h.
|
protected |
Definition at line 201 of file DetectorClocksStandardGAr.h.
|
protected |
Duration of beam spill, ns.
Definition at line 230 of file DetectorClocksStandardGAr.h.
|
protected |
TPC clock.
Definition at line 212 of file DetectorClocksStandardGAr.h.
|
protected |
Trigger clock.
Definition at line 215 of file DetectorClocksStandardGAr.h.
|
protected |
Time offset from trigger to TPC readout start.
Definition at line 221 of file DetectorClocksStandardGAr.h.
|
protected |
Trigger time in [ns].
Definition at line 224 of file DetectorClocksStandardGAr.h.
|
protected |
Definition at line 203 of file DetectorClocksStandardGAr.h.