Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:02:13

0001 #ifndef HcalLogicalMap_h
0002 #define HcalLogicalMap_h
0003 
0004 #include "CondFormats/HcalObjects/interface/HcalMappingEntry.h"
0005 #include "CondFormats/HcalObjects/interface/HcalElectronicsMap.h"
0006 
0007 #include <vector>
0008 #include <memory>
0009 
0010 class HcalTopology;
0011 
0012 class HcalLogicalMap {
0013 public:
0014   HcalLogicalMap(const HcalTopology*,
0015                  std::vector<HBHEHFLogicalMapEntry>&,
0016                  std::vector<HOHXLogicalMapEntry>&,
0017                  std::vector<CALIBLogicalMapEntry>&,
0018                  std::vector<ZDCLogicalMapEntry>&,
0019                  std::vector<HTLogicalMapEntry>&,
0020                  std::vector<uint32_t>&,
0021                  std::vector<uint32_t>&,
0022                  std::vector<uint32_t>&,
0023                  std::vector<uint32_t>&,
0024                  std::vector<uint32_t>&,
0025                  std::vector<uint32_t>&,
0026                  std::vector<uint32_t>&,
0027                  std::vector<uint32_t>&);
0028 
0029   ~HcalLogicalMap();
0030 
0031   void checkHashIds();
0032   void checkElectronicsHashIds();
0033   void checkIdFunctions();
0034   void printMap(unsigned int mapIOV);
0035   std::unique_ptr<HcalElectronicsMap> generateHcalElectronicsMap();
0036   const DetId getDetId(const HcalElectronicsId&);
0037   const HcalFrontEndId getHcalFrontEndId(const DetId&);
0038   uint32_t static makeEntryNumber(bool, int, int);
0039 
0040 private:
0041   void printHBEFMap(FILE* hbefmapfile);
0042   void printHOXMap(FILE* hoxmapfile);
0043   void printCalibMap(FILE* calibmapfile);
0044   void printZDCMap(FILE* zdcmapfile);
0045   void printHTMap(FILE* htmapfile);
0046 
0047   unsigned int mapIOV_;
0048 
0049   std::vector<HBHEHFLogicalMapEntry> HBHEHFEntries_;
0050   std::vector<HOHXLogicalMapEntry> HOHXEntries_;
0051   std::vector<CALIBLogicalMapEntry> CALIBEntries_;
0052   std::vector<ZDCLogicalMapEntry> ZDCEntries_;
0053   std::vector<HTLogicalMapEntry> HTEntries_;
0054   std::vector<uint32_t> LinearIndex2Entry_;
0055   std::vector<uint32_t> HbHash2Entry_;
0056   std::vector<uint32_t> HeHash2Entry_;
0057   std::vector<uint32_t> HfHash2Entry_;
0058   std::vector<uint32_t> HtHash2Entry_;
0059   std::vector<uint32_t> HoHash2Entry_;
0060   std::vector<uint32_t> HxCalibHash2Entry_;
0061   std::vector<uint32_t> ZdcHash2Entry_;
0062 
0063   const HcalTopology* topo_;
0064 };
0065 
0066 #endif