CMS 3D CMS Logo

PixelToFEDAssociateFromAscii Class Reference

Check to which FED pixel module belongs to. More...

#include <CalibTracker/SiPixelConnectivity/interface/PixelToFEDAssociateFromAscii.h>

Inheritance diagram for PixelToFEDAssociateFromAscii:

PixelToFEDAssociate

List of all members.

Public Member Functions

virtual int operator() (const PixelEndcapName &) const
 FED id to which endcape modul (identified by name) should be assigned.
virtual int operator() (const PixelBarrelName &) const
 FED id to which barrel modul (identified by name) should be assigned.
virtual int operator() (const PixelModuleName &) const
 FED id for module.
 PixelToFEDAssociateFromAscii (const std::string &fileName)
virtual std::string version () const
 version

Private Types

typedef std::vector< std::pair
< int, std::vector< Bdu > > > 
BarrelConnections
typedef std::vector< std::pair
< int, std::vector< Edu > > > 
EndcapConnections
typedef TRange< intRange

Private Member Functions

Bdu getBdu (std::string) const
Edu getEdu (std::string) const
void init (const std::string &fileName)
 initialisatin (read file)
Range readRange (const std::string &) const
void send (std::pair< int, std::vector< Bdu > > &, std::pair< int, std::vector< Edu > > &) const
 initialisation (read input file)

Private Attributes

std::string theVersion

Static Private Attributes

static BarrelConnections theBarrel = PixelToFEDAssociateFromAscii::BarrelConnections()
static EndcapConnections theEndcap = PixelToFEDAssociateFromAscii::EndcapConnections()

Classes

struct  Bdu
 define allowed (layer,module,ladder) ranges for barrel units, check if module represented by name falls in allowed ranges More...
struct  Edu
 define allowed (endcap,disk,blade) ranges for endcap units, check if module represented by name falls in allowed ranges More...


Detailed Description

Check to which FED pixel module belongs to.

The associacions are read from the datafile

Definition at line 21 of file PixelToFEDAssociateFromAscii.h.


Member Typedef Documentation

typedef std::vector< std::pair< int, std::vector<Bdu> > > PixelToFEDAssociateFromAscii::BarrelConnections [private]

Definition at line 54 of file PixelToFEDAssociateFromAscii.h.

typedef std::vector< std::pair< int, std::vector<Edu> > > PixelToFEDAssociateFromAscii::EndcapConnections [private]

Definition at line 55 of file PixelToFEDAssociateFromAscii.h.

typedef TRange<int> PixelToFEDAssociateFromAscii::Range [private]

Definition at line 44 of file PixelToFEDAssociateFromAscii.h.


Constructor & Destructor Documentation

PixelToFEDAssociateFromAscii::PixelToFEDAssociateFromAscii ( const std::string &  fileName  ) 


Member Function Documentation

Bdu PixelToFEDAssociateFromAscii::getBdu ( std::string   )  const [private]

Edu PixelToFEDAssociateFromAscii::getEdu ( std::string   )  const [private]

void PixelToFEDAssociateFromAscii::init ( const std::string &  fileName  )  [private]

initialisatin (read file)

int PixelToFEDAssociateFromAscii::operator() ( const PixelEndcapName id  )  const [virtual]

FED id to which endcape modul (identified by name) should be assigned.

Definition at line 52 of file PixelToFEDAssociateFromAscii.cc.

References theEndcap.

00053 {
00054   for (EndcapConnections::const_iterator
00055       iec = theEndcap.begin(); iec != theEndcap.end(); iec++) {
00056     for (vector<Edu>::const_iterator
00057         ied = (*iec).second.begin(); ied != (*iec).second.end(); ied++) {
00058       if (    ied->e == id.halfCylinder() 
00059            && ied->d.inside( id.diskName() )
00060            && ied->b.inside( id.bladeName() ) ) return iec->first; 
00061     }
00062   }
00063   edm::LogError("** PixelToFEDAssociateFromAscii WARNING, name: ")
00064        << id.name()<<" not associated to FED";
00065   return -1;
00066 }

int PixelToFEDAssociateFromAscii::operator() ( const PixelBarrelName id  )  const [virtual]

FED id to which barrel modul (identified by name) should be assigned.

Definition at line 35 of file PixelToFEDAssociateFromAscii.cc.

References moduleName(), and theBarrel.

00036 {
00037   for (BarrelConnections::const_iterator
00038       ibc = theBarrel.begin(); ibc != theBarrel.end(); ibc++) {
00039     for (vector<Bdu>::const_iterator
00040         ibd = (*ibc).second.begin(); ibd != (*ibc).second.end(); ibd++) {
00041       if (    ibd->b == id.shell() 
00042            && ibd->l.inside( id.layerName() )
00043            && ibd->z.inside( id.moduleName() )
00044            && ibd->f.inside( id.ladderName() ) ) return (*ibc).first; 
00045     }
00046   }
00047   edm::LogError("** PixelToFEDAssociateFromAscii WARNING, name: ")
00048        << id.name()<<" not associated to FED";
00049   return -1;
00050 }

int PixelToFEDAssociateFromAscii::operator() ( const PixelModuleName id  )  const [virtual]

FED id for module.

Reimplemented from PixelToFEDAssociate.

Definition at line 28 of file PixelToFEDAssociateFromAscii.cc.

00029 {
00030   return id.isBarrel() ?
00031     operator()(dynamic_cast<const PixelBarrelName & >(id)) :
00032     operator()(dynamic_cast<const PixelEndcapName & >(id)) ;
00033 }

Range PixelToFEDAssociateFromAscii::readRange ( const std::string &   )  const [private]

void PixelToFEDAssociateFromAscii::send ( std::pair< int, std::vector< Bdu > > &  ,
std::pair< int, std::vector< Edu > > &   
) const [private]

initialisation (read input file)

std::string PixelToFEDAssociateFromAscii::version (  )  const [virtual]

version

Implements PixelToFEDAssociate.

Definition at line 23 of file PixelToFEDAssociateFromAscii.cc.

References theVersion.

00024 {
00025   return theVersion; 
00026 }


Member Data Documentation

PixelToFEDAssociateFromAscii::BarrelConnections PixelToFEDAssociateFromAscii::theBarrel = PixelToFEDAssociateFromAscii::BarrelConnections() [static, private]

Definition at line 56 of file PixelToFEDAssociateFromAscii.h.

Referenced by operator()().

PixelToFEDAssociateFromAscii::EndcapConnections PixelToFEDAssociateFromAscii::theEndcap = PixelToFEDAssociateFromAscii::EndcapConnections() [static, private]

Definition at line 57 of file PixelToFEDAssociateFromAscii.h.

Referenced by operator()().

std::string PixelToFEDAssociateFromAscii::theVersion [private]

Definition at line 61 of file PixelToFEDAssociateFromAscii.h.

Referenced by version().


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