13 #ifndef DETINFO_DETCLOCKSSTD_H 14 #define DETINFO_DETCLOCKSSTD_H 18 #include "DetectorInfo/DetectorClocks.h" 33 bool Update(uint64_t ts=0);
88 unsigned int frame)
const 104 unsigned int frame)
const 120 unsigned int frame)
const std::vector< double > fConfigValue
std::vector< std::string > fConfigName
ElecClock fExternalClock
External clock.
virtual double TPCTick2TrigTime(double tick) const
Given TPC time-tick (waveform index), returns time [ns] w.r.t. trigger time stamp.
virtual void SetTriggerTime(double trig_time, double beam_time)
Setter for trigger times.
bool IsRightConfig(const fhicl::ParameterSet &ps) const
Internal function used to search for the right configuration set in the data file.
double fTriggerTime
Trigger time in [ns].
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...
virtual double TPCTick2Time(double tick) const
Given TPC time-tick (waveform index), returns electronics clock [us].
virtual ElecClock TPCClock(double time) const
Create a TPC clock for a given time [us] from clock counting start.
virtual double TPCG4Time2TDC(double g4time) const
Given G4 time [ns], returns corresponding TPC electronics clock count [tdc].
void ApplyParams()
Internal function to apply loaded parameters to member attributes.
double fFramePeriod
Frame period.
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...
virtual double SpillLength() const
Duration of spill [ns].
virtual double BeamGateTime() const
Beam gate electronics clock time in [us].
virtual double TriggerOffsetTPC() const
virtual detinfo::ElecClock ExternalClock(double time) const
Create a External clock for a given time [us] from clock counting start.
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.
double TickPeriod() const
A single tick period in nano-second, frequency is in MHz.
double fSpillLength
Duration of beam spill, ns.
double FramePeriod() const
A single frame period in micro-second.
bool Update(uint64_t ts=0)
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 co...
double fBeamGateTime
BeamGate time in [ns].
double fG4RefTime
Electronics clock counting start time in G4 time frame [us].
virtual double TPCG4Time2Tick(double g4time) const
Given G4 time returns electronics clock count [tdc].
double fTriggerOffsetTPC
Time offset from trigger to TPC readout start.
bool Configure(fhicl::ParameterSet const &pset)
ElecClock fTriggerClock
Trigger clock.
DetectorClocksStandardGAr()
detinfo::ElecClock TPCClock(unsigned int sample, unsigned int frame) const
Create a TPC clock for a given sample/frame number in TPC clock frequency.
std::string TrigModuleName() const
tick_as<> tick
Tick number, represented by std::ptrdiff_t.
virtual ~DetectorClocksStandardGAr()
General LArSoft Utilities.
static constexpr double ps
bool InheritClockConfig()
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.
General GArSoft Utilities.
ElecClock fTPCClock
TPC clock.
virtual std::vector< std::string > ConfigNames() const
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]...
virtual std::vector< double > ConfigValues() const
int Ticks() const
of Ticks
double Frequency() const
Frequency in MHz.
virtual double TPCTDC2Tick(double tdc) const
Given electronics clock count [tdc] returns TPC time-tick.
std::string fTrigModuleName
virtual double TPCTick2TDC(double tick) const
Given TPC time-tick (waveform index), returns electronics clock count [tdc].
virtual const ElecClock & TPCClock() const
Borrow a const TPC clock with time set to Trigger time [us].
virtual double TPCTick2BeamTime(double tick) const
Given TPC time-tick (waveform index), returns time [ns] w.r.t. beam gate time.
void SetTime(double time)
virtual const detinfo::ElecClock & ExternalClock() const
Borrow a const Trigger clock with time set to External Time [us].
virtual double TriggerTime() const
Trigger electronics clock time in [us].
virtual double ExternalG4Time2TDC(double g4time) const
Given G4 time [ns], returns corresponding External electronics clock count [tdc]. ...
virtual detinfo::ElecClock TriggerClock(double time) const
Create a Trigger clock for a given time [us] from clock counting start.
virtual double G4ToElecTime(double g4_time) const
Given Geant4 time [ns], returns relative time [ns] w.r.t. electronics time T0.
virtual void SetSpillLength(double spillLength)
virtual const detinfo::ElecClock & TriggerClock() const
Borrow a const Trigger clock with time set to Trigger time [us].
void SetConfigValue(size_t i, double val)
double Time() const
Time (stored) in nano-second.