All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
sbn::ExtraTriggerInfo Struct Reference

Additional information on trigger. More...

#include <ExtraTriggerInfo.h>

Classes

struct  CryostatInfo
 Trigger data pertaining a single cryostat. More...
 

Public Member Functions

constexpr bool isValid () const noexcept
 Returns whether this object contains any valid information. More...
 

Static Public Member Functions

static constexpr bool isValidID (unsigned int ID) noexcept
 Returns whether the specified ID is valid (i.e. is not NoID). More...
 
static constexpr bool isValidTimestamp (std::uint64_t ts) noexcept
 Returns whether the timestamp ts is valid (i.e. is not NoTimestamp). More...
 
static constexpr bool isValidCount (unsigned int count) noexcept
 Returns whether the count is valid (i.e. is not 0). More...
 

Public Attributes

sbn::triggerSource sourceType { sbn::triggerSource::NBits }
 Type of this gate (sbn::triggerSource::NBits marks this object invalid). More...
 
sbn::triggerType triggerType { sbn::triggerType::NBits }
 Type of this trigger (see sbn::triggerType). More...
 
std::uint64_t enableGateTimestamp { NoTimestamp }
 Absolute timestamp of the opening of the enable gate [ns]. More...
 
Counters and times since the beginning of the run.
std::uint64_t triggerTimestamp { NoTimestamp }
 Absolute timestamp of this trigger [ns]. More...
 
std::uint64_t beamGateTimestamp { NoTimestamp }
 Absolute timestamp of the opening of this beam gate [ns]. More...
 
unsigned int triggerID { NoID }
 The identifier of this trigger (usually matching the event number). More...
 
unsigned int gateID { 0 }
 Incremental counter of gates from any source opened from start of the run. More...
 
unsigned int triggerCount { 0 }
 Incremental counter of triggers from this source from start of the run. More...
 
unsigned int gateCount { 0 }
 Incremental counter of gates from this source opened from start of the run. More...
 
Counters since the previous trigger from this same source
unsigned int gateCountFromPreviousTrigger { 0 }
 
unsigned int anyTriggerCountFromPreviousTrigger { 0 }
 
unsigned int anyGateCountFromPreviousTrigger { 0 }
 
Counters since the previous trigger from any source
sbn::triggerSource anyPreviousTriggerSourceType { sbn::triggerSource::Unknown }
 Type of the previous trigger. More...
 
unsigned int anyGateCountFromAnyPreviousTrigger { 0 }
 
Additional timestamps
std::uint64_t previousTriggerTimestamp { NoTimestamp }
 Absolute timestamp of the previous trigger from this same source [ns]. More...
 
std::uint64_t anyPreviousTriggerTimestamp { NoTimestamp }
 Absolute timestamp of the previous trigger from any source [ns]. More...
 
Decoding information
std::int64_t WRtimeToTriggerTime { UnknownCorrection }
 Correction added to the White Rabbit time to get the trigger time. More...
 

Static Public Attributes

static constexpr unsigned int NoID = std::numeric_limits<unsigned int>::max()
 Special ID value indicating the absence of an ID. More...
 
static constexpr std::uint64_t NoTimestamp = std::numeric_limits<std::uint64_t>::max()
 Special timestamp value indicating the absence of timestamp. More...
 
static constexpr std::int64_t UnknownCorrection = std::numeric_limits<std::int64_t>::max()
 Special timestamp correction value indicating an unknown correction. More...
 

Trigger topology

The information is represented in groups of cryostats and, within each of them, of PMT "walls", that is groups of PMT lying on the same geometric plane (in SBN detectors that is behind each anode).

Currently the information is represented by fixed size arrays, because the overhead of a variable length container (std::vector) is comparable to the data itself.

static constexpr std::size_t MaxCryostats { 2 }
 Maximum number of cryostats in the detector. More...
 
static constexpr std::size_t MaxWalls { 2 }
 Maximum number of PMT "walls" in a cryostat. More...
 
static constexpr std::size_t EastCryostat { 0 }
 Mnemonic index for the east cryostat. More...
 
static constexpr std::size_t WestCryostat { 1 }
 Mnemonic index for the west cryostat. More...
 
static constexpr std::size_t EastPMTwall { 0 }
 Mnemonic index for the east PMT wall within a cryostat. More...
 
static constexpr std::size_t WestPMTwall { 1 }
 Mnemonic index for the west PMT wall within a cryostat. More...
 
unsigned int triggerLocationBits { 0U }
 Bits for the trigger location (. More...
 
std::array< CryostatInfo,
MaxCryostats
cryostats
 Status of each LVDS channel in each PMT wall at trigger time. More...
 
sbn::bits::triggerLocationMask triggerLocation () const
 Returns the location of the trigger. More...
 

Detailed Description

Additional information on trigger.

This data structure holds information from the trigger that has no place in the standard LArSoft data products (raw::Trigger and raw::ExternalTrigger).

Absolute times are counted since The Epoch and are in UTC time.

Some "historical" information is available:

Some historical information is available for different gate selections:

Definition at line 45 of file ExtraTriggerInfo.h.

Member Function Documentation

constexpr bool sbn::ExtraTriggerInfo::isValid ( ) const
inlinenoexcept

Returns whether this object contains any valid information.

Definition at line 257 of file ExtraTriggerInfo.h.

258  { return sourceType != sbn::triggerSource::NBits; }
sbn::triggerSource sourceType
Type of this gate (sbn::triggerSource::NBits marks this object invalid).
static constexpr bool sbn::ExtraTriggerInfo::isValidCount ( unsigned int  count)
inlinestaticnoexcept

Returns whether the count is valid (i.e. is not 0).

Definition at line 270 of file ExtraTriggerInfo.h.

271  { return count != 0U; }
std::size_t count(Cont const &cont)
static constexpr bool sbn::ExtraTriggerInfo::isValidID ( unsigned int  ID)
inlinestaticnoexcept

Returns whether the specified ID is valid (i.e. is not NoID).

Definition at line 262 of file ExtraTriggerInfo.h.

263  { return ID != NoID; }
static constexpr unsigned int NoID
Special ID value indicating the absence of an ID.
static constexpr bool sbn::ExtraTriggerInfo::isValidTimestamp ( std::uint64_t  ts)
inlinestaticnoexcept

Returns whether the timestamp ts is valid (i.e. is not NoTimestamp).

Definition at line 266 of file ExtraTriggerInfo.h.

267  { return ts != NoTimestamp; }
static constexpr std::uint64_t NoTimestamp
Special timestamp value indicating the absence of timestamp.
sbn::bits::triggerLocationMask sbn::ExtraTriggerInfo::triggerLocation ( ) const
inline

Returns the location of the trigger.

The returned value is a mask of sbn::bits::triggerLocation bits. To test the state of a bit, it needs to be converted into a mask, e.g.:

bool onTPCEE
= extraTriggerInfo.triggerLocation() & mask(sbn::triggerLocation::TPCEE);
bool onTPCxE = extraTriggerInfo.triggerLocation()
& mask(sbn::triggerLocation::TPCEE, sbn::triggerLocation::TPCWE);

Definition at line 247 of file ExtraTriggerInfo.h.

248  { return { triggerLocationBits }; }
unsigned int triggerLocationBits
Bits for the trigger location (.

Member Data Documentation

unsigned int sbn::ExtraTriggerInfo::anyGateCountFromAnyPreviousTrigger { 0 }

Gates from any source since the previous trigger also from any source (minimum is 1: the current gate).

Definition at line 126 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::anyGateCountFromPreviousTrigger { 0 }

Gates from any source since the previous trigger also of this source (minimum is 1: the current trigger).

Definition at line 110 of file ExtraTriggerInfo.h.

sbn::triggerSource sbn::ExtraTriggerInfo::anyPreviousTriggerSourceType { sbn::triggerSource::Unknown }

Type of the previous trigger.

Definition at line 122 of file ExtraTriggerInfo.h.

std::uint64_t sbn::ExtraTriggerInfo::anyPreviousTriggerTimestamp { NoTimestamp }

Absolute timestamp of the previous trigger from any source [ns].

Definition at line 142 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::anyTriggerCountFromPreviousTrigger { 0 }

Triggers from any source since the previous trigger also of this source (minimum is 1: the current trigger).

Definition at line 106 of file ExtraTriggerInfo.h.

std::uint64_t sbn::ExtraTriggerInfo::beamGateTimestamp { NoTimestamp }

Absolute timestamp of the opening of this beam gate [ns].

Definition at line 77 of file ExtraTriggerInfo.h.

std::array<CryostatInfo, MaxCryostats> sbn::ExtraTriggerInfo::cryostats

Status of each LVDS channel in each PMT wall at trigger time.

Definition at line 233 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::EastCryostat { 0 }
static

Mnemonic index for the east cryostat.

Definition at line 179 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::EastPMTwall { 0 }
static

Mnemonic index for the east PMT wall within a cryostat.

Definition at line 185 of file ExtraTriggerInfo.h.

std::uint64_t sbn::ExtraTriggerInfo::enableGateTimestamp { NoTimestamp }

Absolute timestamp of the opening of the enable gate [ns].

Definition at line 66 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::gateCount { 0 }

Incremental counter of gates from this source opened from start of the run.

Definition at line 89 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::gateCountFromPreviousTrigger { 0 }

Gates from this source since the previous trigger also of this source (minimum is 1: the current gate).

Definition at line 102 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::gateID { 0 }

Incremental counter of gates from any source opened from start of the run.

Definition at line 83 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::MaxCryostats { 2 }
static

Maximum number of cryostats in the detector.

Definition at line 173 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::MaxWalls { 2 }
static

Maximum number of PMT "walls" in a cryostat.

Definition at line 176 of file ExtraTriggerInfo.h.

constexpr unsigned int sbn::ExtraTriggerInfo::NoID = std::numeric_limits<unsigned int>::max()
static

Special ID value indicating the absence of an ID.

Definition at line 48 of file ExtraTriggerInfo.h.

constexpr std::uint64_t sbn::ExtraTriggerInfo::NoTimestamp = std::numeric_limits<std::uint64_t>::max()
static

Special timestamp value indicating the absence of timestamp.

Definition at line 52 of file ExtraTriggerInfo.h.

std::uint64_t sbn::ExtraTriggerInfo::previousTriggerTimestamp { NoTimestamp }

Absolute timestamp of the previous trigger from this same source [ns].

Definition at line 139 of file ExtraTriggerInfo.h.

sbn::triggerSource sbn::ExtraTriggerInfo::sourceType { sbn::triggerSource::NBits }

Type of this gate (sbn::triggerSource::NBits marks this object invalid).

Definition at line 60 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::triggerCount { 0 }

Incremental counter of triggers from this source from start of the run.

Definition at line 86 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::triggerID { NoID }

The identifier of this trigger (usually matching the event number).

Definition at line 80 of file ExtraTriggerInfo.h.

unsigned int sbn::ExtraTriggerInfo::triggerLocationBits { 0U }

Bits for the trigger location (.

See Also
triggerLocation()).

Definition at line 230 of file ExtraTriggerInfo.h.

std::uint64_t sbn::ExtraTriggerInfo::triggerTimestamp { NoTimestamp }

Absolute timestamp of this trigger [ns].

Definition at line 74 of file ExtraTriggerInfo.h.

sbn::triggerType sbn::ExtraTriggerInfo::triggerType { sbn::triggerType::NBits }

Type of this trigger (see sbn::triggerType).

Definition at line 63 of file ExtraTriggerInfo.h.

constexpr std::int64_t sbn::ExtraTriggerInfo::UnknownCorrection = std::numeric_limits<std::int64_t>::max()
static

Special timestamp correction value indicating an unknown correction.

Definition at line 56 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::WestCryostat { 1 }
static

Mnemonic index for the west cryostat.

Definition at line 182 of file ExtraTriggerInfo.h.

constexpr std::size_t sbn::ExtraTriggerInfo::WestPMTwall { 1 }
static

Mnemonic index for the west PMT wall within a cryostat.

Definition at line 188 of file ExtraTriggerInfo.h.

std::int64_t sbn::ExtraTriggerInfo::WRtimeToTriggerTime { UnknownCorrection }

Correction added to the White Rabbit time to get the trigger time.

Definition at line 153 of file ExtraTriggerInfo.h.


The documentation for this struct was generated from the following file: