CMS 3D CMS Logo

EcalRegionCabling.h
Go to the documentation of this file.
1 #ifndef EventFilter_EcalRawToDigi_interface_EcalRegionCabling_h
2 #define EventFilter_EcalRawToDigi_interface_EcalRegionCabling_h
3 
9 
11 public:
13  const edm::ParameterSet esMap = conf.getParameter<edm::ParameterSet>("esMapping");
14  es_mapping_ = new ESElectronicsMapper(esMap);
15  }
16 
18  // this pointer is own by this object.
19  delete es_mapping_;
20  }
21  const EcalElectronicsMapping* mapping() const { return mapping_; }
22  const ESElectronicsMapper* es_mapping() const { return es_mapping_; }
23 
25  static uint32_t maxESElementIndex() {
27  }
28 
29  static uint32_t elementIndex(const int FEDindex) {
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  }
40 
41  static uint32_t esElementIndex(const int FEDindex) {
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  }
52 
53  static int fedIndex(const uint32_t index) {
55  return fI;
56  }
57 
58  static int esFedIndex(const uint32_t index) {
60  return fI;
61  }
62 
63  uint32_t elementIndex(const double eta, const double phi) const {
64  int FEDindex = mapping()->GetFED(eta, phi);
65  return elementIndex(FEDindex);
66  }
67 
68 private:
71 };
72 
73 #endif // EventFilter_EcalRawToDigi_interface_EcalRegionCabling_h
EcalRegionCabling::es_mapping_
const ESElectronicsMapper * es_mapping_
Definition: EcalRegionCabling.h:70
ESElectronicsMapper.h
FEDNumbering.h
EcalElectronicsMapping
Definition: EcalElectronicsMapping.h:28
MessageLogger.h
EcalRegionCabling
Definition: EcalRegionCabling.h:10
FEDNumbering::MAXECALFEDID
Definition: FEDNumbering.h:44
EcalRegionCabling::esElementIndex
static uint32_t esElementIndex(const int FEDindex)
Definition: EcalRegionCabling.h:41
EcalRegionCabling::EcalRegionCabling
EcalRegionCabling(edm::ParameterSet &conf, const EcalElectronicsMapping *m)
Definition: EcalRegionCabling.h:12
EcalRegionCabling::~EcalRegionCabling
~EcalRegionCabling()
Definition: EcalRegionCabling.h:17
EcalRegionCabling::fedIndex
static int fedIndex(const uint32_t index)
Definition: EcalRegionCabling.h:53
ESElectronicsMapper
Definition: ESElectronicsMapper.h:14
PVValHelper::eta
Definition: PVValidationHelpers.h:70
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:78
EcalRegionCabling::elementIndex
static uint32_t elementIndex(const int FEDindex)
Definition: EcalRegionCabling.h:29
EcalElectronicsMapping::GetFED
int GetFED(double eta, double phi) const
Definition: EcalElectronicsMapping.cc:1087
edm::ParameterSet
Definition: ParameterSet.h:47
EcalElectronicsMapping.h
EcalRegionCabling::mapping_
const EcalElectronicsMapping * mapping_
Definition: EcalRegionCabling.h:69
createfilelist.int
int
Definition: createfilelist.py:10
FEDNumbering::MINPreShowerFEDID
Definition: FEDNumbering.h:31
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DDAxes::phi
EcalRegionCabling::mapping
const EcalElectronicsMapping * mapping() const
Definition: EcalRegionCabling.h:21
EcalRegionCabling::es_mapping
const ESElectronicsMapper * es_mapping() const
Definition: EcalRegionCabling.h:22
EcalRegionCabling::elementIndex
uint32_t elementIndex(const double eta, const double phi) const
Definition: EcalRegionCabling.h:63
EcalRegionCabling::esFedIndex
static int esFedIndex(const uint32_t index)
Definition: EcalRegionCabling.h:58
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
EcalRegionCabling::maxESElementIndex
static uint32_t maxESElementIndex()
Definition: EcalRegionCabling.h:25
FEDNumbering::MINECALFEDID
Definition: FEDNumbering.h:43
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
EcalRegionCabling::maxElementIndex
static uint32_t maxElementIndex()
Definition: EcalRegionCabling.h:24
ParameterSet.h
FEDNumbering::MAXPreShowerFEDID
Definition: FEDNumbering.h:32