test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SiStripFedCablingESProducer.h
Go to the documentation of this file.
1 #ifndef CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
2 #define CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
3 
6 #include "boost/cstdint.hpp"
7 #include <memory>
8 
11 
18 
19  public:
20 
23 
25  virtual std::unique_ptr<SiStripFedCabling> produce( const SiStripFedCablingRcd& );
26 
27  private:
28 
31 
32  virtual SiStripFedCabling* make( const SiStripFedCablingRcd& ) = 0;
33 
34  public:
35 
36  // Utility methods that generate "fake" control structure numbering
37  static uint16_t fecCrate( const uint16_t& nth_module ); // 4 crates within system
38  static uint16_t fecSlot( const uint16_t& nth_module ); // 11 FECs per crate
39  static uint16_t fecRing( const uint16_t& nth_module ); // 8 control rings per FEC
40  static uint16_t ccuAddr( const uint16_t& nth_module ); // 8 CCU modules per control ring
41  static uint16_t ccuChan( const uint16_t& nth_module ); // 8 modules per CCU
42 
43 };
44 
45 // ---------- inline methods ----------
46 
47 inline uint16_t SiStripFedCablingESProducer::fecCrate( const uint16_t& module ) { return (module/(8*8*8*11)) % 4 + 1; }
48 inline uint16_t SiStripFedCablingESProducer::fecSlot( const uint16_t& module ) { return (module/(8*8*8)) % 11 + 2; }
49 inline uint16_t SiStripFedCablingESProducer::fecRing( const uint16_t& module ) { return (module/(8*8)) % 8 + 1; }
50 inline uint16_t SiStripFedCablingESProducer::ccuAddr( const uint16_t& module ) { return (module/8) % 8 + 1; }
51 inline uint16_t SiStripFedCablingESProducer::ccuChan( const uint16_t& module ) { return (module/1) % 8 + 16; }
52 
53 #endif // CalibTracker_SiStripESProducers_SiStripFedCablingESProducer_H
54 
static uint16_t ccuAddr(const uint16_t &nth_module)
static uint16_t fecCrate(const uint16_t &nth_module)
virtual std::unique_ptr< SiStripFedCabling > produce(const SiStripFedCablingRcd &)
static uint16_t fecSlot(const uint16_t &nth_module)
virtual SiStripFedCabling * make(const SiStripFedCablingRcd &)=0
static uint16_t fecRing(const uint16_t &nth_module)
const SiStripFedCablingESProducer & operator=(const SiStripFedCablingESProducer &)
SiStripFedCablingESProducer(const edm::ParameterSet &)
Abstract base class for producer of SiStripFedCabling record.
static uint16_t ccuChan(const uint16_t &nth_module)
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
Definition: vlib.h:208