LDMX Software
|
Class which provides various information about how the parts of the Ecal connect to each other. More...
#include <EcalDetectorMap.h>
Classes | |
struct | CellInformation |
Table of per-module cell information. More... | |
struct | MotherboardLinksInformation |
Table of per-motherboard connections information. More... | |
struct | MotherboardsPerLayer |
Table of per-layer motherboard layouts. More... | |
Public Member Functions | |
EcalDetectorMap (const std::string &cell_map, const std::string &motherboard_map, const std::string &layer_map, bool want_d2e) | |
Default constructor which builds the necessary maps. | |
Public Member Functions inherited from framework::ConditionsObject | |
ConditionsObject (const std::string &name) | |
Class constructor. | |
virtual | ~ConditionsObject () |
Destructor. | |
std::string | getName () const |
Get the name of this object. | |
Public Member Functions inherited from ldmx::ElectronicsMap< ldmx::EcalElectronicsID, ldmx::EcalID > | |
ElectronicsMap (bool want_d2e=false) | |
void | clear () |
Remove all entries from the map. | |
void | addEntry (ldmx::EcalElectronicsID eid, ldmx::EcalID did) |
Add an entry to the map. | |
bool | exists (ldmx::EcalElectronicsID eid) const |
Tests if a given electronics id is in the map. | |
bool | exists (ldmx::EcalID did) const |
Tests if a given detector id is in the map This method is slow O(N) if the map is not configured for detector id to electronics id. | |
ldmx::EcalID | get (ldmx::EcalElectronicsID eid) const |
Get the detector ID for this electronics ID. | |
ldmx::EcalElectronicsID | get (ldmx::EcalID did) const |
Get the electronics ID for this detector ID This method is slow O(N) if the map is not configured for detector id to electronics id. | |
Static Public Attributes | |
static constexpr const char * | CONDITIONS_OBJECT_NAME {"EcalDetectorMap"} |
The name of the EID <-> DetID map for the ECal. | |
Private Member Functions | |
void | loadCellMap (conditions::GeneralCSVLoader &loader) |
import cell map from the provided CSV loader | |
void | loadMotherboardMap (conditions::GeneralCSVLoader &loader) |
import motherboard map from the provided CSV loader | |
void | loadLayerMap (conditions::GeneralCSVLoader &loader) |
import layer map from the provided CSV loader | |
void | buildElectronicsMap () |
build the electronics map from loaded maps | |
Private Attributes | |
std::vector< CellInformation > | cells_ |
std::vector< MotherboardLinksInformation > | elinks_ |
std::vector< MotherboardsPerLayer > | layers_ |
Friends | |
class | EcalDetectorMapLoader |
Provider which loads the map. | |
Class which provides various information about how the parts of the Ecal connect to each other.
The class is loaded from three tables, currently in the form of CSV objects, using the EcalDetectorMapLoader declared and defined in the source.
CellMap gives the information for a single Ecal module and has the following columns CELLID – EcalDetectorID cell id ROCID – which ROC on the module ROC_ELINK_NUMBER – which elink on the ROC (0/1) ROC_ELINK_CHANNEL – which channel on the elink (0-35)
MotherboardMap gives information about how the modules plug into a given type of motherboard ROCID – which ROC on the module ROC_ELINK_NUMBER – which elink on the ROC (0/1) MODULE – which module on the layer POLARFIRE_ELINK – elink input number on the Polarfire MOTHERBOARD_TYPE – what type of motherboard is this
LayerMap gives information about how the motherboards are used on the various layers LAYER – layer number MOTHERBOARD_TYPE OLINK – DAQ optical link number
We inherit from two classes: (1) the ConditionsObject because we are a conditions object and (2) from the ElectronicsMap template because we are a electronics map.
Definition at line 47 of file EcalDetectorMap.h.
ecal::EcalDetectorMap::EcalDetectorMap | ( | const std::string & | cell_map, |
const std::string & | motherboard_map, | ||
const std::string & | layer_map, | ||
bool | want_d2e | ||
) |
Default constructor which builds the necessary maps.
[in] | want_d2e | true if we want to build a reverse mapping Building a reverse (detector->electronics) map takes extra time and memory so it should be off by default. |
Definition at line 51 of file EcalDetectorMap.cxx.
References buildElectronicsMap(), loadCellMap(), loadLayerMap(), and loadMotherboardMap().
|
private |
build the electronics map from loaded maps
Definition at line 101 of file EcalDetectorMap.cxx.
References ldmx::ElectronicsMap< ldmx::EcalElectronicsID, ldmx::EcalID >::addEntry(), ldmx::ElectronicsMap< ldmx::EcalElectronicsID, ldmx::EcalID >::clear(), and ldmx::ElectronicsMap< ldmx::EcalElectronicsID, ldmx::EcalID >::exists().
Referenced by EcalDetectorMap().
|
private |
import cell map from the provided CSV loader
Definition at line 65 of file EcalDetectorMap.cxx.
References conditions::GeneralCSVLoader::getInteger(), ecal::EcalDetectorMap::CellInformation::module_cellid, conditions::GeneralCSVLoader::nextRow(), ecal::EcalDetectorMap::CellInformation::roc_elink_channel, ecal::EcalDetectorMap::CellInformation::roc_elink_number, and ecal::EcalDetectorMap::CellInformation::rocid.
Referenced by EcalDetectorMap().
|
private |
import layer map from the provided CSV loader
Definition at line 90 of file EcalDetectorMap.cxx.
References ecal::EcalDetectorMap::MotherboardsPerLayer::daq_opticallink, conditions::GeneralCSVLoader::getInteger(), ecal::EcalDetectorMap::MotherboardsPerLayer::layer, ecal::EcalDetectorMap::MotherboardsPerLayer::motherboard_type, and conditions::GeneralCSVLoader::nextRow().
Referenced by EcalDetectorMap().
|
private |
import motherboard map from the provided CSV loader
Definition at line 77 of file EcalDetectorMap.cxx.
References conditions::GeneralCSVLoader::getInteger(), ecal::EcalDetectorMap::MotherboardLinksInformation::motherboard_type, conditions::GeneralCSVLoader::nextRow(), ecal::EcalDetectorMap::MotherboardLinksInformation::polarfire_elink, ecal::EcalDetectorMap::MotherboardLinksInformation::roc_elink_number, and ecal::EcalDetectorMap::MotherboardLinksInformation::rocid.
Referenced by EcalDetectorMap().
|
friend |
Provider which loads the map.
Definition at line 66 of file EcalDetectorMap.h.
|
private |
Definition at line 93 of file EcalDetectorMap.h.
|
staticconstexpr |
The name of the EID <-> DetID map for the ECal.
Definition at line 52 of file EcalDetectorMap.h.
Referenced by ecal::EcalRawDecoder::produce(), and ecal::EcalRawEncoder::produce().
|
private |
Definition at line 110 of file EcalDetectorMap.h.
|
private |
Definition at line 123 of file EcalDetectorMap.h.