DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
triggeralgs::PDVDEffectiveChannelMap Class Reference

#include <PDVDEffectiveChannelMap.hpp>

Public Member Functions

 PDVDEffectiveChannelMap (unsigned int first_channel, unsigned int n_channels)
 
unsigned int remapCollectionPlaneChannel (unsigned int original_channel)
 
unsigned int getNEffectiveChannels ()
 

Protected Attributes

unsigned int m_first_channel
 
unsigned int m_n_channels
 
unsigned int m_n_channels_crp_block
 
unsigned int m_n_effective_channels
 

Detailed Description

Definition at line 11 of file PDVDEffectiveChannelMap.hpp.

Constructor & Destructor Documentation

◆ PDVDEffectiveChannelMap()

triggeralgs::PDVDEffectiveChannelMap::PDVDEffectiveChannelMap ( unsigned int first_channel,
unsigned int n_channels )

Definition at line 5 of file PDVDEffectiveChannelMap.cpp.

5 :
6 m_first_channel(first_channel), m_n_channels(n_channels) {
7
8 m_n_channels_crp_block = m_n_channels / 4; // four crps in a plane, should = 292
9 m_n_effective_channels = m_n_channels / 2; // # effective channels half # true channels, should = 584
10}

Member Function Documentation

◆ getNEffectiveChannels()

unsigned int triggeralgs::PDVDEffectiveChannelMap::getNEffectiveChannels ( )
inline

Definition at line 19 of file PDVDEffectiveChannelMap.hpp.

19{ return m_n_effective_channels; }

◆ remapCollectionPlaneChannel()

unsigned int triggeralgs::PDVDEffectiveChannelMap::remapCollectionPlaneChannel ( unsigned int original_channel)

Definition at line 12 of file PDVDEffectiveChannelMap.cpp.

12 {
13 // subtract first channel on CRP from original_channel
14 // add first channel back at the end
15 unsigned int sub_original_channel = original_channel - m_first_channel;
16
17 const unsigned int crp_block = sub_original_channel / m_n_channels_crp_block; // 0..3
18
19 const unsigned int local_channel = sub_original_channel % m_n_channels_crp_block; // 0..291
20
21 // get the base channel based on which CRP block the originial channel is in
22 const unsigned int base_channel = (crp_block >= 2) ? m_n_channels_crp_block : 0;
23
24 // remapped channel is the base plus the local channel in the block
25 // and plus the first channel in the CRP plane
26 return base_channel + local_channel + m_first_channel;
27}

Member Data Documentation

◆ m_first_channel

unsigned int triggeralgs::PDVDEffectiveChannelMap::m_first_channel
protected

Definition at line 23 of file PDVDEffectiveChannelMap.hpp.

◆ m_n_channels

unsigned int triggeralgs::PDVDEffectiveChannelMap::m_n_channels
protected

Definition at line 24 of file PDVDEffectiveChannelMap.hpp.

◆ m_n_channels_crp_block

unsigned int triggeralgs::PDVDEffectiveChannelMap::m_n_channels_crp_block
protected

Definition at line 25 of file PDVDEffectiveChannelMap.hpp.

◆ m_n_effective_channels

unsigned int triggeralgs::PDVDEffectiveChannelMap::m_n_effective_channels
protected

Definition at line 26 of file PDVDEffectiveChannelMap.hpp.


The documentation for this class was generated from the following files: