#include <SiStripFedCablingBuilderFromDb.h>
Static Public Member Functions | |
static void | buildFecCabling (SiStripConfigDb *const, SiStripFecCabling &, const sistrip::CablingSource &) |
static void | buildFecCabling (SiStripConfigDb *const, SiStripFecCabling &) |
static void | buildFecCablingFromDetIds (SiStripConfigDb *const, SiStripFecCabling &) |
static void | buildFecCablingFromDevices (SiStripConfigDb *const, SiStripFecCabling &) |
static void | buildFecCablingFromFedConnections (SiStripConfigDb *const, SiStripFecCabling &) |
static void | getFecCabling (const SiStripFedCabling &in, SiStripFecCabling &out) |
static void | getFedCabling (const SiStripFecCabling &in, SiStripFedCabling &out) |
Static Public Member Functions inherited from SiStripFedCablingESProducer | |
static uint16_t | ccuAddr (const uint16_t &nth_module) |
static uint16_t | ccuChan (const uint16_t &nth_module) |
static uint16_t | fecCrate (const uint16_t &nth_module) |
static uint16_t | fecRing (const uint16_t &nth_module) |
static uint16_t | fecSlot (const uint16_t &nth_module) |
Static Public Member Functions inherited from edm::eventsetup::ESProductResolverProvider | |
static void | prevalidate (ConfigurationDescriptions &) |
Protected Member Functions | |
void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) override |
virtual void | writeFedCablingToCondDb (const SiStripFedCabling &) |
Protected Member Functions inherited from edm::ESProducer | |
ESConsumesInfo * | consumesInfoPushBackNew () |
unsigned int | consumesInfoSize () const |
template<typename CallbackT , typename TList , typename TRecord > | |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>> iCallback, const TList *, const TRecord *iRecord, const es::Label &iLabel) |
template<typename CallbackT , typename TRecord > | |
void | registerProducts (std::shared_ptr< std::pair< unsigned int, std::shared_ptr< CallbackT >>>, const eventsetup::produce::Null *, const TRecord *, const es::Label &) |
template<typename T > | |
auto | setWhatProduced (T *iThis, const es::Label &iLabel={}) |
template<typename T > | |
auto | setWhatProduced (T *iThis, const char *iLabel) |
template<typename T > | |
auto | setWhatProduced (T *iThis, const std::string &iLabel) |
template<typename T , typename TDecorator > | |
auto | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel={}) |
template<typename T , typename TReturn , typename TRecord > | |
auto | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel={}) |
template<typename T , typename TReturn , typename TRecord , typename TDecorator > | |
auto | setWhatProduced (T *iThis, TReturn(T ::*iMethod)(const TRecord &), const TDecorator &iDec, const es::Label &iLabel={}) |
template<typename TFunc > | |
auto | setWhatProduced (TFunc &&func, const es::Label &iLabel={}) |
template<typename TReturn , typename TRecord , typename TFunc , typename TDecorator > | |
ESConsumesCollectorT< TRecord > | setWhatProduced (TFunc &&func, TDecorator &&iDec, const es::Label &iLabel={}) |
void | usesResources (std::vector< std::string > const &) |
Protected Member Functions inherited from edm::ESProductResolverFactoryProducer | |
template<class TFactory > | |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
virtual void | registerFactoryWithKey (const EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ESProductResolverFactoryBase > iFactory, const std::string &iLabel=std::string()) |
KeyedResolversVector | registerResolvers (const EventSetupRecordKey &, unsigned int iovIndex) override |
Protected Member Functions inherited from edm::eventsetup::ESProductResolverProvider | |
template<class T > | |
void | usingRecord () |
void | usingRecordWithKey (const EventSetupRecordKey &key) |
Protected Member Functions inherited from edm::EventSetupRecordIntervalFinder | |
template<class T > | |
void | findingRecord () |
void | findingRecordWithKey (const eventsetup::EventSetupRecordKey &) |
Static Protected Member Functions | |
static void | assignDcuAndDetIds (SiStripFecCabling &, const std::vector< std::pair< uint32_t, TkDcuInfo *> > &) |
Protected Attributes | |
SiStripConfigDb * | db_ |
sistrip::CablingSource | source_ |
Additional Inherited Members | |
Protected Types inherited from edm::ESProductResolverFactoryProducer | |
using | EventSetupRecordKey = eventsetup::EventSetupRecordKey |
Protected Types inherited from edm::eventsetup::ESProductResolverProvider | |
using | KeyedResolversVector = std::vector< std::pair< DataKey, std::shared_ptr< ESProductResolver > >> |
Definition at line 18 of file SiStripFedCablingBuilderFromDb.h.
SiStripFedCablingBuilderFromDb::SiStripFedCablingBuilderFromDb | ( | const edm::ParameterSet & | pset | ) |
Definition at line 21 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripEnumsAndStrings::cablingSource(), LogTrace, sistrip::mlCabling_, muonDTDigis_cfi::pset, source, and source_.
|
override |
Definition at line 40 of file SiStripFedCablingBuilderFromDb.cc.
References LogTrace, and sistrip::mlCabling_.
|
staticprotected |
Definition at line 803 of file SiStripFedCablingBuilderFromDb.cc.
References ewkTauDQM_cfi::channels, SiStripFecCabling::crates(), TauDecayModes::dec, SiStripConfigDb::findDcuDetId(), recoMuon::in, LogTrace, combine::missing, sistrip::mlCabling_, castor_dqm_sourceclient_file_cfg::path, contentValuesCheck::ss, and susybsm::HSCParticleType::unknown.
Referenced by buildFecCablingFromDevices(), and buildFecCablingFromFedConnections().
|
static |
Generic method which builds FEC cabling. Call ones of the three methods below depending on the cabling "source" parameter (connections, devices, detids).
Definition at line 99 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCablingFromDetIds(), buildFecCablingFromDevices(), buildFecCablingFromFedConnections(), sistrip::CABLING_FROM_CONNS, sistrip::CABLING_FROM_DETIDS, sistrip::CABLING_FROM_DEVICES, SiStripEnumsAndStrings::cablingSource(), SiStripFecCabling::countDevices(), dqmiodatasetharvest::db, LogTrace, sistrip::mlCabling_, source, contentValuesCheck::ss, and sistrip::UNDEFINED_CABLING_SOURCE.
Referenced by SiStripCondObjBuilderFromDb::buildCondObj(), CommissioningHistosUsingDb::configure(), and make().
|
static |
Generic method which builds FEC cabling. Call ones of the three methods below depending on what descriptions are available within the database or which xml files are available.
Definition at line 133 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCablingFromDetIds(), buildFecCablingFromDevices(), buildFecCablingFromFedConnections(), SiStripFecCabling::countDevices(), dqmiodatasetharvest::db, cms::alpakatools::devices(), LogTrace, sistrip::mlCabling_, and contentValuesCheck::ss.
|
static |
Builds the SiStripFecCabling conditions object using information found within the "dcuinfo.xml" file (ie, based on DetIds). "Dummy" values are provided when necessary.
Builds the SiStripFedCabling conditions object that is available via the EventSetup interface. The object contains the full FedChannel-Dcu-DetId mapping information.
This method is typically used when only the Dcu-DetId map (ie, from "dcuinfo.xml") exists and the FED connections (ie, "module.xml" file) and device descriptions (ie, from "fec.xml") are both missing.
The map is built using the Dcu-DetId map that is cached by the SiStripConfigDb object. As a minimum, the map should contain values within both the DetId and APpvPair fields, but if any information is missing, the method provides "dummy" values.
Methodology:
The FEC cabling object is built using the Dcu-DetId map (ie, from "dcuinfo.xml"). For each entry, the DcuId, DetId and ApvPairs values are retrieved. For each ApvPair, a FED channel connection object is created using "dummy" hardware addresses.
If the DcuId (provided by the hardware device descriptions) is null, a dummy value is provided, based on the control key.
If the DetId is null, a value is assigned using an incremented counter (starting from 0xFFFF).
If the number of APV pairs is null, a value of 2 or 3 is randomly assigned.
Given that the FED channel connections are not known, APV pairs are cabled to "random" FED ids and channels.
All Dcu-DetId mappings are accumulated in a new map, and this modified map is returned by the method.
Definition at line 675 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), generateTowerEtThresholdLUT::addr, getInfo::conn, SiStripFecCabling::crates(), dqmiodatasetharvest::db, SiStripModule::fedCh(), SiStripKey::key(), LogTrace, sistrip::mlCabling_, and FastTimerService_cff::range.
Referenced by buildFecCabling().
|
static |
Builds the SiStripFecCabling conditions object using information found within the "fec.xml" and "dcuinfo.xml" files. "Dummy" values are provided when necessary.
Builds the SiStripFedCabling conditions object that is available via the EventSetup interface. The object contains the full FedChannel-Dcu-DetId mapping information.
This method is typically used when the FED connections (ie, "module.xml" file) does not exist, such as prior to the FED cabling or "bare connection" procedure.
The map is built using information cached by the SiStripConfigDb object, comprising: 1) the hardware device descriptions, as found in the "fec.xml" file; 2) and Dcu-DetId mapping, as found in the "dcuinfo.xml" file. If any information is missing, the method provides "dummy" values.
Methodology:
The FEC cabling object is built using the hardware device descriptions (ie, from "fec.xml").
Given that the FED channel connections are not known, APV pairs are cabled to "random" FED ids and channels. FED ids are retrieved from any FED descriptions cached by the SiStripConfigDb object (ie, from "fed.xml"). A check is made to ensure sufficient FEDs exist to cable the entire control system. If not, the shortfall is met by generating FED ids using an incremented counter (starting from 50).
If the DcuId (provided by the hardware device descriptions) is null, a dummy value is provided, based on the control key.
The Dcu-DetId map (ie, from "dcuinfo.xml") is queried for a matching DcuId. If found, the DetId and ApvPairs are updated. If not, a "random" DetId within the Dcu-DetId map is assigned. Note that a check is made on the number of APV pairs before the DetId is assigned. If no appropriate match is found, the DetId is assigned a value using an incremented counter (starting from 0xFFFF).
All Dcu-DetId mappings are accumulated in a new map, and this modified map is returned by the method.
Definition at line 318 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), generateTowerEtThresholdLUT::addr, assignDcuAndDetIds(), SiStripFedCablingESProducer::ccuAddr(), SiStripFedCablingESProducer::ccuChan(), getInfo::conn, SiStripFecCabling::countDevices(), SiStripFecCabling::crates(), dqmiodatasetharvest::db, SiStripFecCabling::dcuId(), sistrip::FEC_CRATE_OFFSET, sistrip::FEC_RING_OFFSET, SiStripFedCablingESProducer::fecCrate(), SiStripFedCablingESProducer::fecRing(), SiStripFedCablingESProducer::fecSlot(), SiStripModule::fedCh(), SiStripFecKey::i2cAddr(), sistrip::invalid32_, submitPVResolutionJobs::key, sistrip::LLD_CHAN_MAX, sistrip::LLD_CHAN_MIN, LogTrace, sistrip::mlCabling_, SiStripModule::nApvPairs(), NumberOfDevices::print(), FastTimerService_cff::range, jetUpdater_cfi::sort, and groupFilesInBlocks::temp.
Referenced by buildFecCabling(), and CommissioningHistosUsingDb::configure().
|
static |
Builds the SiStripFecCabling conditions object using information found within the "module.xml" and "dcuinfo.xml" files. "Dummy" values are provided when necessary.
Populates the SiStripFecCabling conditions object that is available via the EventSetup interface. The object contains the full FedChannel-Dcu-DetId mapping information.
The map is built using information cached by the SiStripConfigDb object, comprising: 1) the FED channel connections, as found in the "module.xml" file or database; 2) and Dcu-DetId mapping, as found in the "dcuinfo.xml" file or DCU-DetId static table. If any information is missing, the method provides "dummy" values.
Methodology:
1) The FEC cabling object is built using FED channel connection objects.
2) If the DcuId for a module is null (as defined within the connection description), a "dummy" DCU id is provided, based on the control key.
3) The cached Dcu-DetId map is queried for a matching DcuId. If found, the DetId and ApvPairs are updated. The number of APV pairs is checked.
4) If the DCU is not found in the cached map, a "random" DetId is assigned (using the remaining "unassigned" DetIds within the cached map). The DetId is only assigned if the number of APV pairs is consistent with the entry in the cached map.
5) If no appropriate match is found, the DetId is assigned a "dummy" value using an incremented counter (starting from 0xFFFF).
6) All Dcu-DetId mappings are accumulated in a new map, and this modified map is returned by the method.
Definition at line 195 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), assignDcuAndDetIds(), getInfo::conn, dqmiodatasetharvest::db, sistrip::FEC_CRATE_OFFSET, sistrip::FEC_RING_OFFSET, sistrip::invalid_, LogTrace, sistrip::mlCabling_, and FastTimerService_cff::range.
Referenced by buildFecCabling().
|
static |
Utility method that takes a FED cabling object as input and returns (as an arg) the corresponding FEC cabling object.
Definition at line 1062 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::buildFecCabling().
|
static |
Utility method that takes a FEC cabling object as input and returns (as an arg) the corresponding FED cabling object.
Definition at line 1053 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFedCabling::buildFedCabling(), and SiStripFecCabling::connections().
Referenced by SiStripCondObjBuilderFromDb::buildCondObj(), CommissioningHistosUsingDb::configure(), and make().
|
overridevirtual |
Builds FED cabling using info from configuration database.
Implements SiStripFedCablingESProducer.
Definition at line 47 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCabling(), SiStripConfigDb::databaseCache(), db_, TauDecayModes::dec, SiStripConfigDb::deviceFactory(), getFedCabling(), LogTrace, sistrip::mlCabling_, Utilities::operator, source_, and writeFedCablingToCondDb().
|
overrideprotectedvirtual |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 1069 of file SiStripFedCablingBuilderFromDb.cc.
References edm::IOVSyncValue::beginOfTime(), edm::IOVSyncValue::endOfTime(), and infinity.
|
inlineprotectedvirtual |
Virtual method that is called by makeFedCabling() to allow FED cabling to be written to the conds DB (local or otherwise).
Definition at line 78 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Access to the configuration DB interface class.
Definition at line 81 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Defines "source" (conns, devices, detids) of cabling info.
Definition at line 84 of file SiStripFedCablingBuilderFromDb.h.
Referenced by Config.Process::dumpConfig(), Config.Process::dumpPython(), make(), SiStripFedCablingBuilderFromDb(), and Config.Process::splitPython().