Go to the documentation of this file.00001 #ifndef DQM_SiStripCommissioningSummary_ViewTranslator_H
00002 #define DQM_SiStripCommissioningSummary_ViewTranslator_H
00003
00004 #include "CondFormats/SiStripObjects/interface/SiStripFedCabling.h"
00005 #include <boost/cstdint.hpp>
00006 #include <vector>
00007 #include <string>
00008 #include <map>
00009
00020 class ViewTranslator {
00021
00022 public:
00023
00025 typedef std::map<uint32_t,uint32_t> Mapping;
00026
00027
00028
00030 static void buildMaps( const SiStripFedCabling&,
00031 Mapping& det_to_fec,
00032 Mapping& fed_to_fec );
00033
00035 uint32_t fedToFec( const uint32_t& fed_key_mask,
00036 const Mapping& input,
00037 Mapping& output );
00038
00040 uint32_t detToFec( const uint32_t& det_key_mask,
00041 const Mapping& input,
00042 Mapping& output );
00043
00044
00045
00046
00047
00048 void detToFec(std::string root_filename,
00049 uint32_t& det_key_mask,
00050 Mapping& det_to_fec ) {;}
00051
00052
00053
00054 void fedToFec( std::string root_filename,
00055 uint32_t& fed_key_mask,
00056 Mapping& fed_to_fec ) {;}
00057
00058
00059
00060 void writeMapsToFile( std::string root_filename,
00061 Mapping& det_to_fec,
00062 Mapping& fed_to_fec );
00063
00064 private:
00065
00067 std::string rootfile_;
00068
00069
00070 static const uint16_t fedIdMask_ = 0xFFF;
00071 static const uint16_t fedFeMask_ = 0xF;
00072 static const uint16_t fedChMask_ = 0xFF;
00073
00074 };
00075
00076 #endif // DQM_SiStripCommissioningSummary_ViewTranslator_H