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 <vector>
6 #include <string>
7 #include <map>
8 #include <cstdint>
9 
19 public:
21  typedef std::map<uint32_t, uint32_t> Mapping;
22 
23  // -------------------- Build maps --------------------
24 
26  static void buildMaps(const SiStripFedCabling&, Mapping& det_to_fec, Mapping& fed_to_fec);
27 
29  uint32_t fedToFec(const uint32_t& fed_key_mask, const Mapping& input, Mapping& output);
30 
32  uint32_t detToFec(const uint32_t& det_key_mask, const Mapping& input, Mapping& output);
33 
34  // -------------------- Root IO --------------------
35 
36  //arguments are the root file name, the uint32_t det key to be unpacked, and the map to be filled with
37  //the matching complete fed and fec keys
38  void detToFec(std::string root_filename, uint32_t& det_key_mask, Mapping& det_to_fec) { ; }
39 
40  //arguments are the root file name, the uint32_t fed key to be unpacked, and the map to be filled with
41  //the matching complete fed and fec keys
42  void fedToFec(std::string root_filename, uint32_t& fed_key_mask, Mapping& fed_to_fec) { ; }
43 
44  //arguments are the root file name, the det to fec translation map and the fed to fec translational
45  //maps (from makemaps)
46  void writeMapsToFile(std::string root_filename, Mapping& det_to_fec, Mapping& fed_to_fec);
47 
48 private:
51 
52  // Some constants
53  static const uint16_t fedIdMask_ = 0xFFF;
54  static const uint16_t fedFeMask_ = 0xF;
55  static const uint16_t fedChMask_ = 0xFF;
56 };
57 
58 #endif // DQM_SiStripCommissioningSummary_ViewTranslator_H
ViewTranslator::detToFec
uint32_t detToFec(const uint32_t &det_key_mask, const Mapping &input, Mapping &output)
Definition: ViewTranslator.cc:97
input
static const std::string input
Definition: EdmProvDump.cc:48
ViewTranslator::rootfile_
std::string rootfile_
Definition: ViewTranslator.h:50
convertSQLitetoXML_cfg.output
output
Definition: convertSQLitetoXML_cfg.py:72
SiStripFedCabling.h
ViewTranslator
Definition: ViewTranslator.h:18
SiStripFedCabling
Contains cabling info at the device level, including DetId, APV pair numbers, hardware addresses,...
Definition: SiStripFedCabling.h:25
ViewTranslator::fedIdMask_
static const uint16_t fedIdMask_
Definition: ViewTranslator.h:53
ViewTranslator::fedToFec
uint32_t fedToFec(const uint32_t &fed_key_mask, const Mapping &input, Mapping &output)
Definition: ViewTranslator.cc:56
ViewTranslator::detToFec
void detToFec(std::string root_filename, uint32_t &det_key_mask, Mapping &det_to_fec)
Definition: ViewTranslator.h:38
ViewTranslator::writeMapsToFile
void writeMapsToFile(std::string root_filename, Mapping &det_to_fec, Mapping &fed_to_fec)
Definition: ViewTranslator.cc:194
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
ViewTranslator::buildMaps
static void buildMaps(const SiStripFedCabling &, Mapping &det_to_fec, Mapping &fed_to_fec)
Definition: ViewTranslator.cc:16
ViewTranslator::Mapping
std::map< uint32_t, uint32_t > Mapping
Definition: ViewTranslator.h:21
ViewTranslator::fedToFec
void fedToFec(std::string root_filename, uint32_t &fed_key_mask, Mapping &fed_to_fec)
Definition: ViewTranslator.h:42
ViewTranslator::fedChMask_
static const uint16_t fedChMask_
Definition: ViewTranslator.h:55
ViewTranslator::fedFeMask_
static const uint16_t fedFeMask_
Definition: ViewTranslator.h:54