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 <stdint.h>
7 #include <limits>
8 
9 namespace raw {
10 
11  class Trigger {
12 
13  public:
14 
15  /// Default ctor
17  {
19 
22 
23  fTriggerBits = 0x0;
24  }
25 
26  private:
27 
28  unsigned int fTriggerNumber; ///< Trigger counter
29  double fTriggerTime; ///< Trigger time w.r.t. electronics clock T0
30  double fBeamGateTime; ///< BeamGate time w.r.t. electronics clock T0
31  unsigned int fTriggerBits; ///< Trigger bits ... dedicated bit-by-bit function available
32 
33  public:
34 
35 
36  /// Alternative constructor
37  Trigger(unsigned int counter,
38  double trigger_time,
39  double beamgate_time,
40  uint32_t bits)
41  : fTriggerNumber ( counter ),
42  fTriggerTime ( trigger_time ),
43  fBeamGateTime ( beamgate_time ),
44  fTriggerBits ( bits )
45  {}
46 
47  /// Trigger number
48  unsigned int TriggerNumber() const { return fTriggerNumber; }
49  /// Trigger time w.r.t. electronics clock T0 in us
50  double TriggerTime () const { return fTriggerTime; }
51  /// BeamGate time w.r.t. electronics clock T0 in us
52  double BeamGateTime () const { return fBeamGateTime; }
53  /// Trigger Bits
54  unsigned int TriggerBits () const { return fTriggerBits; }
55  /// Accessor to specific bit
56  bool Triggered(const unsigned char bit) const;
57 
58  };
59 }
60 
61 #endif
Trigger(unsigned int counter, double trigger_time, double beamgate_time, uint32_t bits)
Alternative constructor.
Definition: TriggerData.h:37
unsigned int TriggerNumber() const
Trigger number.
Definition: TriggerData.h:48
bool Triggered(const unsigned char bit) const
Accessor to specific bit.
Definition: TriggerData.cxx:8
Raw data description.
double TriggerTime() const
Trigger time w.r.t. electronics clock T0 in us.
Definition: TriggerData.h:50
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:31
double BeamGateTime() const
BeamGate time w.r.t. electronics clock T0 in us.
Definition: TriggerData.h:52
static int max(int a, int b)
Trigger()
Default ctor.
Definition: TriggerData.h:16
double fTriggerTime
Trigger time w.r.t. electronics clock T0.
Definition: TriggerData.h:29
unsigned int TriggerBits() const
Trigger Bits.
Definition: TriggerData.h:54
unsigned int fTriggerNumber
Trigger counter.
Definition: TriggerData.h:28
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: TriggerData.h:30