Public Member Functions | Private Attributes | List of all members
gar::raw::Trigger Class Reference

#include <Trigger.h>

Public Member Functions

 Trigger ()
 Default ctor. More...
 
 Trigger (unsigned int counter, double trigger_time, double beamgate_time, uint32_t bits)
 Alternative constructor. More...
 
unsigned int TriggerNumber () const
 Trigger number. More...
 
double TriggerTime () const
 Trigger time w.r.t. electronics clock T0 in us. More...
 
double BeamGateTime () const
 BeamGate time w.r.t. electronics clock T0 in us. More...
 
unsigned int TriggerBits () const
 Trigger Bits. More...
 
bool Triggered (const unsigned char bit) const
 Accessor to specific bit. More...
 

Private Attributes

unsigned int fTriggerNumber
 Trigger counter. More...
 
double fTriggerTime
 Trigger time w.r.t. electronics clock T0. More...
 
double fBeamGateTime
 BeamGate time w.r.t. electronics clock T0. More...
 
unsigned int fTriggerBits
 Trigger bits ... dedicated bit-by-bit function available. More...
 

Detailed Description

Definition at line 13 of file Trigger.h.

Constructor & Destructor Documentation

gar::raw::Trigger::Trigger ( )
inline

Default ctor.

Definition at line 18 of file Trigger.h.

19  {
21 
24 
25  fTriggerBits = 0x0;
26  }
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: Trigger.h:32
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
unsigned int fTriggerNumber
Trigger counter.
Definition: Trigger.h:30
static int max(int a, int b)
gar::raw::Trigger::Trigger ( unsigned int  counter,
double  trigger_time,
double  beamgate_time,
uint32_t  bits 
)
inline

Alternative constructor.

Definition at line 40 of file Trigger.h.

46  , fBeamGateTime (beamgate_time)
47  , fTriggerBits (bits )
48  {}
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: Trigger.h:32
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
timescale_traits< TriggerTimeCategory >::time_point_t trigger_time
A point in time on the trigger time scale.
unsigned int fTriggerNumber
Trigger counter.
Definition: Trigger.h:30

Member Function Documentation

double gar::raw::Trigger::BeamGateTime ( ) const
inline

BeamGate time w.r.t. electronics clock T0 in us.

Definition at line 55 of file Trigger.h.

55 { return fBeamGateTime; }
double fBeamGateTime
BeamGate time w.r.t. electronics clock T0.
Definition: Trigger.h:32
unsigned int gar::raw::Trigger::TriggerBits ( ) const
inline

Trigger Bits.

Definition at line 57 of file Trigger.h.

57 { return fTriggerBits; }
unsigned int fTriggerBits
Trigger bits ... dedicated bit-by-bit function available.
Definition: Trigger.h:33
bool gar::raw::Trigger::Triggered ( const unsigned char  bit) const

Accessor to specific bit.

Definition at line 10 of file Trigger.cxx.

11  {
12 
13  if(bit>32) {
14  throw std::invalid_argument("\n\nCannot access bit higher than 32!\n");
15  }
16 
17  return ( (fTriggerBits >> bit) & 0x1);
18 
19  }
unsigned int fTriggerBits
Trigger bits ... dedicated bit-by-bit function available.
Definition: Trigger.h:33
unsigned int gar::raw::Trigger::TriggerNumber ( ) const
inline

Trigger number.

Definition at line 51 of file Trigger.h.

51 { return fTriggerNumber; }
unsigned int fTriggerNumber
Trigger counter.
Definition: Trigger.h:30
double gar::raw::Trigger::TriggerTime ( ) const
inline

Trigger time w.r.t. electronics clock T0 in us.

Definition at line 53 of file Trigger.h.

53 { return fTriggerTime; }
double fTriggerTime
Trigger time w.r.t. electronics clock T0.
Definition: Trigger.h:31

Member Data Documentation

double gar::raw::Trigger::fBeamGateTime
private

BeamGate time w.r.t. electronics clock T0.

Definition at line 32 of file Trigger.h.

unsigned int gar::raw::Trigger::fTriggerBits
private

Trigger bits ... dedicated bit-by-bit function available.

Definition at line 33 of file Trigger.h.

unsigned int gar::raw::Trigger::fTriggerNumber
private

Trigger counter.

Definition at line 30 of file Trigger.h.

double gar::raw::Trigger::fTriggerTime
private

Trigger time w.r.t. electronics clock T0.

Definition at line 31 of file Trigger.h.


The documentation for this class was generated from the following files: