#include <SiPixelFedCablingMap.h>
Classes | |
struct | Key |
Public Member Functions | |
SiPixelFedCablingTree * | cablingTree () const |
std::vector< unsigned int > | fedIds () const |
virtual const sipixelobjects::PixelROC * | findItem (const sipixelobjects::CablingPathToDetUnit &path) const |
virtual std::vector < sipixelobjects::CablingPathToDetUnit > | pathToDetUnit (uint32_t rawDetId) const |
SiPixelFedCablingMap (const std::string &version="") | |
SiPixelFedCablingMap (const SiPixelFedCablingTree *cab) | |
virtual std::string | version () const |
virtual | ~SiPixelFedCablingMap () |
Private Types | |
typedef std::map< Key, sipixelobjects::PixelROC > | Map |
Private Attributes | |
Map | theMap |
std::string | theVersion |
Definition at line 12 of file SiPixelFedCablingMap.h.
typedef std::map<Key, sipixelobjects::PixelROC> SiPixelFedCablingMap::Map [private] |
Definition at line 37 of file SiPixelFedCablingMap.h.
SiPixelFedCablingMap::SiPixelFedCablingMap | ( | const SiPixelFedCablingTree * | cab | ) |
Definition at line 24 of file SiPixelFedCablingMap.cc.
References gather_cfg::cout, SiPixelFedCablingTree::fedList(), sipixelobjects::PixelFEDLink::id(), sipixelobjects::PixelROC::idInLink(), combine::key, link(), sipixelobjects::PixelFEDLink::numberOfROCs(), sipixelobjects::PixelFEDLink::roc(), and theMap.
: theVersion(cab->version()) { // std::cout << "HERE --- SiPixelFedCablingMap CTOR" << std::endl; std::vector<const PixelFEDCabling *> fedList = cab->fedList(); for (std::vector<const PixelFEDCabling *>::const_iterator ifed=fedList.begin(); ifed != fedList.end(); ifed++) { unsigned int fed = (**ifed).id(); unsigned int numLink = (**ifed).numberOfLinks(); for (unsigned int link=1; link <= numLink; link++) { const PixelFEDLink * pLink = (**ifed).link(link); if (pLink==0) continue; unsigned int linkId = pLink->id(); if (linkId != 0 && linkId!= link) std::cout << "PROBLEM WITH LINK NUMBER!!!!" << std::endl; unsigned int numberROC = pLink->numberOfROCs(); for (unsigned int roc=1; roc <= numberROC; roc++) { const PixelROC * pROC = pLink->roc(roc); if (pROC==0) continue; if (pROC->idInLink() != roc) std::cout << "PROBLEM WITH ROC NUMBER!!!!" << std::endl; Key key = {fed, link, roc}; theMap[key] = (*pROC); } } } }
SiPixelFedCablingMap::SiPixelFedCablingMap | ( | const std::string & | version = "" | ) | [inline] |
Definition at line 18 of file SiPixelFedCablingMap.h.
: theVersion(version) {}
virtual SiPixelFedCablingMap::~SiPixelFedCablingMap | ( | ) | [inline, virtual] |
Definition at line 20 of file SiPixelFedCablingMap.h.
{}
SiPixelFedCablingTree * SiPixelFedCablingMap::cablingTree | ( | ) | const |
Definition at line 53 of file SiPixelFedCablingMap.cc.
References SiPixelFedCablingTree::addItem(), theMap, theVersion, and diffTreeTool::tree.
{ SiPixelFedCablingTree * tree = new SiPixelFedCablingTree(theVersion); for (Map::const_iterator im = theMap.begin(); im != theMap.end(); im++) { const sipixelobjects::PixelROC & roc = im->second; unsigned int fedId = im->first.fed; unsigned int linkId = im->first.link; tree->addItem(fedId, linkId, roc); } return tree; }
std::vector< unsigned int > SiPixelFedCablingMap::fedIds | ( | ) | const |
Definition at line 65 of file SiPixelFedCablingMap.cc.
References spr::find(), query::result, and theMap.
const sipixelobjects::PixelROC * SiPixelFedCablingMap::findItem | ( | const sipixelobjects::CablingPathToDetUnit & | path | ) | const [virtual] |
Implements SiPixelFedCabling.
Definition at line 75 of file SiPixelFedCablingMap.cc.
References sipixelobjects::CablingPathToDetUnit::fed, combine::key, sipixelobjects::CablingPathToDetUnit::link, sipixelobjects::CablingPathToDetUnit::roc, and theMap.
std::vector< sipixelobjects::CablingPathToDetUnit > SiPixelFedCablingMap::pathToDetUnit | ( | uint32_t | rawDetId | ) | const [virtual] |
Implements SiPixelFedCabling.
Definition at line 85 of file SiPixelFedCablingMap.cc.
References getHLTPrescaleColumns::path, query::result, and theMap.
virtual std::string SiPixelFedCablingMap::version | ( | ) | const [inline, virtual] |
Implements SiPixelFedCabling.
Definition at line 24 of file SiPixelFedCablingMap.h.
References theVersion.
{ return theVersion; }
Map SiPixelFedCablingMap::theMap [private] |
Definition at line 38 of file SiPixelFedCablingMap.h.
Referenced by cablingTree(), fedIds(), findItem(), pathToDetUnit(), and SiPixelFedCablingMap().
std::string SiPixelFedCablingMap::theVersion [private] |
Definition at line 36 of file SiPixelFedCablingMap.h.
Referenced by cablingTree(), and version().