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 (const std::string &mapFile, const bool debug) |
void | BuildMap (const std::string &mapFile, std::vector< std::pair< uint32_t, std::string > > &rawmap) |
void | BuildMap (const std::string &mapFile, const bool debug, std::map< std::string, std::vector< uint32_t > > &LVmap, std::map< std::string, std::vector< uint32_t > > &HVmap, std::map< std::string, std::vector< uint32_t > > &HVUnmappedmap, std::map< std::string, std::vector< uint32_t > > &HVCrosstalkingmap) |
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 () |
void | getDetID (std::string pvss, bool, std::vector< uint32_t > &detids, std::vector< uint32_t > &unmapped_detids, std::vector< uint32_t > &crosstalking_detids) |
std::map< std::string, std::vector< uint32_t > > | getHVCrosstalkingMap () |
void | getHvDetID (std::string psuchannel, std::vector< uint32_t > &ids, std::vector< uint32_t > &unmapped_ids, std::vector< uint32_t > &crosstalking_ids) |
std::map< std::string, std::vector< uint32_t > > | getHVUnmappedMap () |
std::vector< uint32_t > | getLvDetID (std::string psu) |
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 () |
void | RemoveDuplicateDetIDs (std::vector< uint32_t > &detids) |
SiStripPsuDetIdMap () | |
~SiStripPsuDetIdMap () | |
Private Types | |
typedef edm::MapOfVectors< std::string, TkDcuPsuMap * > | DcuPsus |
typedef DcuPsus::range | DcuPsusRange |
typedef std::vector< TkDcuPsuMap * > | DcuPsuVector |
typedef std::map< std::string, std::vector< uint32_t > > | PsuDetIdMap |
Private Member Functions | |
void | checkMapInputValues (const SiStripConfigDb::DcuDetIdsV &dcuDetIds_, const 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 |
std::vector< std::pair< uint32_t, std::string > > | 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 | HVCrosstalking_Map |
PsuDetIdMap | HVMap |
PsuDetIdMap | HVUnmapped_Map |
PsuDetIdMap | LVMap |
std::vector< std::pair< uint32_t, std::string > > | pgMap |
Extension to SiStripConfigDb to map PSU channels to DetIDs using DCU-PSU map and DCU-DetID map.
Definition at line 32 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 125 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 126 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 123 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 124 of file SiStripPsuDetIdMap.h.
SiStripPsuDetIdMap::SiStripPsuDetIdMap | ( | ) |
SiStripPsuDetIdMap::~SiStripPsuDetIdMap | ( | ) |
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile, |
const bool | debug | ||
) |
Main routine that accesses the DB and builds the PSU-DETID map.
Build the map from given file. ATTENTION: this will only build the pgMap, not the cgMap.
Definition at line 29 of file SiStripPsuDetIdMap.cc.
References debug.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile, |
std::vector< std::pair< uint32_t, std::string > > & | rawmap | ||
) |
Definition at line 33 of file SiStripPsuDetIdMap.cc.
References geometryDiff::file, mps_splice::line, and contentValuesCheck::ss.
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile, |
const bool | debug, | ||
std::map< std::string, std::vector< uint32_t > > & | LVmap, | ||
std::map< std::string, std::vector< uint32_t > > & | HVmap, | ||
std::map< std::string, std::vector< uint32_t > > & | HVUnmappedmap, | ||
std::map< std::string, std::vector< uint32_t > > & | HVCrosstalkingmap | ||
) |
Overloaded method that does the buidling.
|
private |
Produces a detailed debug of the input values.
Definition at line 507 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, createTree::dd, and Calorimetry_cff::dp.
|
private |
Utility to clone a DCU-PSU map.
Definition at line 473 of file SiStripPsuDetIdMap.cc.
References mps_fire::i, and input.
|
private |
Searches the DCU device descriptions for the specified DCU ID. Needed for control groups.
Definition at line 625 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, spr::find(), and mps_fire::i.
|
inline |
Return the CCU DCU IDs associated to the CG map.
Definition at line 90 of file SiStripPsuDetIdMap.h.
References ccuDcuIds.
|
inline |
Return the module DCU IDs associated to the CG map.
Definition at line 88 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 86 of file SiStripPsuDetIdMap.h.
References controlLocations.
|
inline |
Return the CG PSU-DETID map as a vector.
Definition at line 84 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 426 of file SiStripPsuDetIdMap.cc.
References mps_fire::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 440 of file SiStripPsuDetIdMap.cc.
References dqmdumpme::first, and mps_fire::i.
|
inline |
Return the DCU IDs associated to the PG map.
Definition at line 82 of file SiStripPsuDetIdMap.h.
References dcuIds.
std::vector< std::pair< uint32_t, std::string > > SiStripPsuDetIdMap::getDcuPsuMap | ( | ) |
Returns the DCU-PSU map as a vector.
Definition at line 499 of file SiStripPsuDetIdMap.cc.
|
private |
Extracts the DCU-PSU map from the DB.
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | uint32_t | detid | ) |
Returns the detector location for the specified Det ID, for power groups only.
Definition at line 382 of file SiStripPsuDetIdMap.cc.
References dqmdumpme::first, and mps_fire::i.
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | std::string | pvss | ) |
Returns the detector location for the specified PSU channel.
Definition at line 411 of file SiStripPsuDetIdMap.cc.
References mps_fire::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 392 of file SiStripPsuDetIdMap.cc.
References dqmdumpme::first, watchdog::group, and mps_fire::i.
|
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 80 of file SiStripPsuDetIdMap.h.
References detectorLocations.
void SiStripPsuDetIdMap::getDetID | ( | std::string | pvss, |
bool | debug, | ||
std::vector< uint32_t > & | detids, | ||
std::vector< uint32_t > & | unmapped_detids, | ||
std::vector< uint32_t > & | crosstalking_detids | ||
) |
Definition at line 195 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, debug, or, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 72 of file SiStripPsuDetIdMap.h.
References HVCrosstalking_Map.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::getHvDetID | ( | std::string | psuchannel, |
std::vector< uint32_t > & | ids, | ||
std::vector< uint32_t > & | unmapped_ids, | ||
std::vector< uint32_t > & | crosstalking_ids | ||
) |
Definition at line 173 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
|
inline |
Definition at line 70 of file SiStripPsuDetIdMap.h.
References HVUnmapped_Map.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
std::vector< uint32_t > SiStripPsuDetIdMap::getLvDetID | ( | std::string | psu | ) |
Definition at line 162 of file SiStripPsuDetIdMap.cc.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
|
inline |
Return the PG PSU-DETID map as a vector.
Definition at line 78 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 350 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 361 of file SiStripPsuDetIdMap.cc.
References watchdog::group.
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 450 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
void SiStripPsuDetIdMap::printControlMap | ( | ) |
Produces a formatted printout of the control PSU-DETID map.
Definition at line 489 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_ParallelJobs::p.
void SiStripPsuDetIdMap::printMap | ( | ) |
Produces a formatted printout of the PSU-DETID map.
Definition at line 480 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_ParallelJobs::p.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::RemoveDuplicateDetIDs | ( | std::vector< uint32_t > & | detids | ) |
Definition at line 153 of file SiStripPsuDetIdMap.cc.
References jetUpdater_cfi::sort, and tier0::unique().
|
private |
Extracts the DCU device descriptions and stores them for further use. Only used for control groups.
Definition at line 553 of file SiStripPsuDetIdMap.cc.
References SiStripPartition::defaultPartitionName_, submitPVResolutionJobs::desc, mps_fire::end, dqmdumpme::first, mps_fire::i, l1ctLayer1_patternWriters_cff::partition, SiStripDbParams::partitions(), FastTimerService_cff::range, jetUpdater_cfi::sort, and tier0::unique().
|
private |
Definition at line 146 of file SiStripPsuDetIdMap.h.
Referenced by getCcuDcuIds().
|
private |
Definition at line 146 of file SiStripPsuDetIdMap.h.
Referenced by getCgDcuIds().
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
Referenced by getControlPsuDetIdMap().
|
private |
Definition at line 145 of file SiStripPsuDetIdMap.h.
Referenced by getControlDetectorLocations().
|
private |
Definition at line 142 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 149 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 146 of file SiStripPsuDetIdMap.h.
Referenced by getDcuIds().
|
private |
Definition at line 147 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 147 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 145 of file SiStripPsuDetIdMap.h.
Referenced by getDetectorLocations().
|
private |
Definition at line 143 of file SiStripPsuDetIdMap.h.
Referenced by getHVCrosstalkingMap().
|
private |
Definition at line 143 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 143 of file SiStripPsuDetIdMap.h.
Referenced by getHVUnmappedMap().
|
private |
Definition at line 143 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
Referenced by getPsuDetIdMap().