#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::DataProxyProvider | |
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 | |
ESProducer (const ESProducer &)=delete | |
ESProducer const & | operator= (const ESProducer &)=delete |
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 TArg > | |
ESConsumesCollectorT< TRecord > | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel={}) |
Protected Member Functions inherited from edm::ESProxyFactoryProducer | |
template<class TFactory > | |
void | registerFactory (std::unique_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
virtual void | registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::unique_ptr< eventsetup::ProxyFactoryBase > iFactory, const std::string &iLabel=std::string()) |
void | registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) override |
override DataProxyProvider method More... | |
Protected Member Functions inherited from edm::eventsetup::DataProxyProvider | |
void | eraseAll (const EventSetupRecordKey &iRecordKey) |
deletes all the Proxies in aStream More... | |
void | invalidateProxies (const EventSetupRecordKey &iRecordKey) |
template<class T > | |
void | usingRecord () |
void | usingRecordWithKey (const EventSetupRecordKey &) |
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 | |
Public Types inherited from edm::eventsetup::DataProxyProvider | |
typedef std::vector< std::pair< DataKey, edm::propagate_const< std::shared_ptr< DataProxy > > > > | KeyedProxies |
typedef std::vector< EventSetupRecordKey > | Keys |
typedef std::map< EventSetupRecordKey, KeyedProxies > | RecordProxies |
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(), edm::ParameterSet::getUntrackedParameter(), LogTrace, sistrip::mlCabling_, source, and source_.
|
override |
Definition at line 45 of file SiStripFedCablingBuilderFromDb.cc.
References LogTrace, and sistrip::mlCabling_.
|
staticprotected |
Definition at line 858 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::crates(), SiStripModule::dcuId(), TauDecayModes::dec, SiStripModule::detId(), SiStripConfigDb::findDcuDetId(), recoMuon::in, SiStripModule::length(), LogTrace, sistrip::mlCabling_, SiStripModule::nApvPairs(), callgraph::path, 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 113 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCablingFromDetIds(), buildFecCablingFromDevices(), buildFecCablingFromFedConnections(), sistrip::CABLING_FROM_CONNS, sistrip::CABLING_FROM_DETIDS, sistrip::CABLING_FROM_DEVICES, SiStripEnumsAndStrings::cablingSource(), SiStripFecCabling::countDevices(), LogTrace, sistrip::mlCabling_, 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 153 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCablingFromDetIds(), buildFecCablingFromDevices(), buildFecCablingFromFedConnections(), SiStripFecCabling::countDevices(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedConnections(), LogTrace, and sistrip::mlCabling_.
|
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 736 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), SiStripFecCabling::crates(), SiStripModule::fedCh(), SiStripConfigDb::getDcuDetIds(), SiStripKey::key(), LogTrace, sistrip::mlCabling_, and rand().
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 351 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), assignDcuAndDetIds(), SiStripFedCablingESProducer::ccuAddr(), SiStripConfigDb::DeviceAddress::ccuAddr_, SiStripFedCablingESProducer::ccuChan(), SiStripConfigDb::DeviceAddress::ccuChan_, SiStripFecCabling::countDevices(), SiStripFecCabling::crates(), SiStripFecCabling::dcuId(), SiStripConfigDb::deviceAddress(), sistrip::FEC_CRATE_OFFSET, sistrip::FEC_RING_OFFSET, SiStripFedCablingESProducer::fecCrate(), SiStripConfigDb::DeviceAddress::fecCrate_, SiStripFedCablingESProducer::fecRing(), SiStripConfigDb::DeviceAddress::fecRing_, SiStripFedCablingESProducer::fecSlot(), SiStripConfigDb::DeviceAddress::fecSlot_, SiStripModule::fedCh(), FedChannelConnection::fedCrate(), FedChannelConnection::fedSlot(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getDeviceDescriptions(), SiStripConfigDb::getFedIds(), SiStripFecKey::i2cAddr(), SiStripConfigDb::DeviceAddress::i2cAddr_, sistrip::invalid32_, crabWrapper::key, sistrip::LLD_CHAN_MAX, sistrip::LLD_CHAN_MIN, LogTrace, sistrip::mlCabling_, SiStripModule::nApvPairs(), NumberOfDevices::print(), 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 218 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), assignDcuAndDetIds(), sistrip::FEC_CRATE_OFFSET, sistrip::FEC_RING_OFFSET, FedChannelConnection::fedCrate(), FedChannelConnection::fedSlot(), SiStripConfigDb::getDcuDetIds(), SiStripConfigDb::getFedConnections(), sistrip::invalid_, LogTrace, and sistrip::mlCabling_.
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 1140 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 1131 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 53 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 1147 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 90 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Access to the configuration DB interface class.
Definition at line 93 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Defines "source" (conns, devices, detids) of cabling info.
Definition at line 96 of file SiStripFedCablingBuilderFromDb.h.
Referenced by Config.Process::dumpConfig(), Config.Process::dumpPython(), make(), and SiStripFedCablingBuilderFromDb().