DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
triggeralgs
include
triggeralgs
ProtoDUNEBSMWindow
ProtoDUNEBSMWindow.hpp
Go to the documentation of this file.
1
#ifndef TRIGGERALGS_PROTODUNEBSMWINDOW_HPP_
2
#define TRIGGERALGS_PROTODUNEBSMWINDOW_HPP_
3
4
#include "
triggeralgs/TriggerPrimitive.hpp
"
5
#include "
triggeralgs/Types.hpp
"
6
#include "
triggeralgs/ProtoDUNEBSMWindow/treelitemodel.hpp
"
7
#include "
triggeralgs/ProtoDUNEBSMWindow/PDVDEffectiveChannelMap.hpp
"
8
9
#include <ostream>
10
#include <vector>
11
#include <numeric>
12
13
namespace
triggeralgs
{
14
15
// Class to hold data of TPs within a window in time.
16
// Functions to move the window along in time by removing
17
// old TPs and add in newer ones
18
// Function to bin the TPs in the window as a function of
19
// channel and time
20
class
ProtoDUNEBSMWindow
{
21
public
:
22
bool
is_empty
()
const
;
23
void
add
(
TriggerPrimitive
const
&input_tp);
24
void
clear
();
25
void
move
(
TriggerPrimitive
const
&input_tp,
timestamp_t
const
&window_length);
26
void
reset
(
TriggerPrimitive
const
&input_tp);
27
28
// Bins the TPs as a function of channel and time
29
// If running in PD-VD then effective channel ID is used
30
void
bin_window
(std::vector<float> &input,
31
int
num_time_bins,
timestamp_t
time_bin_width,
32
int
num_chan_bins,
channel_t
n_channels_on_plane,
channel_t
first_channel,
33
std::unique_ptr<PDVDEffectiveChannelMap>
const
&effective_channel_mapper,
34
bool
use_pdvd_map);
35
36
void
fill_entry_window
(std::vector<Entry> &entry_input, std::vector<float> &input);
37
38
friend
std::ostream&
operator<<
(std::ostream& os,
const
ProtoDUNEBSMWindow
& window);
39
40
timestamp_t
time_start
;
41
uint32_t
adc_integral
;
42
std::vector<TriggerPrimitive>
tp_list
;
43
};
44
}
45
#endif
// TRIGGERALGS_PROTODUNEBSMWINDOW_HPP_
PDVDEffectiveChannelMap.hpp
triggeralgs::ProtoDUNEBSMWindow
Definition
ProtoDUNEBSMWindow.hpp:20
triggeralgs::ProtoDUNEBSMWindow::time_start
timestamp_t time_start
Definition
ProtoDUNEBSMWindow.hpp:40
triggeralgs::ProtoDUNEBSMWindow::tp_list
std::vector< TriggerPrimitive > tp_list
Definition
ProtoDUNEBSMWindow.hpp:42
triggeralgs::ProtoDUNEBSMWindow::bin_window
void bin_window(std::vector< float > &input, int num_time_bins, timestamp_t time_bin_width, int num_chan_bins, channel_t n_channels_on_plane, channel_t first_channel, std::unique_ptr< PDVDEffectiveChannelMap > const &effective_channel_mapper, bool use_pdvd_map)
Definition
ProtoDUNEBSMWindow.cpp:60
triggeralgs::ProtoDUNEBSMWindow::operator<<
friend std::ostream & operator<<(std::ostream &os, const ProtoDUNEBSMWindow &window)
Definition
ProtoDUNEBSMWindow.cpp:95
triggeralgs::ProtoDUNEBSMWindow::clear
void clear()
Definition
ProtoDUNEBSMWindow.cpp:20
triggeralgs::ProtoDUNEBSMWindow::add
void add(TriggerPrimitive const &input_tp)
Definition
ProtoDUNEBSMWindow.cpp:13
triggeralgs::ProtoDUNEBSMWindow::reset
void reset(TriggerPrimitive const &input_tp)
Definition
ProtoDUNEBSMWindow.cpp:48
triggeralgs::ProtoDUNEBSMWindow::is_empty
bool is_empty() const
Definition
ProtoDUNEBSMWindow.cpp:9
triggeralgs::ProtoDUNEBSMWindow::adc_integral
uint32_t adc_integral
Definition
ProtoDUNEBSMWindow.hpp:41
triggeralgs::ProtoDUNEBSMWindow::move
void move(TriggerPrimitive const &input_tp, timestamp_t const &window_length)
Definition
ProtoDUNEBSMWindow.cpp:24
triggeralgs::ProtoDUNEBSMWindow::fill_entry_window
void fill_entry_window(std::vector< Entry > &entry_input, std::vector< float > &input)
Definition
ProtoDUNEBSMWindow.cpp:89
triggeralgs
Definition
AbstractFactory.hpp:18
triggeralgs::timestamp_t
dunedaq::trgdataformats::timestamp_t timestamp_t
Definition
Types.hpp:16
triggeralgs::TriggerPrimitive
dunedaq::trgdataformats::TriggerPrimitive TriggerPrimitive
Definition
TriggerPrimitive.hpp:22
triggeralgs::channel_t
dunedaq::trgdataformats::channel_t channel_t
Definition
Types.hpp:20
treelitemodel.hpp
TriggerPrimitive.hpp
Types.hpp
Generated on
for DUNE-DAQ by
1.17.0