Implementation of detinfo::DetectorClocks
interface with fixed settings from configuration.
More...
#include <DetectorClocksStandard.h>
Public Member Functions | |
DetectorClocksStandard (fhicl::ParameterSet const &pset) | |
DetectorClocksStandard (DetectorClocksStandard const &)=delete | |
void | SetConfigValue (size_t i, double val) |
std::string const & | TrigModuleName () const |
Returns the input tag of the trigger data product. More... | |
std::string | G4RefCorrTrigModuleName () const |
Returns the input tag of the trigger data product for G4Ref correctons. More... | |
std::vector< std::string > const & | ConfigNames () const override |
std::vector< double > const & | ConfigValues () const override |
DetectorClocksData | DataForJob () const override |
Returns a complete detinfo::DetectorClocksData object. More... | |
DetectorClocksData | DataFor (double const g4_ref_time, double const trigger_time, double const beam_time) const override |
Returns a complete detinfo::DetectorClocksData object. More... | |
void | ApplyParams () |
Internal function to apply loaded parameters to member attributes. More... | |
bool | IsRightConfig (const fhicl::ParameterSet &ps) const |
void | debugReport () const |
Dumps the current configuration to screen. More... | |
Public Member Functions inherited from detinfo::DetectorClocks | |
virtual | ~DetectorClocks ()=default |
Private Member Functions | |
void | SetTriggerTime (double const trig_time, double const beam_time) |
Setter for trigger times. More... | |
double | TriggerOffsetTPC () const |
Private Attributes | |
std::vector< std::string > | fConfigName |
std::vector< double > | fConfigValue |
std::string | fTrigModuleName |
std::string | fG4RefCorrTrigModuleName |
double | fTriggerOffsetTPC |
Time offset from trigger to TPC readout start. More... | |
double | fTriggerTime |
Trigger time in [us]. More... | |
double | fBeamGateTime |
BeamGate time in [us]. More... | |
double | fFramePeriod |
Frame period. More... | |
ElecClock | fTPCClock |
Implementation of detinfo::DetectorClocks
interface with fixed settings from configuration.
In this implementation, all quantities are defined at configuration time and are unchanged for the duration of the entire job, with the exception of the trigger time (see below).
All configuration parameters are mandatory, unless explicitly stated.
0.0
of simulation happens in the electronics time scaleTriggerOffsetTPC: time elapsed between the start of the TPC readout clock and the hardware trigger; it can be expressed in one of two ways:
For example, TriggerOffsetTPC
of -1600.0
means that the TDC clock starts 1.6 milliseconds before the hardware trigger. TriggerOffsetTPC
of 3200.0
means that the trigger arrives at the exact start of tick 3200 of the TPC readout. In this example, if the sampling frequency of that readout is 2 MHz, these two settings are equivalent.
The consistency check feature verifies that the current configuration of detinfo::DetectorClocksStandard
is compatible with the one from previous jobs. It is expected that when this feature is enabled (InheritClockConfig
is configured to be true
), either the configuration is overridden to follow the previous ones, or an exception is thrown in case of inconsistency.
The service provider (detinfo::DetectorClocksStandard
) does not provide a facility to inherit configuration from a previous job, but it stores the expectation whether this should happen (InheritClockConfig()
). The service provider manager is in charge of implementing this feature (see detinfo::DetectorClocksStandardService
for the manager in the art environment).
For the general timing requirements, see the documentation of detinfo::DetectorClocks
.
In this implementation, the trigger time and the beam gate time both default to 0.0 µs.
The manager of this provider is expected to set those values by calling detinfo::DetectorClocksStandard::SetTriggerTime()
. See detinfo::DetectorClocksStandardService
for the manager in the art environment.
ExternalClock()
clock is never initialized!Definition at line 122 of file DetectorClocksStandard.h.
detinfo::DetectorClocksStandard::DetectorClocksStandard | ( | fhicl::ParameterSet const & | pset | ) |
Definition at line 9 of file DetectorClocksStandard.cxx.
|
delete |
void detinfo::DetectorClocksStandard::ApplyParams | ( | ) |
Internal function to apply loaded parameters to member attributes.
Definition at line 40 of file DetectorClocksStandard.cxx.
|
inlineoverridevirtual |
Returns a list of provider configuration names.
Implements detinfo::DetectorClocks.
Definition at line 160 of file DetectorClocksStandard.h.
|
inlineoverridevirtual |
Returns a list of provider configuration values (same order as ConfigNames()
).
Implements detinfo::DetectorClocks.
Definition at line 165 of file DetectorClocksStandard.h.
|
inlineoverridevirtual |
Returns a complete detinfo::DetectorClocksData
object.
g4_ref_time | start of simulation time in electronics time scale [ns] |
trigger_time | the default hardware trigger time in electronics time |
beam_time | the default beam gate opening time in electronics time |
The returned timing information reflects the current context, defined by the parameters passed to this method.
If the information required by the parameters is not available, users will be forced to use DataForJob()
instead.
For more details on the definition of the parameters, see the documentation of detinfo::DetectorClocksData
constructor.
Implements detinfo::DetectorClocks.
Definition at line 185 of file DetectorClocksStandard.h.
|
inlineoverridevirtual |
Returns a complete detinfo::DetectorClocksData
object.
The returned timing information is based on information independent of the current input file, run or event. It is recommended that DataFor()
is used instead whenever possible.
Implements detinfo::DetectorClocks.
Definition at line 171 of file DetectorClocksStandard.h.
void detinfo::DetectorClocksStandard::debugReport | ( | ) | const |
Dumps the current configuration to screen.
Definition at line 58 of file DetectorClocksStandard.cxx.
|
inline |
Returns the input tag of the trigger data product for G4Ref correctons.
The trigger module name is set directly in the configuration as G4RefCorrTrigModuleName
.
Definition at line 154 of file DetectorClocksStandard.h.
bool detinfo::DetectorClocksStandard::IsRightConfig | ( | const fhicl::ParameterSet & | ps | ) | const |
Internal function used to search for the right configuration set in the data file
Definition at line 48 of file DetectorClocksStandard.cxx.
|
inline |
Definition at line 128 of file DetectorClocksStandard.h.
|
inlineprivate |
Setter for trigger times.
trig_time | hardware triggertime" in @ref DetectorClocksElectronicsTime "electronics time scale" @param beam_time @ref DetectorClocksBeamGateOpening "beam gate opening time" in @ref DetectorClocksElectronicsTime "electronics time scale" |
The hardware trigger and beam gate opening times are set, and the electronic clocks are updated to store the new trigger time.
Definition at line 223 of file DetectorClocksStandard.h.
|
inlineprivate |
Definition at line 231 of file DetectorClocksStandard.h.
|
inline |
Returns the input tag of the trigger data product.
The trigger module name is set directly in the configuration as TrigModuleName
.
Definition at line 141 of file DetectorClocksStandard.h.
|
private |
BeamGate time in [us].
Definition at line 253 of file DetectorClocksStandard.h.
|
private |
Definition at line 240 of file DetectorClocksStandard.h.
|
private |
Definition at line 241 of file DetectorClocksStandard.h.
|
private |
Frame period.
Definition at line 256 of file DetectorClocksStandard.h.
|
private |
Definition at line 244 of file DetectorClocksStandard.h.
|
private |
Definition at line 258 of file DetectorClocksStandard.h.
|
private |
Time offset from trigger to TPC readout start.
Definition at line 247 of file DetectorClocksStandard.h.
|
private |
Trigger time in [us].
Definition at line 250 of file DetectorClocksStandard.h.
|
private |
Definition at line 243 of file DetectorClocksStandard.h.