#include <EcalRegionCabling.h>
Public Member Functions | |
EcalRegionCabling (edm::ParameterSet &conf, const EcalElectronicsMapping *m) | |
uint32_t | elementIndex (const double eta, const double phi) const |
const ESElectronicsMapper * | es_mapping () 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 uint32_t | esElementIndex (const int FEDindex) |
static int | esFedIndex (const uint32_t index) |
static int | fedIndex (const uint32_t index) |
static uint32_t | maxElementIndex () |
static uint32_t | maxESElementIndex () |
Private Attributes | |
const ESElectronicsMapper * | es_mapping_ |
const EcalElectronicsMapping * | mapping_ |
Definition at line 15 of file EcalRegionCabling.h.
EcalRegionCabling::EcalRegionCabling | ( | edm::ParameterSet & | conf, |
const EcalElectronicsMapping * | m | ||
) | [inline] |
Definition at line 17 of file EcalRegionCabling.h.
References es_mapping_, and edm::ParameterSet::getParameter().
: mapping_(m) { const edm::ParameterSet esMap = conf.getParameter<edm::ParameterSet>("esMapping"); es_mapping_ = new ESElectronicsMapper(esMap); }
EcalRegionCabling::~EcalRegionCabling | ( | ) | [inline] |
Definition at line 24 of file EcalRegionCabling.h.
References es_mapping_.
{ // this pointer is own by this object. delete es_mapping_; }
static uint32_t EcalRegionCabling::elementIndex | ( | const int | FEDindex | ) | [inline, static] |
Definition at line 47 of file EcalRegionCabling.h.
References FEDNumbering::MAXECALFEDID, and FEDNumbering::MINECALFEDID.
Referenced by elementIndex(), and updateEcalRefGetterWithFedIndex().
{ //do a test for the time being if (FEDindex > FEDNumbering::MAXECALFEDID || FEDindex < FEDNumbering::MINECALFEDID) { edm::LogError("IncorrectMapping")<<"FEDindex: "<< FEDindex <<" is not between: "<<(int) FEDNumbering::MINECALFEDID <<" and "<<(int)FEDNumbering::MAXECALFEDID; return 0;} uint32_t eI = FEDindex - FEDNumbering::MINECALFEDID; return eI; }
uint32_t EcalRegionCabling::elementIndex | ( | const double | eta, |
const double | phi | ||
) | const [inline] |
Definition at line 76 of file EcalRegionCabling.h.
References elementIndex(), EcalElectronicsMapping::GetFED(), and mapping().
{ int FEDindex = mapping()->GetFED(eta,phi); return elementIndex(FEDindex); }
const ESElectronicsMapper* EcalRegionCabling::es_mapping | ( | ) | const [inline] |
static uint32_t EcalRegionCabling::esElementIndex | ( | const int | FEDindex | ) | [inline, static] |
Definition at line 57 of file EcalRegionCabling.h.
References FEDNumbering::MAXPreShowerFEDID, and FEDNumbering::MINPreShowerFEDID.
{ //do a test for the time being if (FEDindex > FEDNumbering::MAXPreShowerFEDID || FEDindex < FEDNumbering::MINPreShowerFEDID) { edm::LogError("IncorrectMapping")<<"FEDindex: "<< FEDindex <<" is not between: "<<(int) FEDNumbering::MINPreShowerFEDID <<" and "<<(int)FEDNumbering::MAXPreShowerFEDID; return 0;} uint32_t eI = FEDindex - FEDNumbering::MINPreShowerFEDID; return eI; }
static int EcalRegionCabling::esFedIndex | ( | const uint32_t | index | ) | [inline, static] |
Definition at line 71 of file EcalRegionCabling.h.
References FEDNumbering::MINPreShowerFEDID.
Referenced by ESUnpackerWorker::work().
{ int fI = index+FEDNumbering::MINPreShowerFEDID; return fI;}
static int EcalRegionCabling::fedIndex | ( | const uint32_t | index | ) | [inline, static] |
Definition at line 67 of file EcalRegionCabling.h.
References FEDNumbering::MINECALFEDID.
Referenced by ECALRegFEDSelector::produce(), and EcalUnpackerWorker::work().
{ int fI = index+FEDNumbering::MINECALFEDID; return fI;}
const EcalElectronicsMapping* EcalRegionCabling::mapping | ( | ) | const [inline] |
Definition at line 28 of file EcalRegionCabling.h.
References mapping_.
Referenced by elementIndex(), and updateEcalRefGetterWithEtaPhi().
{ return mapping_;}
static uint32_t EcalRegionCabling::maxElementIndex | ( | ) | [inline, static] |
Definition at line 44 of file EcalRegionCabling.h.
References FEDNumbering::MAXECALFEDID, and FEDNumbering::MINECALFEDID.
{return (FEDNumbering::MAXECALFEDID - FEDNumbering::MINECALFEDID +1);}
static uint32_t EcalRegionCabling::maxESElementIndex | ( | ) | [inline, static] |
Definition at line 45 of file EcalRegionCabling.h.
References FEDNumbering::MAXPreShowerFEDID, and FEDNumbering::MINPreShowerFEDID.
Referenced by ESUnpackerWorker::maxElementIndex().
{ return (FEDNumbering::MAXPreShowerFEDID - FEDNumbering::MINPreShowerFEDID +1);}
void EcalRegionCabling::updateEcalRefGetterWithElementIndex | ( | edm::RefGetter< T > & | refgetter, |
const edm::Handle< edm::LazyGetter< T > > & | lazygetter, | ||
const uint32_t | index | ||
) | const |
Definition at line 86 of file EcalRegionCabling.h.
References getHLTprescales::index, LogDebug, and edm::RefGetter< T >::push_back().
Referenced by updateEcalRefGetterWithFedIndex().
void EcalRegionCabling::updateEcalRefGetterWithEtaPhi | ( | edm::RefGetter< T > & | refgetter, |
const edm::Handle< edm::LazyGetter< T > > & | lazygetter, | ||
const double | eta, | ||
const double | phi | ||
) | const |
Definition at line 102 of file EcalRegionCabling.h.
References EcalElectronicsMapping::GetFED(), getHLTprescales::index, LogDebug, mapping(), phi, and updateEcalRefGetterWithFedIndex().
void EcalRegionCabling::updateEcalRefGetterWithFedIndex | ( | edm::RefGetter< T > & | refgetter, |
const edm::Handle< edm::LazyGetter< T > > & | lazygetter, | ||
const int | index | ||
) | const |
Definition at line 94 of file EcalRegionCabling.h.
References elementIndex(), LogDebug, and updateEcalRefGetterWithElementIndex().
Referenced by updateEcalRefGetterWithEtaPhi().
{ LogDebug("EcalRawToRecHit|Cabling")<<"updating a refgetter with fed index: "<<fedindex; updateEcalRefGetterWithElementIndex(refgetter, lazygetter, elementIndex(fedindex)); }
const ESElectronicsMapper* EcalRegionCabling::es_mapping_ [private] |
Definition at line 82 of file EcalRegionCabling.h.
Referenced by EcalRegionCabling(), es_mapping(), and ~EcalRegionCabling().
const EcalElectronicsMapping* EcalRegionCabling::mapping_ [private] |
Definition at line 81 of file EcalRegionCabling.h.
Referenced by mapping().