#include <EventFilter/EcalRawToDigi/interface/EcalRegionCabling.h>
Public Member Functions | |
EcalRegionCabling (edm::ParameterSet &conf, const EcalElectronicsMapping *m) | |
uint32_t | elementIndex (const double eta, const double phi) const |
const EcalElectronicsMapping * | mapping () 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 EcalElectronicsMapping * | mapping_ |
Definition at line 13 of file EcalRegionCabling.h.
EcalRegionCabling::EcalRegionCabling | ( | edm::ParameterSet & | conf, | |
const EcalElectronicsMapping * | m | |||
) | [inline] |
EcalRegionCabling::~EcalRegionCabling | ( | ) |
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().
00034 {return (FEDNumbering::getEcalFEDIds().second - FEDNumbering::getEcalFEDIds().first +1);}
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 }
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 }
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 }
const EcalElectronicsMapping* EcalRegionCabling::mapping_ [private] |