#include <TAWindow.hpp>
|
bool | is_empty () const |
|
void | add (const TriggerActivity &input_ta) |
| Add the input TA's contribution to the total ADC, increase the hit count of all of the channels which feature and add it to the TA list keeping the TA list time ordered by time_start. Preserving time order makes moving easier.
|
|
void | clear () |
| Clear all inputs.
|
|
uint16_t | n_channels_hit () |
|
void | move (TriggerActivity const &input_ta, timestamp_t const &window_length) |
| Find all of the TAs in the window that need to be removed if the input_ta is to be added and the size of the window is to be conserved. Subtract those TAs' contribution from the total window ADC and remove their contributions to the hit counts.
|
|
void | reset (TriggerActivity const &input_ta) |
| Reset window content on the input.
|
|
Definition at line 19 of file TAWindow.hpp.
◆ add()
Add the input TA's contribution to the total ADC, increase the hit count of all of the channels which feature and add it to the TA list keeping the TA list time ordered by time_start. Preserving time order makes moving easier.
- Parameters
-
Definition at line 16 of file TAWindow.cpp.
17{
18
22 }
23
24 uint16_t insert_at = 0;
26 if (input_ta.time_start < ta.time_start)
27 break;
28 insert_at++;
29 }
31}
std::vector< TriggerActivity > inputs
std::unordered_map< channel_t, uint16_t > channel_states
dunedaq::trgdataformats::TriggerPrimitive TriggerPrimitive
◆ clear()
void triggeralgs::TAWindow::clear |
( |
| ) |
|
◆ is_empty()
bool triggeralgs::TAWindow::is_empty |
( |
| ) |
const |
|
inline |
◆ move()
Find all of the TAs in the window that need to be removed if the input_ta is to be added and the size of the window is to be conserved. Subtract those TAs' contribution from the total window ADC and remove their contributions to the hit counts.
- Parameters
-
Definition at line 45 of file TAWindow.cpp.
46{
47 uint32_t n_tas_to_erase = 0;
49 if (!(input_ta.time_start - ta.time_start < window_length)) {
50 n_tas_to_erase++;
54
55
56
59 }
60 } else
61 break;
62 }
63
65
66
70 } else {
72 }
73
74
75}
void add(const TriggerActivity &input_ta)
Add the input TA's contribution to the total ADC, increase the hit count of all of the channels which...
void reset(TriggerActivity const &input_ta)
Reset window content on the input.
◆ n_channels_hit()
uint16_t triggeralgs::TAWindow::n_channels_hit |
( |
| ) |
|
|
inline |
◆ reset()
Reset window content on the input.
- Parameters
-
Definition at line 79 of file TAWindow.cpp.
80{
81
84
85
87
89
92 }
93
94 inputs.push_back(input_ta);
95}
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | os, |
|
|
const TAWindow & | window ) |
|
friend |
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};
◆ adc_integral
uint64_t triggeralgs::TAWindow::adc_integral = 0 |
◆ channel_states
std::unordered_map<channel_t, uint16_t> triggeralgs::TAWindow::channel_states |
◆ inputs
◆ time_start
The documentation for this class was generated from the following files:
- /github/workspace/dunedaq/sourcecode/triggeralgs/include/triggeralgs/TAWindow.hpp
- /github/workspace/dunedaq/sourcecode/triggeralgs/src/TAWindow.cpp