All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FillTrigger.cxx
Go to the documentation of this file.
1 
3 
4 namespace caf
5 {
6  void FillTrigger(const sbn::ExtraTriggerInfo& addltrig_info,
7  const std::vector<raw::Trigger>& trig_info,
8  std::vector<caf::SRTrigger>& triggerInfo)
9  {
10  uint64_t beam_ts = 0;
11  uint64_t trigger_ts = 0;
12  triggerInfo.emplace_back();
13  triggerInfo.back().global_trigger_time = addltrig_info.triggerTimestamp;
14  triggerInfo.back().beam_gate_time_abs = addltrig_info.beamGateTimestamp;
15  beam_ts = addltrig_info.beamGateTimestamp;
16  trigger_ts = addltrig_info.triggerTimestamp;
17  int64_t diff_ts = trigger_ts - beam_ts;
18  triggerInfo.back().trigger_within_gate = diff_ts;
19  for(const raw::Trigger& trig: trig_info)
20  {
21  triggerInfo.back().beam_gate_det_time = trig.BeamGateTime();
22  triggerInfo.back().global_trigger_det_time = trig.TriggerTime();
23  }
24  }
25 
26 }
std::uint64_t beamGateTimestamp
Absolute timestamp of the opening of this beam gate [ns].
Additional information on trigger.
void FillTrigger(const sbn::ExtraTriggerInfo &addltrig_info, const std::vector< raw::Trigger > &trig_info, std::vector< caf::SRTrigger > &triggerInfo)
Definition: FillTrigger.cxx:6
std::uint64_t triggerTimestamp
Absolute timestamp of this trigger [ns].