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 10 of file EcalRegionCabling.h.

Constructor & Destructor Documentation

◆ EcalRegionCabling()

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

Definition at line 12 of file EcalRegionCabling.h.

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

12  : mapping_(m) {
13  const edm::ParameterSet esMap = conf.getParameter<edm::ParameterSet>("esMapping");
14  es_mapping_ = new ESElectronicsMapper(esMap);
15  }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const ESElectronicsMapper * es_mapping_
const EcalElectronicsMapping * mapping_

◆ ~EcalRegionCabling()

EcalRegionCabling::~EcalRegionCabling ( )
inline

Definition at line 17 of file EcalRegionCabling.h.

References es_mapping_.

17  {
18  // this pointer is own by this object.
19  delete es_mapping_;
20  }
const ESElectronicsMapper * es_mapping_

Member Function Documentation

◆ elementIndex() [1/2]

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

Definition at line 29 of file EcalRegionCabling.h.

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

Referenced by elementIndex().

29  {
30  //do a test for the time being
31  if (FEDindex > FEDNumbering::MAXECALFEDID || FEDindex < FEDNumbering::MINECALFEDID) {
32  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
33  << " is not between: " << (int)FEDNumbering::MINECALFEDID << " and "
35  return 0;
36  }
37  uint32_t eI = FEDindex - FEDNumbering::MINECALFEDID;
38  return eI;
39  }
Log< level::Error, false > LogError

◆ elementIndex() [2/2]

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

Definition at line 63 of file EcalRegionCabling.h.

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

63  {
64  int FEDindex = mapping()->GetFED(eta, phi);
65  return elementIndex(FEDindex);
66  }
int GetFED(double eta, double phi) const
static uint32_t elementIndex(const int FEDindex)
const EcalElectronicsMapping * mapping() const

◆ es_mapping()

const ESElectronicsMapper* EcalRegionCabling::es_mapping ( ) const
inline

Definition at line 22 of file EcalRegionCabling.h.

References es_mapping_.

22 { return es_mapping_; }
const ESElectronicsMapper * es_mapping_

◆ esElementIndex()

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

Definition at line 41 of file EcalRegionCabling.h.

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

41  {
42  //do a test for the time being
44  edm::LogError("IncorrectMapping") << "FEDindex: " << FEDindex
45  << " is not between: " << (int)FEDNumbering::MINPreShowerFEDID << " and "
47  return 0;
48  }
49  uint32_t eI = FEDindex - FEDNumbering::MINPreShowerFEDID;
50  return eI;
51  }
Log< level::Error, false > LogError

◆ esFedIndex()

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

◆ fedIndex()

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

Definition at line 53 of file EcalRegionCabling.h.

References FEDNumbering::MINECALFEDID.

Referenced by ECALRegFEDSelector::produce().

◆ mapping()

const EcalElectronicsMapping* EcalRegionCabling::mapping ( ) const
inline

Definition at line 21 of file EcalRegionCabling.h.

References mapping_.

Referenced by elementIndex().

21 { return mapping_; }
const EcalElectronicsMapping * mapping_

◆ 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 70 of file EcalRegionCabling.h.

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

◆ mapping_

const EcalElectronicsMapping* EcalRegionCabling::mapping_
private

Definition at line 69 of file EcalRegionCabling.h.

Referenced by mapping().