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 33 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 126 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 127 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 124 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 125 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.
Referenced by SiStripDetVOffBuilder::BuildDetVOffObj(), BuildMap(), SiStripDetVOffBuilder::buildPSUdetIdMap(), and getCcuDcuIds().
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 BuildMap(), gather_cfg::cout, debug, FrontierConditions_GlobalTag_cff::file, mps_fire::i, mps_splice::line, and AlCaHLTBitMon_QueryRunRegistry::string.
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, and createTree::dd.
|
private |
Utility to clone a DCU-PSU map.
Definition at line 473 of file SiStripPsuDetIdMap.cc.
References mps_fire::i.
|
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 91 of file SiStripPsuDetIdMap.h.
References BuildMap(), ccuDcuIds, debug, getDcuPsuMap(), IsHVChannel(), genParticles_cff::map, printControlMap(), printMap(), RemoveDuplicateDetIDs(), and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Return the module DCU IDs associated to the CG map.
Definition at line 89 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 87 of file SiStripPsuDetIdMap.h.
References controlLocations.
|
inline |
Return the CG PSU-DETID map as a vector.
Definition at line 85 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 plotBeamSpotDB::first, and mps_fire::i.
|
inline |
Return the DCU IDs associated to the PG map.
Definition at line 83 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.
Referenced by getCcuDcuIds().
|
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 plotBeamSpotDB::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 plotBeamSpotDB::first, 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 81 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, or, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 73 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 71 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 79 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.
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 create_public_lumi_plots::loc, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by getCcuDcuIds().
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.
Referenced by getCcuDcuIds().
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(), and getCcuDcuIds().
void SiStripPsuDetIdMap::RemoveDuplicateDetIDs | ( | std::vector< uint32_t > & | detids | ) |
Definition at line 153 of file SiStripPsuDetIdMap.cc.
References tier0::unique().
Referenced by getCcuDcuIds().
|
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 begin, SiStripPartition::defaultPartitionName_, end, plotBeamSpotDB::first, mps_fire::i, SiStripDbParams::partitions(), and tier0::unique().
|
private |
Definition at line 147 of file SiStripPsuDetIdMap.h.
Referenced by getCcuDcuIds().
|
private |
Definition at line 147 of file SiStripPsuDetIdMap.h.
Referenced by getCgDcuIds().
|
private |
Definition at line 145 of file SiStripPsuDetIdMap.h.
Referenced by getControlPsuDetIdMap().
|
private |
Definition at line 146 of file SiStripPsuDetIdMap.h.
Referenced by getControlDetectorLocations().
|
private |
Definition at line 143 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 150 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 147 of file SiStripPsuDetIdMap.h.
Referenced by getDcuIds().
|
private |
Definition at line 148 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 148 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 146 of file SiStripPsuDetIdMap.h.
Referenced by getDetectorLocations().
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
Referenced by getHVCrosstalkingMap().
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
Referenced by getHVUnmappedMap().
|
private |
Definition at line 144 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 145 of file SiStripPsuDetIdMap.h.
Referenced by getPsuDetIdMap().