DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
triggeralgs
include
triggeralgs
TAWindow.hpp
Go to the documentation of this file.
1
/* @file: TAWindow.hpp
2
*
3
* This is party of the DUNE DAQ Application Framework, copyright 2021.
4
* Licensing/copyright details are in the COPYING file that you should have
5
* received with this code.
6
*/
7
8
#ifndef TRIGGERALGS_TAWINDOW_HPP_
9
#define TRIGGERALGS_TAWINDOW_HPP_
10
11
#include "
triggeralgs/TriggerActivity.hpp
"
12
#include "
triggeralgs/Types.hpp
"
13
14
#include <ostream>
15
#include <unordered_map>
16
17
namespace
triggeralgs
{
18
19
class
TAWindow
20
{
21
public
:
22
bool
is_empty
()
const
{
return
inputs
.empty(); };
23
29
void
add
(
const
TriggerActivity
& input_ta);
30
32
void
clear
();
33
34
uint16_t
n_channels_hit
() {
return
channel_states
.size(); };
35
44
void
move
(
TriggerActivity
const
& input_ta,
timestamp_t
const
& window_length);
45
48
void
reset
(
TriggerActivity
const
& input_ta);
49
50
friend
std::ostream&
operator<<
(std::ostream& os,
const
TAWindow
& window);
51
52
timestamp_t
time_start
= 0;
53
uint64_t
adc_integral
= 0;
54
std::unordered_map<channel_t, uint16_t>
channel_states
;
55
std::vector<TriggerActivity>
inputs
;
56
};
57
58
}
// namespace triggeralgs
59
60
#endif
// TRIGGERALGS_TAWINDOW_HPP_
TriggerActivity.hpp
triggeralgs::TAWindow
Definition
TAWindow.hpp:20
triggeralgs::TAWindow::adc_integral
uint64_t adc_integral
Definition
TAWindow.hpp:53
triggeralgs::TAWindow::time_start
timestamp_t time_start
Definition
TAWindow.hpp:52
triggeralgs::TAWindow::clear
void clear()
Clear all inputs.
Definition
TAWindow.cpp:35
triggeralgs::TAWindow::add
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...
Definition
TAWindow.cpp:16
triggeralgs::TAWindow::inputs
std::vector< TriggerActivity > inputs
Definition
TAWindow.hpp:55
triggeralgs::TAWindow::channel_states
std::unordered_map< channel_t, uint16_t > channel_states
Definition
TAWindow.hpp:54
triggeralgs::TAWindow::is_empty
bool is_empty() const
Definition
TAWindow.hpp:22
triggeralgs::TAWindow::reset
void reset(TriggerActivity const &input_ta)
Reset window content on the input.
Definition
TAWindow.cpp:79
triggeralgs::TAWindow::n_channels_hit
uint16_t n_channels_hit()
Definition
TAWindow.hpp:34
triggeralgs::TAWindow::operator<<
friend std::ostream & operator<<(std::ostream &os, const TAWindow &window)
Definition
TAWindow.cpp:98
triggeralgs::TAWindow::move
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...
Definition
TAWindow.cpp:45
triggeralgs
Definition
AbstractFactory.hpp:18
triggeralgs::timestamp_t
dunedaq::trgdataformats::timestamp_t timestamp_t
Definition
Types.hpp:16
triggeralgs::TriggerActivity
Definition
TriggerActivity.hpp:20
Types.hpp
Generated on
for DUNE-DAQ by
1.17.0