CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Attributes
EcalRegionCabling Class Reference

#include <EcalRegionCabling.h>

Public Member Functions

 EcalRegionCabling (edm::ParameterSet &conf, const EcalElectronicsMapping *m)
 
uint32_t elementIndex (const double eta, const double phi) const
 
const ESElectronicsMapperes_mapping () const
 
const EcalElectronicsMappingmapping () 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 ESElectronicsMapperes_mapping_
 
const EcalElectronicsMappingmapping_
 

Detailed Description

Definition at line 13 of file EcalRegionCabling.h.

Constructor & Destructor Documentation

◆ EcalRegionCabling()

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

Definition at line 15 of file EcalRegionCabling.h.

15  : mapping_(m) {
16  const edm::ParameterSet esMap = conf.getParameter<edm::ParameterSet>("esMapping");
17  es_mapping_ = new ESElectronicsMapper(esMap);
18  }

References es_mapping_, and edm::ParameterSet::getParameter().

◆ ~EcalRegionCabling()

EcalRegionCabling::~EcalRegionCabling ( )
inline

Definition at line 20 of file EcalRegionCabling.h.

20  {
21  // this pointer is own by this object.
22  delete es_mapping_;
23  }

References es_mapping_.

Member Function Documentation

◆ elementIndex() [1/2]

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

Definition at line 66 of file EcalRegionCabling.h.

66  {
67  int FEDindex = mapping()->GetFED(eta, phi);
68  return elementIndex(FEDindex);
69  }

References elementIndex(), PVValHelper::eta, EcalElectronicsMapping::GetFED(), mapping(), and phi.

◆ elementIndex() [2/2]

static uint32_t EcalRegionCabling::elementIndex ( const int  FEDindex)
inlinestatic

Definition at line 32 of file EcalRegionCabling.h.

32  {
33  //do a test for the time being
34  if (FEDindex > FEDNumbering::MAXECALFEDID || FEDindex < FEDNumbering::MINECALFEDID) {
35  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
36  << " is not between: " << (int)FEDNumbering::MINECALFEDID << " and "
38  return 0;
39  }
40  uint32_t eI = FEDindex - FEDNumbering::MINECALFEDID;
41  return eI;
42  }

References createfilelist::int, FEDNumbering::MAXECALFEDID, and FEDNumbering::MINECALFEDID.

Referenced by elementIndex().

◆ es_mapping()

const ESElectronicsMapper* EcalRegionCabling::es_mapping ( ) const
inline

Definition at line 25 of file EcalRegionCabling.h.

25 { return es_mapping_; }

References es_mapping_.

◆ esElementIndex()

static uint32_t EcalRegionCabling::esElementIndex ( const int  FEDindex)
inlinestatic

Definition at line 44 of file EcalRegionCabling.h.

44  {
45  //do a test for the time being
47  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
48  << " is not between: " << (int)FEDNumbering::MINPreShowerFEDID << " and "
50  return 0;
51  }
52  uint32_t eI = FEDindex - FEDNumbering::MINPreShowerFEDID;
53  return eI;
54  }

References createfilelist::int, FEDNumbering::MAXPreShowerFEDID, and FEDNumbering::MINPreShowerFEDID.

◆ esFedIndex()

static int EcalRegionCabling::esFedIndex ( const uint32_t  index)
inlinestatic

Definition at line 61 of file EcalRegionCabling.h.

61  {
63  return fI;
64  }

References FEDNumbering::MINPreShowerFEDID.

◆ fedIndex()

static int EcalRegionCabling::fedIndex ( const uint32_t  index)
inlinestatic

Definition at line 56 of file EcalRegionCabling.h.

56  {
58  return fI;
59  }

References FEDNumbering::MINECALFEDID.

Referenced by ECALRegFEDSelector::produce().

◆ mapping()

const EcalElectronicsMapping* EcalRegionCabling::mapping ( ) const
inline

Definition at line 24 of file EcalRegionCabling.h.

24 { return mapping_; }

References mapping_.

Referenced by elementIndex().

◆ maxElementIndex()

static uint32_t EcalRegionCabling::maxElementIndex ( )
inlinestatic

◆ maxESElementIndex()

static uint32_t EcalRegionCabling::maxESElementIndex ( )
inlinestatic

Member Data Documentation

◆ es_mapping_

const ESElectronicsMapper* EcalRegionCabling::es_mapping_
private

Definition at line 73 of file EcalRegionCabling.h.

Referenced by EcalRegionCabling(), es_mapping(), and ~EcalRegionCabling().

◆ mapping_

const EcalElectronicsMapping* EcalRegionCabling::mapping_
private

Definition at line 72 of file EcalRegionCabling.h.

Referenced by mapping().

EcalRegionCabling::es_mapping_
const ESElectronicsMapper * es_mapping_
Definition: EcalRegionCabling.h:73
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
FEDNumbering::MINPreShowerFEDID
Definition: FEDNumbering.h:31
ESElectronicsMapper
Definition: ESElectronicsMapper.h:14
PVValHelper::eta
Definition: PVValidationHelpers.h:69
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
EcalRegionCabling::elementIndex
static uint32_t elementIndex(const int FEDindex)
Definition: EcalRegionCabling.h:32
EcalElectronicsMapping::GetFED
int GetFED(double eta, double phi) const
Definition: EcalElectronicsMapping.cc:1087
edm::ParameterSet
Definition: ParameterSet.h:36
edm::LogError
Definition: MessageLogger.h:183
EcalRegionCabling::mapping_
const EcalElectronicsMapping * mapping_
Definition: EcalRegionCabling.h:72
createfilelist.int
int
Definition: createfilelist.py:10
FEDNumbering::MAXPreShowerFEDID
Definition: FEDNumbering.h:32
DDAxes::phi
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
EcalRegionCabling::mapping
const EcalElectronicsMapping * mapping() const
Definition: EcalRegionCabling.h:24
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44