#include <CondFormats/SiPixelObjects/interface/PixelFEDCabling.h>
Public Types | |
typedef std::vector< PixelFEDLink > | Links |
Public Member Functions | |
void | addItem (unsigned int linkId, const PixelROC &roc) |
void | addLink (const PixelFEDLink &link) |
unsigned int | id () const |
const PixelFEDLink * | link (unsigned int id) const |
return link identified by id. Link id's are ranged [1, numberOfLinks] | |
int | numberOfLinks () const |
number of links in FED | |
PixelFEDCabling (unsigned int id=0) | |
std::string | print (int depth=0) const |
void | setLinks (Links &links) |
Private Member Functions | |
bool | checkLinkNumbering () const |
check link numbering consistency, ie. | |
Private Attributes | |
unsigned int | theFedId |
Links | theLinks |
Definition at line 16 of file PixelFEDCabling.h.
typedef std::vector<PixelFEDLink> sipixelobjects::PixelFEDCabling::Links |
Definition at line 19 of file PixelFEDCabling.h.
sipixelobjects::PixelFEDCabling::PixelFEDCabling | ( | unsigned int | id = 0 |
) | [inline] |
Definition at line 21 of file PixelFEDCabling.cc.
References theLinks.
Referenced by SiPixelFedCablingMap::addItem().
00022 { 00023 if ( linkId < 1) return; 00024 if ( theLinks.size() < linkId ) theLinks.resize(linkId); 00025 if ( theLinks[linkId-1].id() != linkId) theLinks[linkId-1] = PixelFEDLink(linkId); 00026 theLinks[linkId-1].addItem(roc); 00027 }
void PixelFEDCabling::addLink | ( | const PixelFEDLink & | link | ) |
bool PixelFEDCabling::checkLinkNumbering | ( | ) | const [private] |
check link numbering consistency, ie.
that link position in vector is the same as its id. Futhermore it checks numbering consistency for ROCs belonging to Link. Called by constructor
Definition at line 29 of file PixelFEDCabling.cc.
References GenMuonPlsPt100GeV_cfg::cout, lat::endl(), HLT_VtxMuL3::result, and theLinks.
00030 { 00031 bool result = true; 00032 typedef Links::const_iterator IL; 00033 unsigned int idx_expected = 0; 00034 for (IL il = theLinks.begin(); il != theLinks.end(); il++) { 00035 idx_expected++; 00036 if (idx_expected != (*il).id() ) { 00037 result = false; 00038 cout << " ** PixelFEDCabling ** link numbering inconsistency, expected id: " 00039 << idx_expected <<" has: " << (*il).id() << endl; 00040 } 00041 if (! (*il).checkRocNumbering() ) { 00042 result = false; 00043 cout << "** PixelFEDCabling ** inconsistent ROC numbering in link id: " 00044 << (*il).id() << endl; 00045 } 00046 } 00047 return result; 00048 }
Definition at line 34 of file PixelFEDCabling.h.
References theFedId.
Referenced by SiPixelFedCablingMap::addFed(), SiPixelFedCablingMap::addItem(), and print().
00034 { return theFedId; }
const PixelFEDLink* sipixelobjects::PixelFEDCabling::link | ( | unsigned int | id | ) | const [inline] |
return link identified by id. Link id's are ranged [1, numberOfLinks]
Definition at line 28 of file PixelFEDCabling.h.
References theLinks.
Referenced by SiPixelInformationExtractor::findNoisyPixels(), SiPixelFrameConverter::hasDetUnit(), SiPixelSCurveCalibrationAnalysis::makeThresholdSummary(), SiPixelFrameConverter::toCabling(), and SiPixelFrameConverter::toDetector().
int sipixelobjects::PixelFEDCabling::numberOfLinks | ( | ) | const [inline] |
number of links in FED
Definition at line 32 of file PixelFEDCabling.h.
References theLinks.
Referenced by SiPixelFrameConverter::hasDetUnit(), print(), and SiPixelFrameConverter::toCabling().
00032 { return theLinks.size(); }
string PixelFEDCabling::print | ( | int | depth = 0 |
) | const |
Definition at line 50 of file PixelFEDCabling.cc.
References lat::endl(), id(), it, numberOfLinks(), out, and theLinks.
00051 { 00052 ostringstream out; 00053 typedef vector<PixelFEDLink>::const_iterator IT; 00054 if (depth-- >=0 ) { 00055 out <<"FED: "<<id()<< endl; 00056 for (IT it=theLinks.begin(); it != theLinks.end(); it++) 00057 out << (*it).print(depth); 00058 out <<"# total number of Links: "<< numberOfLinks() << endl; 00059 } 00060 out << endl; 00061 return out.str(); 00062 }
Definition at line 9 of file PixelFEDCabling.cc.
References theLinks.
Referenced by SiPixelFedCablingMapBuilder::produce().
00010 { 00011 theLinks = links; 00012 }
unsigned int sipixelobjects::PixelFEDCabling::theFedId [private] |
Definition at line 49 of file PixelFEDCabling.h.
Referenced by addItem(), addLink(), checkLinkNumbering(), link(), numberOfLinks(), print(), and setLinks().