CMS 3D CMS Logo

EcalRegionCabling Class Reference

#include <EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h>

List of all members.

Public Member Functions

 EcalRegionCabling (edm::ParameterSet &conf, const EcalElectronicsMapping *m)
uint32_t elementIndex (const double eta, const double phi) const
const EcalElectronicsMappingmapping () const
template<class T>
void updateEcalRefGetterWithElementIndex (edm::RefGetter< T > &refgetter, const edm::Handle< edm::LazyGetter< T > > &lazygetter, const uint32_t index) const
template<class T>
void updateEcalRefGetterWithEtaPhi (edm::RefGetter< T > &refgetter, const edm::Handle< edm::LazyGetter< T > > &lazygetter, const double eta, const double phi) const
template<class T>
void updateEcalRefGetterWithFedIndex (edm::RefGetter< T > &refgetter, const edm::Handle< edm::LazyGetter< T > > &lazygetter, const int index) const
 ~EcalRegionCabling ()

Static Public Member Functions

static uint32_t elementIndex (const int FEDindex)
static int fedIndex (const uint32_t index)
static uint32_t maxElementIndex ()

Private Attributes

const EcalElectronicsMappingmapping_


Detailed Description

Definition at line 13 of file EcalRegionCabling.h.


Constructor & Destructor Documentation

EcalRegionCabling::EcalRegionCabling ( edm::ParameterSet conf,
const EcalElectronicsMapping m 
) [inline]

Definition at line 15 of file EcalRegionCabling.h.

00015                                                                              : mapping_(m)
00016     {
00017     }

EcalRegionCabling::~EcalRegionCabling (  ) 

Definition at line 3 of file EcalRegionCabling.cc.

00003 {}


Member Function Documentation

uint32_t EcalRegionCabling::elementIndex ( const double  eta,
const double  phi 
) const [inline]

Definition at line 52 of file EcalRegionCabling.h.

References elementIndex(), EcalElectronicsMapping::GetFED(), and mapping().

00052                                                                  {
00053     int FEDindex = mapping()->GetFED(eta,phi);
00054     return elementIndex(FEDindex); }

static uint32_t EcalRegionCabling::elementIndex ( const int  FEDindex  )  [inline, static]

Definition at line 36 of file EcalRegionCabling.h.

References first, FEDNumbering::getEcalFEDIds(), and edm::second().

Referenced by elementIndex(), and updateEcalRefGetterWithFedIndex().

00036                                                    {
00037     //do a test for the time being
00038     if (FEDindex > FEDNumbering::getEcalFEDIds().second || FEDindex < FEDNumbering::getEcalFEDIds().first) {
00039       edm::LogError("EcalRegionCabling")<<"FEDindex: "<< FEDindex
00040                                         <<" is not between: "<<FEDNumbering::getEcalFEDIds().first
00041                                         <<" and "<<FEDNumbering::getEcalFEDIds().second;
00042       return 0;}
00043     uint32_t eI = FEDindex - FEDNumbering::getEcalFEDIds().first;
00044     return eI; }

static int EcalRegionCabling::fedIndex ( const uint32_t  index  )  [inline, static]

Definition at line 46 of file EcalRegionCabling.h.

References FEDNumbering::getEcalFEDIds().

Referenced by ECALRegFEDSelector::produce(), and EcalUnpackerWorker::work().

00046                                            { 
00047     int fI = index+FEDNumbering::getEcalFEDIds().first; 
00048     return fI;}

const EcalElectronicsMapping* EcalRegionCabling::mapping (  )  const [inline]

Definition at line 20 of file EcalRegionCabling.h.

References mapping_.

Referenced by elementIndex(), and updateEcalRefGetterWithEtaPhi().

00020 { return mapping_;} 

static uint32_t EcalRegionCabling::maxElementIndex (  )  [inline, static]

Definition at line 34 of file EcalRegionCabling.h.

References first, FEDNumbering::getEcalFEDIds(), and edm::second().

Referenced by EcalRawToRecHitFacility::produce().

template<class T>
void EcalRegionCabling::updateEcalRefGetterWithElementIndex ( edm::RefGetter< T > &  refgetter,
const edm::Handle< edm::LazyGetter< T > > &  lazygetter,
const uint32_t  index 
) const [inline]

Definition at line 61 of file EcalRegionCabling.h.

References LogDebug, and edm::RefGetter< T >::push_back().

Referenced by updateEcalRefGetterWithFedIndex().

00063                                                                                                          {
00064   LogDebug("EcalRawToRecHit|Cabling")<<"updating a refgetter with element index: "<<index;
00065   refgetter.push_back(lazygetter, index);
00066 }

template<class T>
void EcalRegionCabling::updateEcalRefGetterWithEtaPhi ( edm::RefGetter< T > &  refgetter,
const edm::Handle< edm::LazyGetter< T > > &  lazygetter,
const double  eta,
const double  phi 
) const [inline]

Definition at line 77 of file EcalRegionCabling.h.

References EcalElectronicsMapping::GetFED(), index, LogDebug, mapping(), and updateEcalRefGetterWithFedIndex().

00080                                                                                                {
00081   int index = mapping()->GetFED(eta,phi);
00082   LogDebug("EcalRawToRecHit|Cabling")<<"updating a refgetter with eta: "<<eta<<" phi: "<<phi;
00083   updateEcalRefGetterWithFedIndex(refgetter, lazygetter, index);
00084 }

template<class T>
void EcalRegionCabling::updateEcalRefGetterWithFedIndex ( edm::RefGetter< T > &  refgetter,
const edm::Handle< edm::LazyGetter< T > > &  lazygetter,
const int  index 
) const [inline]

Definition at line 69 of file EcalRegionCabling.h.

References elementIndex(), LogDebug, and updateEcalRefGetterWithElementIndex().

Referenced by updateEcalRefGetterWithEtaPhi().

00071                                                                                                    {
00072   LogDebug("EcalRawToRecHit|Cabling")<<"updating a refgetter with fed index: "<<fedindex;
00073   updateEcalRefGetterWithElementIndex(refgetter, lazygetter, elementIndex(fedindex));
00074 }


Member Data Documentation

const EcalElectronicsMapping* EcalRegionCabling::mapping_ [private]

Definition at line 57 of file EcalRegionCabling.h.

Referenced by mapping().


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