DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
detchannelmaps
src
VDColdboxChannelMapService.hpp
Go to the documentation of this file.
1
2
// Class: VDColdboxChannelMapService
3
// Module type: service
4
// File: VDColdboxChannelMapService.h
5
// Author: Tom Junk, October 2021
6
//
7
// Implementation of hardware-offline channel mapping reading from a file.
9
10
#ifndef DETCHANNELSMAP_VDCOLDBOXCHANNELMAPSERVICE_H_
11
#define DETCHANNELSMAP_VDCOLDBOXCHANNELMAPSERVICE_H_
12
13
#include <unordered_map>
14
#include <string>
15
16
namespace
dunedaq
{
17
namespace
detchannelmaps
{
18
19
class
VDColdboxChannelMapService
{
20
21
public
:
22
23
VDColdboxChannelMapService
(std::string mapfile);
24
25
struct
VDCBChanInfo
{
26
int
offlchan
;
// in gdml and channel sorting convention
27
int
wib
;
// slot number +1: 1, 2, 3, or 4
28
int
wibconnector
;
// which board on the WIB 1, 2, 3, or 4
29
int
cebchan
;
// cold electronics channel on board: 0 to 127
30
int
femb
;
// FEMB ID: 1 to 14
31
int
asic
;
// ASIC: 1 to 8
32
int
asicchan
;
// ASIC channel: 0 to 15
33
int
connector
;
// detector connector
34
std::string
stripid
;
// strip name, with plane and number. e.g. U79
35
bool
valid
;
// true if valid, false if not
36
};
37
38
// Access methods
39
40
// The function below gets cold electronics info from offline channel number. Sets valid to be false if
41
// there is no corresponding cold electronics channel
42
43
VDCBChanInfo
getChanInfoFromOfflChan
(
int
offlchan);
44
45
// The function below uses conventions from Nitish's spreadsheet. WIB: 1-3, wibconnector: 1-4, cechan: 0-127
46
// It returns an offline channel number of -1 if the wib, wibconnector, and cechan are not in the map
47
48
int
getOfflChanFromWIBConnectorInfo
(
int
wib
,
int
wibconnector,
int
cechan);
49
50
// For convenience, the function below uses conventions from the DAQ WIB header, with two FEMBs per fiber
51
// on FELIX readout: slot: 0-2, fiber=1 or 2, cehcan: 0-255
52
53
int
getOfflChanFromSlotFiberChan
(
int
slot,
int
fiber,
int
chan);
54
55
56
private
:
57
58
// map so we can look up channel info by offline channel number
59
60
std::unordered_map<int,VDCBChanInfo>
chantoinfomap
;
61
62
// map so we can look up offline channel number by channel info (three keys), wib, wibconnector, and cechan
63
64
std::unordered_map<int,std::unordered_map<int,std::unordered_map<int,int> > >
infotochanmap
;
65
66
};
67
68
}
// namespace detchannelmaps
69
}
// namespace dunedaq
70
71
#endif
/* DETCHANNELSMAP_VDCOLDBOXCHANNELMAPSERVICE_H_ */
dunedaq::detchannelmaps::VDColdboxChannelMapService
Definition
VDColdboxChannelMapService.hpp:19
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDColdboxChannelMapService
VDColdboxChannelMapService(std::string mapfile)
Definition
VDColdboxChannelMapService.cpp:18
dunedaq::detchannelmaps::VDColdboxChannelMapService::getOfflChanFromSlotFiberChan
int getOfflChanFromSlotFiberChan(int slot, int fiber, int chan)
Definition
VDColdboxChannelMapService.cpp:104
dunedaq::detchannelmaps::VDColdboxChannelMapService::getChanInfoFromOfflChan
VDCBChanInfo getChanInfoFromOfflChan(int offlchan)
Definition
VDColdboxChannelMapService.cpp:51
dunedaq::detchannelmaps::VDColdboxChannelMapService::chantoinfomap
std::unordered_map< int, VDCBChanInfo > chantoinfomap
Definition
VDColdboxChannelMapService.hpp:60
dunedaq::detchannelmaps::VDColdboxChannelMapService::getOfflChanFromWIBConnectorInfo
int getOfflChanFromWIBConnectorInfo(int wib, int wibconnector, int cechan)
Definition
VDColdboxChannelMapService.cpp:79
dunedaq::detchannelmaps::VDColdboxChannelMapService::infotochanmap
std::unordered_map< int, std::unordered_map< int, std::unordered_map< int, int > > > infotochanmap
Definition
VDColdboxChannelMapService.hpp:64
detchannelmaps
Definition
__init__.py:1
dunedaq
Including Qt Headers.
Definition
TimingController.hxx:1
wib
Definition
wib.pb.cc:23
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo
Definition
VDColdboxChannelMapService.hpp:25
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::femb
int femb
Definition
VDColdboxChannelMapService.hpp:30
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::connector
int connector
Definition
VDColdboxChannelMapService.hpp:33
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::stripid
std::string stripid
Definition
VDColdboxChannelMapService.hpp:34
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::offlchan
int offlchan
Definition
VDColdboxChannelMapService.hpp:26
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::asic
int asic
Definition
VDColdboxChannelMapService.hpp:31
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::valid
bool valid
Definition
VDColdboxChannelMapService.hpp:35
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::asicchan
int asicchan
Definition
VDColdboxChannelMapService.hpp:32
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::wib
int wib
Definition
VDColdboxChannelMapService.hpp:27
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::cebchan
int cebchan
Definition
VDColdboxChannelMapService.hpp:29
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::wibconnector
int wibconnector
Definition
VDColdboxChannelMapService.hpp:28
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0