CMS 3D CMS Logo

sipixelobjects::PixelFEDCabling Class Reference

#include <CondFormats/SiPixelObjects/interface/PixelFEDCabling.h>

List of all members.

Public Types

typedef std::vector< PixelFEDLinkLinks

Public Member Functions

void addItem (unsigned int linkId, const PixelROC &roc)
void addLink (const PixelFEDLink &link)
unsigned int id () const
const PixelFEDLinklink (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


Detailed Description

Definition at line 16 of file PixelFEDCabling.h.


Member Typedef Documentation

typedef std::vector<PixelFEDLink> sipixelobjects::PixelFEDCabling::Links

Definition at line 19 of file PixelFEDCabling.h.


Constructor & Destructor Documentation

sipixelobjects::PixelFEDCabling::PixelFEDCabling ( unsigned int  id = 0  )  [inline]

Definition at line 21 of file PixelFEDCabling.h.

00021 : theFedId(id) { }


Member Function Documentation

void PixelFEDCabling::addItem ( unsigned int  linkId,
const PixelROC roc 
)

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  ) 

Definition at line 14 of file PixelFEDCabling.cc.

References sipixelobjects::PixelFEDLink::id(), and theLinks.

00015 {
00016   if ( link.id() < 1) return;
00017   if ( theLinks.size() < link.id() ) theLinks.resize(link.id());
00018   theLinks[link.id()-1] = link;
00019 }

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 }

unsigned int sipixelobjects::PixelFEDCabling::id ( void   )  const [inline]

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().

00029     { return (id > 0 && id <= theLinks.size()) ? &theLinks[id-1] : 0; }

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 }

void PixelFEDCabling::setLinks ( Links links  ) 

Definition at line 9 of file PixelFEDCabling.cc.

References theLinks.

Referenced by SiPixelFedCablingMapBuilder::produce().

00010 {
00011   theLinks = links;
00012 }


Member Data Documentation

unsigned int sipixelobjects::PixelFEDCabling::theFedId [private]

Definition at line 48 of file PixelFEDCabling.h.

Referenced by id().

Links sipixelobjects::PixelFEDCabling::theLinks [private]

Definition at line 49 of file PixelFEDCabling.h.

Referenced by addItem(), addLink(), checkLinkNumbering(), link(), numberOfLinks(), print(), and setLinks().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:52:34 2009 for CMSSW by  doxygen 1.5.4