LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
TriggerData.h
Go to the documentation of this file.
1 // TriggerData/TriggerData.h
2 #ifndef TRIGGERDATA_H
3 #define TRIGGERDATA_H
4 
5 // C++ includes
6 #include <limits>
7 #include <stdint.h>
8 
9 namespace raw {
10 
11  class Trigger {
12 
13  public:
16  {
17  fTriggerNumber = std::numeric_limits<unsigned int>::max();
18 
19  fTriggerTime = std::numeric_limits<double>::max();
20  fBeamGateTime = std::numeric_limits<double>::max();
21 
22  fTriggerBits = 0x0;
23  }
24 
25  private:
26  unsigned int fTriggerNumber;
27  double fTriggerTime;
28  double fBeamGateTime;
29  unsigned int fTriggerBits;
30 
31  public:
33  Trigger(unsigned int counter, double trigger_time, double beamgate_time, uint32_t bits)
34  : fTriggerNumber(counter)
35  , fTriggerTime(trigger_time)
36  , fBeamGateTime(beamgate_time)
37  , fTriggerBits(bits)
38  {}
39 
41  unsigned int TriggerNumber() const { return fTriggerNumber; }
43  double TriggerTime() const { return fTriggerTime; }
45  double BeamGateTime() const { return fBeamGateTime; }
47  unsigned int TriggerBits() const { return fTriggerBits; }
49  bool Triggered(const unsigned char bit) const;
50  };
51 }
52 
53 #endif
Trigger(unsigned int counter, double trigger_time, double beamgate_time, uint32_t bits)
Alternative constructor.
Definition: TriggerData.h:33
unsigned int TriggerNumber() const
Trigger number.
Definition: TriggerData.h:41
bool Triggered(const unsigned char bit) const
Accessor to specific bit.
Definition: TriggerData.cxx:8
Raw data description.
Definition: RawTypes.h:6
double TriggerTime() const
Trigger time w.r.t. electronics clock T0 in us.
Definition: TriggerData.h:43
timescale_traits< TriggerTimeCategory >::time_point_t trigger_time
A point in time on the trigger time scale.
unsigned int fTriggerBits
Trigger bits ... dedicated bit-by-bit function available.
Definition: TriggerData.h:29
auto counter(T begin, T end)
Returns an object to iterate values from begin to end in a range-for loop.
Definition: counter.h:295
double BeamGateTime() const
BeamGate time w.r.t. electronics clock T0 in us.
Definition: TriggerData.h:45
Trigger()
Default ctor.
Definition: TriggerData.h:15
double fTriggerTime
Trigger time w.r.t. electronics clock T0.
Definition: TriggerData.h:27
unsigned int TriggerBits() const
Trigger Bits.
Definition: TriggerData.h:47
unsigned int fTriggerNumber
Trigger counter.
Definition: TriggerData.h:26
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: TriggerData.h:28