Extension to SiStripConfigDb to map PSU channels to DetIDs using DCU-PSU map and DCU-DetID map. More...
#include <SiStripPsuDetIdMap.h>
Public Member Functions | |
void | BuildMap () |
void | BuildMap (const std::string &mapFile) |
void | BuildMap (const std::string &mapFile, std::vector< std::pair< uint32_t, std::string > > &map) |
Overloaded method that does the buidling. More... | |
std::vector< uint32_t > | getCcuDcuIds () |
std::vector< uint32_t > | getCgDcuIds () |
std::vector< std::string > | getControlDetectorLocations () |
std::vector< std::pair < uint32_t, std::string > > | getControlPsuDetIdMap () |
uint32_t | getDcuId (std::string pvss) |
uint32_t | getDcuId (uint32_t detid) |
std::vector< uint32_t > | getDcuIds () |
std::vector< std::pair < uint32_t, std::string > > | getDcuPsuMap () |
std::string | getDetectorLocation (uint32_t detid) |
std::string | getDetectorLocation (std::string pvss) |
std::string | getDetectorLocation (uint32_t detid, std::string group) |
std::vector< std::string > | getDetectorLocations () |
std::vector< uint32_t > | getDetID (std::string pvss) |
std::vector< uint32_t > | getHvDetID (std::string pvss) |
std::vector< uint32_t > | getLvDetID (std::string pvss) |
std::vector< std::pair < uint32_t, std::string > > | getPsuDetIdMap () |
std::string | getPSUName (uint32_t detid) |
std::string | getPSUName (uint32_t detid, std::string group) |
int | IsHVChannel (std::string pvss) |
void | printControlMap () |
void | printMap () |
SiStripPsuDetIdMap () | |
~SiStripPsuDetIdMap () | |
Private Types | |
typedef edm::MapOfVectors < std::string, TkDcuPsuMap * > | DcuPsus |
typedef DcuPsus::range | DcuPsusRange |
typedef std::vector < TkDcuPsuMap * > | DcuPsuVector |
typedef std::vector< std::pair < uint32_t, std::string > > | PsuDetIdMap |
Private Member Functions | |
void | checkMapInputValues (SiStripConfigDb::DcuDetIdsV dcuDetIds_, DcuPsuVector dcuPsus_) |
void | clone (DcuPsuVector &input, DcuPsuVector &output) |
std::vector< uint32_t > | findDcuIdFromDeviceAddress (uint32_t dcuid_) |
void | getDcuPsuMap (DcuPsusRange &pRange, DcuPsusRange &cRange, std::string partition) |
std::vector< std::pair < std::vector< uint16_t > , std::vector< uint32_t > > > | retrieveDcuDeviceAddresses (std::string partition) |
Private Attributes | |
std::vector< uint32_t > | ccuDcuIds |
std::vector< uint32_t > | cgDcuIds |
PsuDetIdMap | cgMap |
std::vector< std::string > | controlLocations |
edm::Service< SiStripConfigDb > | db_ |
std::vector< std::pair < std::vector< uint16_t > , std::vector< uint32_t > > > | dcu_device_addr_vector |
std::vector< uint32_t > | dcuIds |
DcuPsus | DcuPsuMapCG_ |
DcuPsus | DcuPsuMapPG_ |
std::vector< std::string > | detectorLocations |
PsuDetIdMap | pgMap |
Extension to SiStripConfigDb to map PSU channels to DetIDs using DCU-PSU map and DCU-DetID map.
Definition at line 33 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 100 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 101 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 98 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 99 of file SiStripPsuDetIdMap.h.
SiStripPsuDetIdMap::SiStripPsuDetIdMap | ( | ) |
Constructor
Definition at line 20 of file SiStripPsuDetIdMap.cc.
References LogTrace.
SiStripPsuDetIdMap::~SiStripPsuDetIdMap | ( | ) |
void SiStripPsuDetIdMap::BuildMap | ( | ) |
Main routine that accesses the DB and builds the PSU-DETID map.
Definition at line 25 of file SiStripPsuDetIdMap.cc.
References SiStripConfigDb::findDcuDetId(), first, LogTrace, and SiStripDbParams::partitions().
Referenced by SiStripDetVOffBuilder::BuildDetVOffObj(), and SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile | ) |
Build the map from given file. ATTENTION: this will only build the pgMap, not the cgMap.
Definition at line 241 of file SiStripPsuDetIdMap.cc.
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile, |
std::vector< std::pair< uint32_t, std::string > > & | map | ||
) |
Overloaded method that does the buidling.
Definition at line 246 of file SiStripPsuDetIdMap.cc.
References dbtoweb::file, and geometryCSVtoXML::line.
|
private |
Produces a detailed debug of the input values.
Definition at line 477 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, and createTree::dd.
|
private |
|
private |
Searches the DCU device descriptions for the specified DCU ID. Needed for control groups.
Definition at line 584 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, spr::find(), and i.
|
inline |
Return the CCU DCU IDs associated to the CG map.
Definition at line 74 of file SiStripPsuDetIdMap.h.
References ccuDcuIds.
|
inline |
Return the module DCU IDs associated to the CG map.
Definition at line 72 of file SiStripPsuDetIdMap.h.
References cgDcuIds.
|
inline |
Return the CG detector locations as a vector - one-to-one correspondance with the contents of the PSU-DetID map vector.
Definition at line 70 of file SiStripPsuDetIdMap.h.
References controlLocations.
|
inline |
Return the CG PSU-DETID map as a vector.
Definition at line 68 of file SiStripPsuDetIdMap.h.
References cgMap.
uint32_t SiStripPsuDetIdMap::getDcuId | ( | std::string | pvss | ) |
Returns the DCU ID for the specified PSU channel - checks power and control groups.
Definition at line 405 of file SiStripPsuDetIdMap.cc.
References i, and edm::second().
uint32_t SiStripPsuDetIdMap::getDcuId | ( | uint32_t | detid | ) |
Returns the DCU ID associated to the specified Det ID. NB. This checks power groups only, by definition.
Definition at line 415 of file SiStripPsuDetIdMap.cc.
|
inline |
Return the DCU IDs associated to the PG map.
Definition at line 66 of file SiStripPsuDetIdMap.h.
References dcuIds.
std::vector< std::pair< uint32_t, std::string > > SiStripPsuDetIdMap::getDcuPsuMap | ( | ) |
|
private |
Extracts the DCU-PSU map from the DB.
Definition at line 156 of file SiStripPsuDetIdMap.cc.
References begin, clone(), SiStripPartition::defaultPartitionName_, end, LogTrace, and SiStripDbParams::partitions().
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | uint32_t | detid | ) |
Returns the detector location for the specified Det ID, for power groups only.
Definition at line 371 of file SiStripPsuDetIdMap.cc.
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | std::string | pvss | ) |
Returns the detector location for the specified PSU channel.
Definition at line 394 of file SiStripPsuDetIdMap.cc.
References i, and edm::second().
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | uint32_t | detid, |
std::string | group | ||
) |
Returns the detector location for the specified Det ID and specified group type (PG or CG).
Definition at line 379 of file SiStripPsuDetIdMap.cc.
|
inline |
Return the PG detector locations as a vector - one-to-one correspondance with the contents of the PSU-DetID map vector.
Definition at line 64 of file SiStripPsuDetIdMap.h.
References detectorLocations.
std::vector< uint32_t > SiStripPsuDetIdMap::getDetID | ( | std::string | pvss | ) |
Returns the DetIDs associate to the specified PSU channel.
Definition at line 307 of file SiStripPsuDetIdMap.cc.
References python.multivaluedict::sort().
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
std::vector< uint32_t > SiStripPsuDetIdMap::getHvDetID | ( | std::string | pvss | ) |
std::vector< uint32_t > SiStripPsuDetIdMap::getLvDetID | ( | std::string | pvss | ) |
|
inline |
Return the PG PSU-DETID map as a vector.
Definition at line 62 of file SiStripPsuDetIdMap.h.
References pgMap.
std::string SiStripPsuDetIdMap::getPSUName | ( | uint32_t | detid | ) |
Returns the PSU channel name for the specified Det ID, for power groups only.
Definition at line 345 of file SiStripPsuDetIdMap.cc.
std::string SiStripPsuDetIdMap::getPSUName | ( | uint32_t | detid, |
std::string | group | ||
) |
Returns the PSU channel name for the specified Det ID.
Definition at line 354 of file SiStripPsuDetIdMap.cc.
int SiStripPsuDetIdMap::IsHVChannel | ( | std::string | pvss | ) |
Returns 1 if the specified PSU channel is a HV channel, 0 if it is a LV channel. -1 means error.
Definition at line 423 of file SiStripPsuDetIdMap.cc.
void SiStripPsuDetIdMap::printControlMap | ( | ) |
Produces a formatted printout of the control PSU-DETID map.
Definition at line 461 of file SiStripPsuDetIdMap.cc.
References L1TEmulatorMonitor_cff::p.
void SiStripPsuDetIdMap::printMap | ( | ) |
Produces a formatted printout of the PSU-DETID map.
Definition at line 451 of file SiStripPsuDetIdMap.cc.
References L1TEmulatorMonitor_cff::p.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
|
private |
Extracts the DCU device descriptions and stores them for further use. Only used for control groups.
Definition at line 516 of file SiStripPsuDetIdMap.cc.
References begin, SiStripPartition::defaultPartitionName_, end, first, i, SiStripDbParams::partitions(), and python.multivaluedict::sort().
|
private |
Definition at line 119 of file SiStripPsuDetIdMap.h.
Referenced by getCcuDcuIds().
|
private |
Definition at line 119 of file SiStripPsuDetIdMap.h.
Referenced by getCgDcuIds().
|
private |
Definition at line 117 of file SiStripPsuDetIdMap.h.
Referenced by getControlPsuDetIdMap().
|
private |
Definition at line 118 of file SiStripPsuDetIdMap.h.
Referenced by getControlDetectorLocations().
|
private |
Definition at line 116 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 122 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 119 of file SiStripPsuDetIdMap.h.
Referenced by getDcuIds().
|
private |
Definition at line 120 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 120 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 118 of file SiStripPsuDetIdMap.h.
Referenced by getDetectorLocations().
|
private |
Definition at line 117 of file SiStripPsuDetIdMap.h.
Referenced by getPsuDetIdMap().