CMS 3D CMS Logo

SiStripFedCablingESProducer.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
2 #define CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
3 
6 #include <memory>
7 #include <cstdint>
8 
11 
18 public:
21 
23  virtual std::unique_ptr<SiStripFedCabling> produce(const SiStripFedCablingRcd&);
24 
27 
28 private:
29  virtual SiStripFedCabling* make(const SiStripFedCablingRcd&) = 0;
30 
31 public:
32  // Utility methods that generate "fake" control structure numbering
33  static uint16_t fecCrate(const uint16_t& nth_module); // 4 crates within system
34  static uint16_t fecSlot(const uint16_t& nth_module); // 11 FECs per crate
35  static uint16_t fecRing(const uint16_t& nth_module); // 8 control rings per FEC
36  static uint16_t ccuAddr(const uint16_t& nth_module); // 8 CCU modules per control ring
37  static uint16_t ccuChan(const uint16_t& nth_module); // 8 modules per CCU
38 };
39 
40 // ---------- inline methods ----------
41 
42 inline uint16_t SiStripFedCablingESProducer::fecCrate(const uint16_t& module) {
43  return (module / (8 * 8 * 8 * 11)) % 4 + 1;
44 }
45 inline uint16_t SiStripFedCablingESProducer::fecSlot(const uint16_t& module) { return (module / (8 * 8 * 8)) % 11 + 2; }
46 inline uint16_t SiStripFedCablingESProducer::fecRing(const uint16_t& module) { return (module / (8 * 8)) % 8 + 1; }
47 inline uint16_t SiStripFedCablingESProducer::ccuAddr(const uint16_t& module) { return (module / 8) % 8 + 1; }
48 inline uint16_t SiStripFedCablingESProducer::ccuChan(const uint16_t& module) { return (module / 1) % 8 + 16; }
49 
50 #endif // CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
ESProducer.h
SiStripFedCablingESProducer::produce
virtual std::unique_ptr< SiStripFedCabling > produce(const SiStripFedCablingRcd &)
Definition: SiStripFedCablingESProducer.cc:22
SiStripFedCablingESProducer::make
virtual SiStripFedCabling * make(const SiStripFedCablingRcd &)=0
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
SiStripFedCablingESProducer::ccuChan
static uint16_t ccuChan(const uint16_t &nth_module)
Definition: SiStripFedCablingESProducer.h:48
SiStripFedCablingESProducer::operator=
const SiStripFedCablingESProducer & operator=(const SiStripFedCablingESProducer &)=delete
SiStripFedCablingESProducer::SiStripFedCablingESProducer
SiStripFedCablingESProducer(const edm::ParameterSet &)
Definition: SiStripFedCablingESProducer.cc:12
SiStripFedCablingRcd
Definition: SiStripCondDataRecords.h:22
SiStripFedCablingESProducer::ccuAddr
static uint16_t ccuAddr(const uint16_t &nth_module)
Definition: SiStripFedCablingESProducer.h:47
SiStripFedCablingESProducer
Abstract base class for producer of SiStripFedCabling record.
Definition: SiStripFedCablingESProducer.h:17
edm::ParameterSet
Definition: ParameterSet.h:47
edm::ESProducer
Definition: ESProducer.h:104
SiStripFedCablingESProducer::fecCrate
static uint16_t fecCrate(const uint16_t &nth_module)
Definition: SiStripFedCablingESProducer.h:42
ParameterSet.h
SiStripFedCablingESProducer::fecRing
static uint16_t fecRing(const uint16_t &nth_module)
Definition: SiStripFedCablingESProducer.h:46
SiStripFedCablingESProducer::~SiStripFedCablingESProducer
~SiStripFedCablingESProducer() override
Definition: SiStripFedCablingESProducer.cc:18
SiStripFedCablingESProducer::fecSlot
static uint16_t fecSlot(const uint16_t &nth_module)
Definition: SiStripFedCablingESProducer.h:45