13 #ifndef LARDATAALG_DETECTORINFO_DETECTORCLOCKSSTANDARD_H 14 #define LARDATAALG_DETECTORINFO_DETECTORCLOCKSSTANDARD_H 126 bool Update(uint64_t ts=0);
194 virtual const ::detinfo::ElecClock&
TPCClock()
const override 198 virtual ::detinfo::ElecClock
TPCClock(
double time)
const override 203 unsigned int frame)
const override 219 unsigned int frame)
const override 235 unsigned int frame)
const override 252 unsigned int frame)
const override 293 virtual double OpticalTick2TDC(
double tick,
size_t sample,
size_t frame)
const override 386 #endif // LARDATAALG_DETECTORINFO_DETECTORCLOCKSSTANDARD_H ::detinfo::ElecClock fTPCClock
TPC clock.
bool Configure(fhicl::ParameterSet const &pset)
virtual double G4ToElecTime(double g4_time) const override
Given Geant4 time [ns], returns relative time [us] w.r.t. electronics time T0.
virtual double ExternalTick2Time(double tick, size_t sample, size_t frame) const override
Given External time-tick (waveform index), sample and frame number, returns electronics clock [us]...
virtual double TPCTime() const override
Returns the TPC electronics start time in electronics time.
bool IsRightConfig(const fhicl::ParameterSet &ps) const
Internal function used to search for the right configuration set in the data file.
virtual double TPCTDC2Tick(double tdc) const override
Given electronics clock count [tdc] returns TPC time-tick.
void SetTime(double time)
Directly sets the current time on the clock.
std::vector< std::string > fConfigName
virtual detinfo::ElecClock ExternalClock(double time) const override
virtual const ::detinfo::ElecClock & TPCClock() const override
Borrow a const TPC clock with time set to Trigger time [us].
::detinfo::ElecClock fOpticalClock
Optical clock.
virtual double ExternalG4Time2TDC(double g4time) const override
Given G4 time [ns], returns corresponding External electronics clock count [tdc]. ...
virtual double ExternalTick2BeamTime(double tick, size_t sample, size_t frame) const override
Given External time-tick (waveform index), sample and frame number, returns time [us] w...
std::string TrigModuleName() const
Returns the input tag of the trigger data product.
::detinfo::ElecClock fTriggerClock
Trigger clock.
int Ticks() const
Current clock tick (that is, the number of tick Time() falls in).
virtual double OpticalTick2Time(double tick, size_t sample, size_t frame) const override
Given Optical time-tick (waveform index), sample and frame number, returns electronics clock [us]...
virtual void SetTriggerTime(double trig_time, double beam_time)
Setter for trigger times.
virtual double OpticalTick2TDC(double tick, size_t sample, size_t frame) const override
Given Optical time-tick (waveform index), sample and frame number, returns time electronics clock cou...
virtual double ExternalTick2TDC(double tick, size_t sample, size_t frame) const override
Given External time-tick (waveform index), sample and frame number, returns time electronics clock co...
virtual double OpticalTick2BeamTime(double tick, size_t sample, size_t frame) const override
Given Optical time-tick (waveform index), sample and frame number, returns time [us] w...
pure virtual base interface for detector clocks
double fTriggerTime
Trigger time in [us].
virtual detinfo::ElecClock TriggerClock(unsigned int sample, unsigned int frame) const override
Create a Trigger clock for a given sample/frame number in Trigger clock frequency.
std::vector< double > fConfigValue
double fG4RefTime
Electronics clock counting start time in G4 time frame [us].
detinfo::ElecClock TPCClock(unsigned int sample, unsigned int frame) const override
Create a TPC clock for a given sample/frame number in TPC clock frequency.
virtual const detinfo::ElecClock & OpticalClock() const override
Borrow a const Optical clock with time set to Trigger time [us].
virtual const detinfo::ElecClock & TriggerClock() const override
Borrow a const Trigger clock with time set to Trigger time [us].
virtual ::detinfo::ElecClock TPCClock(double time) const override
Create a TPC clock for a given time [us] from clock counting start.
void ApplyParams()
Internal function to apply loaded parameters to member attributes.
virtual detinfo::ElecClock ExternalClock(unsigned int sample, unsigned int frame) const override
Create a External clock for a given sample/frame number in External clock frequency.
virtual double TPCTick2TDC(double tick) const override
Given TPC time-tick (waveform index), returns electronics clock count [tdc].
virtual double OpticalG4Time2TDC(double g4time) const override
Given G4 time [ns], returns corresponding Optical electronics clock count [tdc].
virtual std::vector< double > ConfigValues() const override
double fBeamGateTime
BeamGate time in [us].
virtual double TriggerOffsetTPC() const override
double fTriggerOffsetTPC
Time offset from trigger to TPC readout start.
virtual const detinfo::ElecClock & ExternalClock() const override
Borrow a const Trigger clock with time set to External Time [us].
virtual std::vector< std::string > ConfigNames() const override
bool Update(uint64_t ts=0)
General LArSoft Utilities.
virtual double TriggerTime() const override
Trigger electronics clock time in [us].
void SetDefaultTriggerTime()
Sets trigger and beam gate time from default configuration values.
double doTime2Tick(double time) const
Implementation of Time2Tick().
Conversion of times between different formats and references.
double FramePeriod() const
A single frame period in microseconds.
void SetConfigValue(size_t i, double val)
virtual detinfo::ElecClock OpticalClock(double time) const override
Create a Optical clock for a given time [us] from clock counting start.
virtual ~DetectorClocksStandard()
bool InheritClockConfig()
virtual double OpticalTick2TrigTime(double tick, size_t sample, size_t frame) const override
Given Optical time-tick (waveform index), sample and frame number, returns time [us] w...
double TickPeriod() const
A single tick period in microseconds.
::detinfo::ElecClock fExternalClock
External clock.
Implementation of detinfo::DetectorClocks interface with fixed settings from configuration.
virtual double TPCG4Time2TDC(double g4time) const override
Given G4 time [ns], returns corresponding TPC electronics clock count [tdc].
virtual double TPCG4Time2Tick(double g4time) const override
Given G4 time returns electronics clock count [tdc].
double Time() const
Current time (as stored) in microseconds.
double fFramePeriod
Frame period.
Class representing the time measured by an electronics clock.
double doTPCTime() const
Implementation of TPCTime().
virtual double TPCTick2BeamTime(double tick) const override
Given TPC time-tick (waveform index), returns time [us] w.r.t. beam gate time.
virtual double Time2Tick(double time) const override
Returns the specified electronics time in TDC electronics ticks.
std::string fTrigModuleName
virtual double BeamGateTime() const override
Beam gate electronics clock time in [us].
virtual double ExternalTick2TrigTime(double tick, size_t sample, size_t frame) const override
Given External time-tick (waveform index), sample and frame number, returns time [us] w...
double Frequency() const
Frequency in MHz.
virtual double TPCTick2Time(double tick) const override
Given TPC time-tick (waveform index), returns electronics clock [us].
virtual double TPCTick2TrigTime(double tick) const override
Given TPC time-tick (waveform index), returns time [us] w.r.t. trigger time stamp.
virtual detinfo::ElecClock TriggerClock(double time) const override
Create a Trigger clock for a given time [us] from clock counting start.
virtual detinfo::ElecClock OpticalClock(unsigned int sample, unsigned int frame) const override
Create a Optical clock for a given sample/frame number in Optical clock frequency.