9 #include "fhiclcpp/ParameterSet.h"
50 for(std::set<trigdata::TrigTimeSlice_t>::const_iterator iter(
_timestamps.begin());
54 if(!(last_timestamp) || (*iter) > (last_timestamp +
_deadtime)) {
60 _time_windows.insert(std::make_pair(window_end,window_begin));
62 last_timestamp=(*iter);
78 std::map<trigdata::TrigTimeSlice_t,trigdata::TrigTimeSlice_t>::const_iterator
start_time(
_time_windows.lower_bound(time));
82 else return ((*start_time).second < time);
uint64_t TrigTimeSlice_t
A unit of time used in trigger logic.
std::set< trigdata::TrigTimeSlice_t > _timestamps
stores CANDIDATE readout trigger timestamps
trigdata::TrigTimeSlice_t _proceeding_slices
proceeding readout-window from trigger time stamp
trigdata::TrigTimeSlice_t _preceeding_slices
preceeding readout-window from trigger time stamp
TriggerAlgoBase(fhicl::ParameterSet const &pset)
then echo fcl sbnd_project sbnd_project sbnd_project sbnd_project production production start_time
virtual void SimTrigger()
Function to analyze _timestamps and store valid readout windows in _time_windows. ...
bool _sim_done
run utility boolean, set to true after trigger simulation is run
std::map< trigdata::TrigTimeSlice_t, trigdata::TrigTimeSlice_t > _time_windows
stores VALID readout trigger time windows
void Config(fhicl::ParameterSet const &pset)
Function to extract fhicl parameters.
bool IsTriggered(trigdata::TrigTimeSlice_t time) const
Function to check if "time" (input arg.) is within any of valid readout windows or not...
trigdata::TrigTimeSlice_t _deadtime
trigger deadtime AFTER each valid trigger timestamps
virtual void ClearTriggerInfo()
Function to clear simulated trigger information.