10 using namespace sipixelobjects;
15 for (
auto &
v : theMap)
v.second.initFrameConversion();
22 if (fed < other.
fed)
return true;
23 if (fed > other.
fed)
return false;
28 if (roc < other.
roc)
return true;
29 if (roc > other.
roc)
return false;
39 std::vector<const PixelFEDCabling *> fedList = cab->
fedList();
40 for (std::vector<const PixelFEDCabling *>::const_iterator ifed=fedList.begin();
41 ifed != fedList.end(); ifed++) {
42 unsigned int fed = (**ifed).id();
43 unsigned int numLink = (**ifed).numberOfLinks();
46 if (pLink==0)
continue;
47 unsigned int linkId = pLink->
id();
48 if (linkId != 0 && linkId!=
link)
49 std::cout <<
"PROBLEM WITH LINK NUMBER!!!!" << std::endl;
51 for (
unsigned int roc=1; roc <= numberROC; roc++) {
53 if (pROC==0)
continue;
55 std::cout <<
"PROBLEM WITH ROC NUMBER!!!!" << std::endl;
66 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); im++) {
68 unsigned int fedId = im->first.fed;
69 unsigned int linkId = im->first.link;
70 tree->addItem(fedId, linkId, roc);
77 std::vector<unsigned int>
result;
78 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); im++) {
79 unsigned int fedId = im->first.fed;
80 if (
find(result.begin(),result.end(),fedId) == result.end()) result.push_back(fedId);
90 Map::const_iterator inMap =
theMap.find(key);
91 if (inMap!=
theMap.end()) roc = &(inMap->second);
96 uint32_t rawDetId)
const
98 std::vector<sipixelobjects::CablingPathToDetUnit>
result;
99 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); ++im) {
100 if(im->second.rawId()==rawDetId ) {
102 result.push_back(path);
const PixelROC * roc(unsigned int id) const
return ROC identified by id. ROC ids are ranged [1,numberOfROCs]
unsigned int id() const
link id
unsigned int idInLink() const
id of this ROC in parent Link.
SiPixelFedCablingMap(const SiPixelFedCablingTree *cab)
bool operator<(const Key &other) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
unsigned int numberOfROCs() const
number of ROCs in fed
tuple path
else: Piece not in the list, fine.
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const
std::unique_ptr< SiPixelFedCablingTree > cablingTree() const
std::vector< unsigned int > fedIds() const
std::vector< const PixelFEDCabling * > fedList() const