DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
triggeralgs
src
ProtoDUNEBSMWindow
DetectorPlaneMap.cpp
Go to the documentation of this file.
1
#include "
triggeralgs/ProtoDUNEBSMWindow/DetectorPlaneMap.hpp
"
2
#include <stdexcept>
3
4
namespace
triggeralgs
{
5
6
PlaneInfo
DetectorPlaneMap::get_plane_info
(std::string channel_map_name,
int
detelement,
int
plane) {
7
8
const
std::map<std::pair<int,int>,
PlaneInfo
> *plane_map;
9
if
(channel_map_name ==
"PD2HDTPCChannelMap"
) plane_map = &
pdhd_plane_map
;
10
else
if
(channel_map_name ==
"PD2VDTPCChannelMap"
) plane_map = &
pdvd_plane_map
;
11
else
plane_map = &
pdvd_plane_map
;
12
13
auto
it = plane_map->find({detelement, plane});
14
if
(it == plane_map->end()) {
15
throw
std::out_of_range(
"Invalid detelement/plane combination"
);
16
}
17
return
it->second;
18
}
19
20
}
// triggeralgs
DetectorPlaneMap.hpp
triggeralgs
Definition
AbstractFactory.hpp:18
triggeralgs::DetectorPlaneMap::pdhd_plane_map
const std::map< std::pair< int, int >, PlaneInfo > pdhd_plane_map
Definition
DetectorPlaneMap.hpp:19
triggeralgs::DetectorPlaneMap::get_plane_info
PlaneInfo get_plane_info(std::string channel_map_name, int detelement, int plane)
Definition
DetectorPlaneMap.cpp:6
triggeralgs::DetectorPlaneMap::pdvd_plane_map
const std::map< std::pair< int, int >, PlaneInfo > pdvd_plane_map
Definition
DetectorPlaneMap.hpp:34
triggeralgs::PlaneInfo
Definition
DetectorPlaneMap.hpp:11
Generated on
for DUNE-DAQ by
1.17.0