Trigger.h
Go to the documentation of this file.
1 #ifndef TRIGGER_H
2 #define TRIGGER_H
3 
4 // C++ includes
5 #include <vector>
6 #include <limits>
7 #include <stdexcept>
8 #include <iostream>
9 
10 namespace gar {
11  namespace raw {
12 
13  class Trigger {
14 
15  public:
16 
17  /// Default ctor
19  {
21 
24 
25  fTriggerBits = 0x0;
26  }
27 
28  private:
29 
30  unsigned int fTriggerNumber; ///< Trigger counter
31  double fTriggerTime; ///< Trigger time w.r.t. electronics clock T0
32  double fBeamGateTime; ///< BeamGate time w.r.t. electronics clock T0
33  unsigned int fTriggerBits; ///< Trigger bits ... dedicated bit-by-bit function available
34 
35  public:
36 
37 #ifndef __GCCXML__
38 
39  /// Alternative constructor
40  Trigger(unsigned int counter,
41  double trigger_time,
42  double beamgate_time,
43  uint32_t bits)
44  : fTriggerNumber(counter )
45  , fTriggerTime (trigger_time )
46  , fBeamGateTime (beamgate_time)
47  , fTriggerBits (bits )
48  {}
49 
50  /// Trigger number
51  unsigned int TriggerNumber() const { return fTriggerNumber; }
52  /// Trigger time w.r.t. electronics clock T0 in us
53  double TriggerTime () const { return fTriggerTime; }
54  /// BeamGate time w.r.t. electronics clock T0 in us
55  double BeamGateTime () const { return fBeamGateTime; }
56  /// Trigger Bits
57  unsigned int TriggerBits () const { return fTriggerBits; }
58  /// Accessor to specific bit
59  bool Triggered(const unsigned char bit) const;
60 
61 #endif
62  };
63  }
64 } // gar
65 
66 #endif
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: Trigger.h:32
Trigger(unsigned int counter, double trigger_time, double beamgate_time, uint32_t bits)
Alternative constructor.
Definition: Trigger.h:40
unsigned int fTriggerBits
Trigger bits ... dedicated bit-by-bit function available.
Definition: Trigger.h:33
double fTriggerTime
Trigger time w.r.t. electronics clock T0.
Definition: Trigger.h:31
double BeamGateTime() const
BeamGate time w.r.t. electronics clock T0 in us.
Definition: Trigger.h:55
Raw data description.
timescale_traits< TriggerTimeCategory >::time_point_t trigger_time
A point in time on the trigger time scale.
bool Triggered(const unsigned char bit) const
Accessor to specific bit.
Definition: Trigger.cxx:10
unsigned int fTriggerNumber
Trigger counter.
Definition: Trigger.h:30
static int max(int a, int b)
unsigned int TriggerBits() const
Trigger Bits.
Definition: Trigger.h:57
General GArSoft Utilities.
unsigned int TriggerNumber() const
Trigger number.
Definition: Trigger.h:51
double TriggerTime() const
Trigger time w.r.t. electronics clock T0 in us.
Definition: Trigger.h:53
Trigger()
Default ctor.
Definition: Trigger.h:18