DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
triggeralgs Namespace Reference

Namespaces

namespace  dbscan
 

Classes

class  AbstractFactory
 
class  TAMakerADCSimpleWindowAlgorithm
 
class  TAMakerBundleNAlgorithm
 
class  TAMakerChannelAdjacencyAlgorithm
 
class  TAMakerChannelDistanceAlgorithm
 
class  TAMakerDBSCANAlgorithm
 
class  TAMakerHorizontalMuonAlgorithm
 
class  TAMakerMichelElectronAlgorithm
 
class  TAMakerPlaneCoincidenceAlgorithm
 
class  TAMakerPrescaleAlgorithm
 
class  TAMakerSupernovaAlgorithm
 
class  TAWindow
 
class  TCMakerADCSimpleWindowAlgorithm
 
class  TCMakerBundleNAlgorithm
 
class  TCMakerChannelAdjacencyAlgorithm
 
class  TCMakerChannelDistanceAlgorithm
 
class  TCMakerDBSCANAlgorithm
 
class  TCMakerHorizontalMuonAlgorithm
 
class  TCMakerMichelElectronAlgorithm
 
class  TCMakerPlaneCoincidenceAlgorithm
 
class  TCMakerPrescaleAlgorithm
 
class  TCMakerSupernovaAlgorithm
 
class  TDMakerSupernovaAlgorithm
 
class  TPWindow
 
struct  TriggerActivity
 
class  TriggerActivityFactory
 
class  TriggerActivityMaker
 
struct  TriggerCandidate
 
class  TriggerCandidateFactory
 
class  TriggerCandidateMaker
 
struct  TriggerDecision
 
class  TriggerDecisionMaker
 
class  TriggerPrimitiveMaker
 
struct  TypeToOverlayType
 
struct  TypeToOverlayType< TriggerActivity >
 
struct  TypeToOverlayType< TriggerCandidate >
 

Typedefs

using TriggerPrimitive = dunedaq::trgdataformats::TriggerPrimitive
 
using timestamp_t = dunedaq::trgdataformats::timestamp_t
 
using timestamp_diff_t = dunedaq::trgdataformats::timestamp_diff_t
 
using detid_t = dunedaq::trgdataformats::detid_t
 
using trigger_number_t = dunedaq::trgdataformats::trigger_number_t
 
using channel_t = dunedaq::trgdataformats::channel_t
 
using channel_diff_t = dunedaq::trgdataformats::channel_diff_t
 
using version_t = dunedaq::trgdataformats::version_t
 

Enumerations

enum  Logging {
  TLVL_VERY_IMPORTANT = 1 , TLVL_IMPORTANT = 2 , TLVL_GENERAL = 3 , TLVL_DEBUG_INFO = 4 ,
  TLVL_DEBUG_LOW = 5 , TLVL_DEBUG_MEDIUM = 10 , TLVL_DEBUG_HIGH = 15 , TLVL_DEBUG_ALL = 20
}
 Common name used by TRACE TLOG calls from this package. More...
 

Functions

template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t, class Data = typename TypeToOverlayType<Object>::data_t>
void write_overlay (const Object &object, void *buffer)
 
template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t>
size_t get_overlay_nbytes (const Object &object)
 
template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t, class Data = typename TypeToOverlayType<Object>::data_t>
Object read_overlay (const Overlay &overlay)
 
template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t>
Object read_overlay_from_buffer (const void *buffer)
 
std::ostream & operator<< (std::ostream &os, const TAWindow &window)
 
std::ostream & operator<< (std::ostream &os, const TPWindow &window)
 

Typedef Documentation

◆ channel_diff_t

◆ channel_t

◆ detid_t

◆ timestamp_diff_t

using triggeralgs::timestamp_diff_t = dunedaq::trgdataformats::timestamp_diff_t

Definition at line 17 of file Types.hpp.

◆ timestamp_t

using triggeralgs::timestamp_t = dunedaq::trgdataformats::timestamp_t

Definition at line 16 of file Types.hpp.

◆ trigger_number_t

using triggeralgs::trigger_number_t = dunedaq::trgdataformats::trigger_number_t

Definition at line 19 of file Types.hpp.

◆ TriggerPrimitive

◆ version_t

Enumeration Type Documentation

◆ Logging

Common name used by TRACE TLOG calls from this package.

Enumerator
TLVL_VERY_IMPORTANT 
TLVL_IMPORTANT 
TLVL_GENERAL 
TLVL_DEBUG_INFO 
TLVL_DEBUG_LOW 
TLVL_DEBUG_MEDIUM 
TLVL_DEBUG_HIGH 
TLVL_DEBUG_ALL 

Definition at line 16 of file Logging.hpp.

17{
18 TLVL_VERY_IMPORTANT = 1,
19 TLVL_IMPORTANT = 2,
20 TLVL_GENERAL = 3,
21 TLVL_DEBUG_INFO = 4,
22 TLVL_DEBUG_LOW = 5,
23 TLVL_DEBUG_MEDIUM = 10,
24 TLVL_DEBUG_HIGH = 15,
25 TLVL_DEBUG_ALL = 20
26};

Function Documentation

◆ get_overlay_nbytes()

template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t>
size_t triggeralgs::get_overlay_nbytes ( const Object & object)

Definition at line 68 of file TriggerObjectOverlay.hpp.

69{
70 // Need to check that this is actually right: what does sizeof
71 // return when the class contains a flexible array member? Seems to
72 // work in unit tests, so probably this is right
73 return sizeof(Overlay) + object.inputs.size() * sizeof(typename Overlay::input_t);
74}

◆ operator<<() [1/2]

std::ostream & triggeralgs::operator<< ( std::ostream & os,
const TAWindow & window )

Definition at line 97 of file TAWindow.cpp.

99{
100 if (window.is_empty())
101 os << "Window is empty!\n";
102 else {
103 os << "Window start: " << window.time_start << ", end: " << window.inputs.back().time_start;
104 os << ". Total of: " << window.adc_integral << " ADC counts with " << window.inputs.size() << " TPs.\n";
105 os << window.channel_states.size() << " independent channels have hits.\n";
106 }
107 return os;
108};
timestamp_t time_start
Definition TAWindow.hpp:52
std::vector< TriggerActivity > inputs
Definition TAWindow.hpp:55
std::unordered_map< channel_t, uint16_t > channel_states
Definition TAWindow.hpp:54
bool is_empty() const
Definition TAWindow.hpp:22

◆ operator<<() [2/2]

std::ostream & triggeralgs::operator<< ( std::ostream & os,
const TPWindow & window )

Definition at line 96 of file TPWindow.cpp.

98{
99 if (window.is_empty()) {
100 os << "Window is empty!\n";
101 } else {
102 os << "Window start: " << window.time_start << ", end: " << window.inputs.back().time_start;
103 os << ". Total of: " << window.adc_integral << " ADC counts with " << window.inputs.size() << " TPs.\n";
104 os << window.channel_states.size() << " independent channels have hits.\n";
105 }
106 return os;
107}
std::unordered_map< channel_t, uint16_t > channel_states
Definition TPWindow.hpp:39
bool is_empty() const
Definition TPWindow.cpp:14
std::vector< TriggerPrimitive > inputs
Definition TPWindow.hpp:40
timestamp_t time_start
Definition TPWindow.hpp:37

◆ read_overlay()

template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t, class Data = typename TypeToOverlayType<Object>::data_t>
Object triggeralgs::read_overlay ( const Overlay & overlay)

Definition at line 82 of file TriggerObjectOverlay.hpp.

83{
84 Object ret;
85 // overlay.data is a Trigger(Activity|Candidate)Data, which is the
86 // base class of Trigger(Activity|Candidate). So we want to set the
87 // base-class part of `ret` to `overlay.data`, which is what the
88 // static_cast is for. We have to do the cast on the pointer to get
89 // reference semantics (without the &, we get a _copy_ of ret, which
90 // is not what we want)
91 *static_cast<Data*>(&ret) = overlay.data;
92 for (uint64_t i = 0; i < overlay.n_inputs; ++i) {
93 ret.inputs.push_back(overlay.inputs[i]);
94 }
95 return ret;
96}

◆ read_overlay_from_buffer()

template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t>
Object triggeralgs::read_overlay_from_buffer ( const void * buffer)

Definition at line 108 of file TriggerObjectOverlay.hpp.

109{
110 return read_overlay<Object, Overlay>(*reinterpret_cast<const Overlay*>(buffer));
111}

◆ write_overlay()

template<class Object , class Overlay = typename TypeToOverlayType<Object>::overlay_t, class Data = typename TypeToOverlayType<Object>::data_t>
void triggeralgs::write_overlay ( const Object & object,
void * buffer )

Definition at line 54 of file TriggerObjectOverlay.hpp.

55{
56 Overlay* overlay = reinterpret_cast<Overlay*>(buffer);
57 overlay->data = static_cast<Data>(object);
58 overlay->n_inputs = object.inputs.size();
59 for (size_t i = 0; i < object.inputs.size(); ++i) {
60 overlay->inputs[i] = object.inputs[i];
61 }
62}