Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-12 04:16:03

0001 #ifndef HCALConfigDBTools_XMLTools_LMap_h
0002 #define HCALConfigDBTools_XMLTools_LMap_h
0003 // -*- C++ -*-
0004 //
0005 // Package:     CalibCalorimetry/HcalTPGAlgos
0006 // Class  :     HcalEmap
0007 //
0008 // Implementation:
0009 //     structure and functionality for HCAL electronic map
0010 //     NOTE!
0011 //     Keep xdaq and Oracle dependencies out of here!
0012 //
0013 /**\class HcalEmap HcalEmap.h CalibCalorimetry/HcalTPGAlgos/interface/HcalEmap.h
0014 
0015  Description: container for the HCAL electronics map
0016 
0017  Usage:
0018 
0019 */
0020 //
0021 // Original Author:  Gena Kukartsev, kukarzev@fnal.gov
0022 //         Created:  Tue Oct 14 14:30:20 CDT 2009
0023 //
0024 
0025 // system include files
0026 #include <vector>
0027 #include <cstring>
0028 #include <fstream>
0029 
0030 #include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
0031 
0032 class HcalEmap {
0033 public:
0034   HcalEmap() {}
0035   HcalEmap(std::string filename) { read_map(filename); }
0036   ~HcalEmap() {}
0037 
0038   class HcalEmapRow {
0039   public:
0040     int rawId, crate, slot, dcc, spigot, fiber, fiberchan, ieta, iphi, idepth;
0041     std::string topbottom, subdet;
0042 
0043     HcalEmapRow() {
0044       rawId = 0;
0045       crate = 0;
0046       slot = 0;
0047       dcc = 0;
0048       spigot = 0;
0049       fiber = 0;
0050       fiberchan = 0;
0051       ieta = 0;
0052       iphi = 0;
0053       idepth = 0;
0054       topbottom = "";
0055       subdet = "";
0056     }
0057     ~HcalEmapRow() {}
0058 
0059     bool operator<(const HcalEmapRow& other) const;
0060 
0061   };  // end of class HcalEmapRow
0062 
0063   int read_map(std::string filename);
0064 
0065   std::vector<HcalEmap::HcalEmapRow>& get_map(void);
0066 
0067 protected:
0068   std::vector<HcalEmapRow> map;
0069 };  // end of class HcalEmap
0070 
0071 class HcalEmap_test {
0072 public:
0073   HcalEmap_test() {}
0074   ~HcalEmap_test() {}
0075 
0076   int test_read_map(std::string filename);
0077 };  // end of class HcalEmap_test
0078 
0079 #endif