CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ViewTranslator.h
Go to the documentation of this file.
1 #ifndef DQM_SiStripCommissioningSummary_ViewTranslator_H
2 #define DQM_SiStripCommissioningSummary_ViewTranslator_H
3 
5 #include <boost/cstdint.hpp>
6 #include <vector>
7 #include <string>
8 #include <map>
9 
21 
22  public:
23 
25  typedef std::map<uint32_t,uint32_t> Mapping;
26 
27  // -------------------- Build maps --------------------
28 
30  static void buildMaps( const SiStripFedCabling&,
31  Mapping& det_to_fec,
32  Mapping& fed_to_fec );
33 
35  uint32_t fedToFec( const uint32_t& fed_key_mask,
36  const Mapping& input,
37  Mapping& output );
38 
40  uint32_t detToFec( const uint32_t& det_key_mask,
41  const Mapping& input,
42  Mapping& output );
43 
44  // -------------------- Root IO --------------------
45 
46  //arguments are the root file name, the uint32_t det key to be unpacked, and the map to be filled with
47  //the matching complete fed and fec keys
48  void detToFec(std::string root_filename,
49  uint32_t& det_key_mask,
50  Mapping& det_to_fec ) {;}
51 
52  //arguments are the root file name, the uint32_t fed key to be unpacked, and the map to be filled with
53  //the matching complete fed and fec keys
54  void fedToFec( std::string root_filename,
55  uint32_t& fed_key_mask,
56  Mapping& fed_to_fec ) {;}
57 
58  //arguments are the root file name, the det to fec translation map and the fed to fec translational
59  //maps (from makemaps)
60  void writeMapsToFile( std::string root_filename,
61  Mapping& det_to_fec,
62  Mapping& fed_to_fec );
63 
64  private:
65 
67  std::string rootfile_;
68 
69  // Some constants
70  static const uint16_t fedIdMask_ = 0xFFF;
71  static const uint16_t fedFeMask_ = 0xF;
72  static const uint16_t fedChMask_ = 0xFF;
73 
74 };
75 
76 #endif // DQM_SiStripCommissioningSummary_ViewTranslator_H
std::string rootfile_
static const uint16_t fedFeMask_
void detToFec(std::string root_filename, uint32_t &det_key_mask, Mapping &det_to_fec)
static const uint16_t fedIdMask_
std::map< uint32_t, uint32_t > Mapping
uint32_t fedToFec(const uint32_t &fed_key_mask, const Mapping &input, Mapping &output)
uint32_t detToFec(const uint32_t &det_key_mask, const Mapping &input, Mapping &output)
static void buildMaps(const SiStripFedCabling &, Mapping &det_to_fec, Mapping &fed_to_fec)
void fedToFec(std::string root_filename, uint32_t &fed_key_mask, Mapping &fed_to_fec)
void writeMapsToFile(std::string root_filename, Mapping &det_to_fec, Mapping &fed_to_fec)
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses...
static const uint16_t fedChMask_