CMS 3D CMS Logo

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 
19 
20  public:
21 
23  typedef std::map<uint32_t,uint32_t> Mapping;
24 
25  // -------------------- Build maps --------------------
26 
28  static void buildMaps( const SiStripFedCabling&,
29  Mapping& det_to_fec,
30  Mapping& fed_to_fec );
31 
33  uint32_t fedToFec( const uint32_t& fed_key_mask,
34  const Mapping& input,
35  Mapping& output );
36 
38  uint32_t detToFec( const uint32_t& det_key_mask,
39  const Mapping& input,
40  Mapping& output );
41 
42  // -------------------- Root IO --------------------
43 
44  //arguments are the root file name, the uint32_t det key to be unpacked, and the map to be filled with
45  //the matching complete fed and fec keys
46  void detToFec(std::string root_filename,
47  uint32_t& det_key_mask,
48  Mapping& det_to_fec ) {;}
49 
50  //arguments are the root file name, the uint32_t fed key to be unpacked, and the map to be filled with
51  //the matching complete fed and fec keys
52  void fedToFec( std::string root_filename,
53  uint32_t& fed_key_mask,
54  Mapping& fed_to_fec ) {;}
55 
56  //arguments are the root file name, the det to fec translation map and the fed to fec translational
57  //maps (from makemaps)
58  void writeMapsToFile( std::string root_filename,
59  Mapping& det_to_fec,
60  Mapping& fed_to_fec );
61 
62  private:
63 
66 
67  // Some constants
68  static const uint16_t fedIdMask_ = 0xFFF;
69  static const uint16_t fedFeMask_ = 0xF;
70  static const uint16_t fedChMask_ = 0xFF;
71 
72 };
73 
74 #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 std::string const input
Definition: EdmProvDump.cc:44
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_