spine.data.larcv.Trigger
- class spine.data.larcv.Trigger(id: int = -1, type: int = -1, time_s: int = -1, time_ns: int = -1, beam_time_s: int = -1, beam_time_ns: int = -1)[source]
Trigger information.
- id
Trigger ID
- Type:
int
- type
DAQ-specific trigger type
- Type:
int
- time_s
Integer seconds component of the UNIX trigger time
- Type:
int
- time_ns
Integer nanoseconds component of the UNIX trigger time
- Type:
int
- beam_time_s
Integer seconds component of the UNIX beam pulse time
- Type:
int
- beam_time_ns
Integer seconds component of the UNIX beam pulse time
- Type:
int
- Attributes:
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
index_attrsReturn the tuple of index-bearing attributes.
Methods
as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
from_larcv(trigger)Builds and returns a Trigger object from a LArCV Trigger object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
value_with_units(attr)Fetch an attribute value with its documented units.
- __init__(id: int = -1, type: int = -1, time_s: int = -1, time_ns: int = -1, beam_time_s: int = -1, beam_time_ns: int = -1) None
Methods
__init__([id, type, time_s, time_ns, ...])as_dict([lite, include_derived])Returns the data class as dictionary of (key, value) pairs.
attr_names([include_derived, ...])Return the names of valid attributes on this data class.
from_dict(cls_dict)Builds and returns an object of the class from a dictionary of attributes.
from_larcv(trigger)Builds and returns a Trigger object from a LArCV Trigger object.
scalar_dict([attrs, lengths, lite])Returns the data class attributes as a dictionary of scalars.
set_precision([precision])Casts all the vector attributes to a different precision.
shift_indexes(shifts)Apply offsets to index attributes in place.
value_with_units(attr)Fetch an attribute value with its documented units.
Attributes
enum_attrsFetches HDF5-friendly enumerator descriptors for enum-backed fields.
enum_dictsFetches the dictionary of enumerated attributes and their enumerator descriptors.
enum_valuesFetches reverse enum lookups from stored values to symbolic names.
field_unitsFetches the documented units for each field.
index_attrsReturn the tuple of index-bearing attributes.
- id: int = -1
- type: int = -1
- time_s: int = -1
- time_ns: int = -1
- beam_time_s: int = -1
- beam_time_ns: int = -1
- classmethod from_larcv(trigger) Trigger[source]
Builds and returns a Trigger object from a LArCV Trigger object.
- Parameters:
trigger (larcv.Trigger) – LArCV-format trigger information
- Returns:
Trigger object
- Return type: