CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
SiStripFedCablingBuilderFromDb Class Reference

#include <SiStripFedCablingBuilderFromDb.h>

Inheritance diagram for SiStripFedCablingBuilderFromDb:
SiStripFedCablingESProducer edm::EventSetupRecordIntervalFinder edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

Public Member Functions

virtual SiStripFedCablingmake (const SiStripFedCablingRcd &)
 
 SiStripFedCablingBuilderFromDb (const edm::ParameterSet &)
 
virtual ~SiStripFedCablingBuilderFromDb ()
 
- Public Member Functions inherited from SiStripFedCablingESProducer
virtual std::auto_ptr
< SiStripFedCabling
produce (const SiStripFedCablingRcd &)
 
 SiStripFedCablingESProducer (const edm::ParameterSet &)
 
virtual ~SiStripFedCablingESProducer ()
 
- Public Member Functions inherited from edm::ESProducer
 ESProducer ()
 
virtual ~ESProducer ()
 
- Public Member Functions inherited from edm::ESProxyFactoryProducer
 ESProxyFactoryProducer ()
 
virtual void newInterval (const eventsetup::EventSetupRecordKey &iRecordType, const ValidityInterval &iInterval)
 overrides DataProxyProvider method More...
 
virtual ~ESProxyFactoryProducer ()
 
- Public Member Functions inherited from edm::eventsetup::DataProxyProvider
 DataProxyProvider ()
 
const ComponentDescriptiondescription () const
 
bool isUsingRecord (const EventSetupRecordKey &) const
 
const KeyedProxieskeyedProxies (const EventSetupRecordKey &iRecordKey) const
 
void resetProxies (const EventSetupRecordKey &iRecordType)
 
void resetProxiesIfTransient (const EventSetupRecordKey &iRecordType)
 
void setAppendToDataLabel (const edm::ParameterSet &)
 
void setDescription (const ComponentDescription &iDescription)
 
std::set< EventSetupRecordKeyusingRecords () const
 
virtual ~DataProxyProvider ()
 
- Public Member Functions inherited from edm::EventSetupRecordIntervalFinder
const
eventsetup::ComponentDescription
descriptionForFinder () const
 
 EventSetupRecordIntervalFinder ()
 
std::set
< eventsetup::EventSetupRecordKey
findingForRecords () const
 
const ValidityIntervalfindIntervalFor (const eventsetup::EventSetupRecordKey &, const IOVSyncValue &)
 
void setDescriptionForFinder (const eventsetup::ComponentDescription &iDescription)
 
virtual ~EventSetupRecordIntervalFinder ()
 

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

SiStripConfigDbdb_
 
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
 

Detailed Description

Definition at line 18 of file SiStripFedCablingBuilderFromDb.h.

Constructor & Destructor Documentation

SiStripFedCablingBuilderFromDb::SiStripFedCablingBuilderFromDb ( const edm::ParameterSet pset)

Definition at line 21 of file SiStripFedCablingBuilderFromDb.cc.

SiStripFedCablingBuilderFromDb::~SiStripFedCablingBuilderFromDb ( )
virtual

Definition at line 45 of file SiStripFedCablingBuilderFromDb.cc.

Member Function Documentation

void SiStripFedCablingBuilderFromDb::assignDcuAndDetIds ( SiStripFecCabling fec_cabling,
const std::vector< std::pair< uint32_t, TkDcuInfo * > > &  _in 
)
staticprotected

Definition at line 858 of file SiStripFedCablingBuilderFromDb.cc.

void SiStripFedCablingBuilderFromDb::buildFecCabling ( SiStripConfigDb * const  db,
SiStripFecCabling fec_cabling,
const sistrip::CablingSource source 
)
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.

void SiStripFedCablingBuilderFromDb::buildFecCabling ( SiStripConfigDb * const  db,
SiStripFecCabling fec_cabling 
)
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.

void SiStripFedCablingBuilderFromDb::buildFecCablingFromDetIds ( SiStripConfigDb * const  db,
SiStripFecCabling fec_cabling 
)
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.

void SiStripFedCablingBuilderFromDb::buildFecCablingFromDevices ( SiStripConfigDb * const  db,
SiStripFecCabling fec_cabling 
)
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.

void SiStripFedCablingBuilderFromDb::buildFecCablingFromFedConnections ( SiStripConfigDb * const  db,
SiStripFecCabling fec_cabling 
)
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.

void SiStripFedCablingBuilderFromDb::getFecCabling ( const SiStripFedCabling in,
SiStripFecCabling out 
)
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.

void SiStripFedCablingBuilderFromDb::getFedCabling ( const SiStripFecCabling in,
SiStripFedCabling out 
)
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.

SiStripFedCabling * SiStripFedCablingBuilderFromDb::make ( const SiStripFedCablingRcd )
virtual

Builds FED cabling using info from configuration database.

Implements SiStripFedCablingESProducer.

Definition at line 53 of file SiStripFedCablingBuilderFromDb.cc.

void SiStripFedCablingBuilderFromDb::setIntervalFor ( const edm::eventsetup::EventSetupRecordKey key,
const edm::IOVSyncValue iov_sync,
edm::ValidityInterval iov_validity 
)
protectedvirtual
virtual void SiStripFedCablingBuilderFromDb::writeFedCablingToCondDb ( const SiStripFedCabling )
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.

90 {;}

Member Data Documentation

SiStripConfigDb* SiStripFedCablingBuilderFromDb::db_
protected

Access to the configuration DB interface class.

Definition at line 93 of file SiStripFedCablingBuilderFromDb.h.

sistrip::CablingSource SiStripFedCablingBuilderFromDb::source_
protected

Defines "source" (conns, devices, detids) of cabling info.

Definition at line 96 of file SiStripFedCablingBuilderFromDb.h.