8 using namespace sipixelobjects;
12 if (fed < other.
fed)
return true;
13 if (fed > other.
fed)
return false;
18 if (roc < other.
roc)
return true;
19 if (roc > other.
roc)
return false;
29 std::vector<const PixelFEDCabling *> fedList = cab->
fedList();
30 for (std::vector<const PixelFEDCabling *>::const_iterator ifed=fedList.begin();
31 ifed != fedList.end(); ifed++) {
32 unsigned int fed = (**ifed).id();
33 unsigned int numLink = (**ifed).numberOfLinks();
36 if (pLink==0)
continue;
37 unsigned int linkId = pLink->
id();
38 if (linkId != 0 && linkId!=
link)
39 std::cout <<
"PROBLEM WITH LINK NUMBER!!!!" << std::endl;
41 for (
unsigned int roc=1; roc <= numberROC; roc++) {
43 if (pROC==0)
continue;
45 std::cout <<
"PROBLEM WITH ROC NUMBER!!!!" << std::endl;
56 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); im++) {
58 unsigned int fedId = im->first.fed;
59 unsigned int linkId = im->first.link;
60 tree->
addItem(fedId, linkId, roc);
67 std::vector<unsigned int>
result;
68 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); im++) {
69 unsigned int fedId = im->first.fed;
70 if (
find(result.begin(),result.end(),fedId) == result.end()) result.push_back(fedId);
80 Map::const_iterator inMap =
theMap.find(key);
81 if (inMap!=
theMap.end()) roc = &(inMap->second);
86 uint32_t rawDetId)
const
88 std::vector<sipixelobjects::CablingPathToDetUnit>
result;
89 for (Map::const_iterator im =
theMap.begin(); im !=
theMap.end(); ++im) {
90 if(im->second.rawId()==rawDetId ) {
92 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
std::string link(std::string &nm, std::string &ns)
virtual std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const
virtual const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const
SiPixelFedCablingTree * cablingTree() const
std::vector< unsigned int > fedIds() const
void addItem(unsigned int fedId, unsigned int linkId, const sipixelobjects::PixelROC &roc)
std::vector< const PixelFEDCabling * > fedList() const