#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 | |
virtual void | setIntervalFor (const edm::eventsetup::EventSetupRecordKey &, const edm::IOVSyncValue &, edm::ValidityInterval &) |
virtual void | writeFedCablingToCondDb (const SiStripFedCabling &) |
Protected Member Functions inherited from edm::ESProducer | |
template<typename T > | |
void | setWhatProduced (T *iThis, const es::Label &iLabel=es::Label()) |
template<typename T > | |
void | setWhatProduced (T *iThis, const char *iLabel) |
template<typename T > | |
void | setWhatProduced (T *iThis, const std::string &iLabel) |
template<typename T , typename TDecorator > | |
void | setWhatProduced (T *iThis, const TDecorator &iDec, const es::Label &iLabel=es::Label()) |
template<typename T , typename TReturn , typename TRecord > | |
void | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const es::Label &iLabel=es::Label()) |
template<typename T , typename TReturn , typename TRecord , typename TArg > | |
void | setWhatProduced (T *iThis, TReturn(T::*iMethod)(const TRecord &), const TArg &iDec, const es::Label &iLabel=es::Label()) |
Protected Member Functions inherited from edm::ESProxyFactoryProducer | |
template<class TFactory > | |
void | registerFactory (std::auto_ptr< TFactory > iFactory, const std::string &iLabel=std::string()) |
virtual void | registerFactoryWithKey (const eventsetup::EventSetupRecordKey &iRecord, std::auto_ptr< eventsetup::ProxyFactoryBase > &iFactory, const std::string &iLabel=std::string()) |
virtual void | registerProxies (const eventsetup::EventSetupRecordKey &iRecord, KeyedProxies &aProxyList) |
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, boost::shared_ptr < DataProxy > > > | KeyedProxies |
typedef std::vector < EventSetupRecordKey > | Keys |
typedef std::map < EventSetupRecordKey, KeyedProxies > | RecordProxies |
Definition at line 19 of file SiStripFedCablingBuilderFromDb.h.
SiStripFedCablingBuilderFromDb::SiStripFedCablingBuilderFromDb | ( | const edm::ParameterSet & | pset | ) |
Definition at line 22 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripEnumsAndStrings::cablingSource(), edm::ParameterSet::getUntrackedParameter(), LogTrace, sistrip::mlCabling_, LaserTracksInput_cfi::source, and source_.
|
virtual |
Definition at line 46 of file SiStripFedCablingBuilderFromDb.cc.
References LogTrace, and sistrip::mlCabling_.
|
staticprotected |
Definition at line 859 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::crates(), SiStripModule::dcuId(), cond::rpcobgas::detid, SiStripModule::detId(), SiStripConfigDb::findDcuDetId(), recoMuon::in, SiStripModule::length(), LogTrace, combine::missing, sistrip::mlCabling_, SiStripModule::nApvPairs(), getHLTPrescaleColumns::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 114 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::CommissioningHistosUsingDb(), 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 154 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 737 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), results_mgr::conn, 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 352 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), assignDcuAndDetIds(), SiStripFedCablingESProducer::ccuAddr(), SiStripConfigDb::DeviceAddress::ccuAddr_, SiStripFedCablingESProducer::ccuChan(), SiStripConfigDb::DeviceAddress::ccuChan_, results_mgr::conn, 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_, combine::key, sistrip::LLD_CHAN_MAX, sistrip::LLD_CHAN_MIN, LogTrace, sistrip::mlCabling_, SiStripModule::nApvPairs(), NumberOfDevices::print(), python.multivaluedict::sort(), and groupFilesInBlocks::temp.
Referenced by buildFecCabling(), and CommissioningHistosUsingDb::CommissioningHistosUsingDb().
|
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 219 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFecCabling::addDevices(), assignDcuAndDetIds(), results_mgr::conn, 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 1141 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 1132 of file SiStripFedCablingBuilderFromDb.cc.
References SiStripFedCabling::buildFedCabling(), and SiStripFecCabling::connections().
Referenced by SiStripCondObjBuilderFromDb::buildCondObj(), CommissioningHistosUsingDb::CommissioningHistosUsingDb(), and make().
|
virtual |
Builds FED cabling using info from configuration database.
Implements SiStripFedCablingESProducer.
Definition at line 54 of file SiStripFedCablingBuilderFromDb.cc.
References buildFecCabling(), SiStripConfigDb::databaseCache(), db_, SiStripConfigDb::deviceFactory(), getFedCabling(), LogTrace, sistrip::mlCabling_, cppFunctionSkipper::operator, source_, and writeFedCablingToCondDb().
|
protectedvirtual |
Implements edm::EventSetupRecordIntervalFinder.
Definition at line 1148 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 91 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Access to the configuration DB interface class.
Definition at line 94 of file SiStripFedCablingBuilderFromDb.h.
Referenced by make().
|
protected |
Defines "source" (conns, devices, detids) of cabling info.
Definition at line 97 of file SiStripFedCablingBuilderFromDb.h.
Referenced by Config.Process::dumpConfig(), Config.Process::dumpPython(), make(), and SiStripFedCablingBuilderFromDb().