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 115 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 116 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 113 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 114 of file SiStripPsuDetIdMap.h.
SiStripPsuDetIdMap::SiStripPsuDetIdMap | ( | ) |
Constructor
Definition at line 20 of file SiStripPsuDetIdMap.cc.
References LogTrace.
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 25 of file SiStripPsuDetIdMap.cc.
Referenced by SiStripDetVOffBuilder::BuildDetVOffObj(), and SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::BuildMap | ( | const std::string & | mapFile, |
std::vector< std::pair< uint32_t, std::string > > & | rawmap | ||
) |
Definition at line 30 of file SiStripPsuDetIdMap.cc.
References mergeVDriftHistosByStation::file, geometryCSVtoXML::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 469 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 576 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, spr::find(), i, and getDQMSummary::iter.
|
inline |
Return the CCU DCU IDs associated to the CG map.
Definition at line 85 of file SiStripPsuDetIdMap.h.
References ccuDcuIds.
|
inline |
Return the module DCU IDs associated to the CG map.
Definition at line 83 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 81 of file SiStripPsuDetIdMap.h.
References controlLocations.
|
inline |
Return the CG PSU-DETID map as a vector.
Definition at line 79 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 397 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 407 of file SiStripPsuDetIdMap.cc.
References plotBeamSpotDB::first, and i.
|
inline |
Return the DCU IDs associated to the PG map.
Definition at line 77 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 463 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 363 of file SiStripPsuDetIdMap.cc.
References plotBeamSpotDB::first, and i.
std::string SiStripPsuDetIdMap::getDetectorLocation | ( | std::string | pvss | ) |
Returns the detector location for the specified PSU channel.
Definition at line 386 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 371 of file SiStripPsuDetIdMap.cc.
References plotBeamSpotDB::first, and 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 75 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 184 of file SiStripPsuDetIdMap.cc.
References gather_cfg::cout, or, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 67 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 165 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
|
inline |
Definition at line 65 of file SiStripPsuDetIdMap.h.
References HVUnmapped_Map.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
std::vector< uint32_t > SiStripPsuDetIdMap::getLvDetID | ( | std::string | psu | ) |
Definition at line 153 of file SiStripPsuDetIdMap.cc.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
|
inline |
Return the PG PSU-DETID map as a vector.
Definition at line 73 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 337 of file SiStripPsuDetIdMap.cc.
References getDQMSummary::iter.
std::string SiStripPsuDetIdMap::getPSUName | ( | uint32_t | detid, |
std::string | group | ||
) |
Returns the PSU channel name for the specified Det ID.
Definition at line 346 of file SiStripPsuDetIdMap.cc.
References getDQMSummary::iter.
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 415 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_QueryRunRegistry::string.
void SiStripPsuDetIdMap::printControlMap | ( | ) |
Produces a formatted printout of the control PSU-DETID map.
Definition at line 453 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_ParallelJobs::p.
void SiStripPsuDetIdMap::printMap | ( | ) |
Produces a formatted printout of the PSU-DETID map.
Definition at line 443 of file SiStripPsuDetIdMap.cc.
References AlCaHLTBitMon_ParallelJobs::p.
Referenced by SiStripDetVOffBuilder::buildPSUdetIdMap().
void SiStripPsuDetIdMap::RemoveDuplicateDetIDs | ( | std::vector< uint32_t > & | detids | ) |
|
private |
Extracts the DCU device descriptions and stores them for further use. Only used for control groups.
Definition at line 508 of file SiStripPsuDetIdMap.cc.
References begin, SiStripPartition::defaultPartitionName_, end, plotBeamSpotDB::first, i, getDQMSummary::iter, SiStripDbParams::partitions(), and python.multivaluedict::sort().
|
private |
Definition at line 135 of file SiStripPsuDetIdMap.h.
Referenced by getCcuDcuIds().
|
private |
Definition at line 135 of file SiStripPsuDetIdMap.h.
Referenced by getCgDcuIds().
|
private |
Definition at line 133 of file SiStripPsuDetIdMap.h.
Referenced by getControlPsuDetIdMap().
|
private |
Definition at line 134 of file SiStripPsuDetIdMap.h.
Referenced by getControlDetectorLocations().
|
private |
Definition at line 131 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 138 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 135 of file SiStripPsuDetIdMap.h.
Referenced by getDcuIds().
|
private |
Definition at line 136 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 136 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 134 of file SiStripPsuDetIdMap.h.
Referenced by getDetectorLocations().
|
private |
Definition at line 132 of file SiStripPsuDetIdMap.h.
Referenced by getHVCrosstalkingMap().
|
private |
Definition at line 132 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 132 of file SiStripPsuDetIdMap.h.
Referenced by getHVUnmappedMap().
|
private |
Definition at line 132 of file SiStripPsuDetIdMap.h.
|
private |
Definition at line 133 of file SiStripPsuDetIdMap.h.
Referenced by getPsuDetIdMap().