DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
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 <string>
14
#include <unordered_map>
15
16
namespace
dunedaq
{
17
namespace
detchannelmaps
{
18
19
class
VDColdboxChannelMapService
20
{
21
22
public
:
23
VDColdboxChannelMapService
(std::string mapfile);
24
25
struct
VDCBChanInfo
26
{
27
int
offlchan
;
// in gdml and channel sorting convention
28
int
wib
;
// slot number +1: 1, 2, 3, or 4
29
int
wibconnector
;
// which board on the WIB 1, 2, 3, or 4
30
int
cebchan
;
// cold electronics channel on board: 0 to 127
31
int
femb
;
// FEMB ID: 1 to 14
32
int
asic
;
// ASIC: 1 to 8
33
int
asicchan
;
// ASIC channel: 0 to 15
34
int
connector
;
// detector connector
35
std::string
stripid
;
// strip name, with plane and number. e.g. U79
36
bool
valid
;
// true if valid, false if not
37
};
38
39
// Access methods
40
41
// The function below gets cold electronics info from offline channel number. Sets valid to be false if
42
// there is no corresponding cold electronics channel
43
44
VDCBChanInfo
getChanInfoFromOfflChan
(
int
offlchan);
45
46
// The function below uses conventions from Nitish's spreadsheet. WIB: 1-3, wibconnector: 1-4, cechan: 0-127
47
// It returns an offline channel number of -1 if the wib, wibconnector, and cechan are not in the map
48
49
int
getOfflChanFromWIBConnectorInfo
(
int
wib
,
int
wibconnector,
int
cechan);
50
51
// For convenience, the function below uses conventions from the DAQ WIB header, with two FEMBs per fiber
52
// on FELIX readout: slot: 0-2, fiber=1 or 2, cehcan: 0-255
53
54
int
getOfflChanFromSlotFiberChan
(
int
slot,
int
fiber,
int
chan);
55
56
private
:
57
// map so we can look up channel info by offline channel number
58
59
std::unordered_map<int, VDCBChanInfo>
chantoinfomap
;
60
61
// map so we can look up offline channel number by channel info (three keys), wib, wibconnector, and cechan
62
63
std::unordered_map<int, std::unordered_map<int, std::unordered_map<int, int>>>
infotochanmap
;
64
};
65
66
}
// namespace detchannelmaps
67
}
// namespace dunedaq
68
69
#endif
/* DETCHANNELSMAP_VDCOLDBOXCHANNELMAPSERVICE_H_ */
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:95
dunedaq::detchannelmaps::VDColdboxChannelMapService::chantoinfomap
std::unordered_map< int, VDCBChanInfo > chantoinfomap
Definition
VDColdboxChannelMapService.hpp:59
dunedaq::detchannelmaps::VDColdboxChannelMapService::getChanInfoFromOfflChan
VDCBChanInfo getChanInfoFromOfflChan(int offlchan)
Definition
VDColdboxChannelMapService.cpp:44
dunedaq::detchannelmaps::VDColdboxChannelMapService::getOfflChanFromWIBConnectorInfo
int getOfflChanFromWIBConnectorInfo(int wib, int wibconnector, int cechan)
Definition
VDColdboxChannelMapService.cpp:69
dunedaq::detchannelmaps::VDColdboxChannelMapService::infotochanmap
std::unordered_map< int, std::unordered_map< int, std::unordered_map< int, int > > > infotochanmap
Definition
VDColdboxChannelMapService.hpp:63
dunedaq::detchannelmaps
Definition
PD2HDChannelMapSPPluginBase.hpp:8
dunedaq
The DUNE-DAQ namespace.
Definition
cib_utilities.cpp:5
wib
Definition
wib.pb.cc:23
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo
Definition
VDColdboxChannelMapService.hpp:26
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::femb
int femb
Definition
VDColdboxChannelMapService.hpp:31
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::connector
int connector
Definition
VDColdboxChannelMapService.hpp:34
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::stripid
std::string stripid
Definition
VDColdboxChannelMapService.hpp:35
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::offlchan
int offlchan
Definition
VDColdboxChannelMapService.hpp:27
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::asic
int asic
Definition
VDColdboxChannelMapService.hpp:32
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::valid
bool valid
Definition
VDColdboxChannelMapService.hpp:36
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::asicchan
int asicchan
Definition
VDColdboxChannelMapService.hpp:33
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::cebchan
int cebchan
Definition
VDColdboxChannelMapService.hpp:30
dunedaq::detchannelmaps::VDColdboxChannelMapService::VDCBChanInfo::wibconnector
int wibconnector
Definition
VDColdboxChannelMapService.hpp:29
Generated on
for DUNE-DAQ by
1.18.0