File indexing completed on 2024-09-12 04:16:03
0001 #ifndef HCALConfigDBTools_XMLTools_LMap_h
0002 #define HCALConfigDBTools_XMLTools_LMap_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
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 };
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 };
0070
0071 class HcalEmap_test {
0072 public:
0073 HcalEmap_test() {}
0074 ~HcalEmap_test() {}
0075
0076 int test_read_map(std::string filename);
0077 };
0078
0079 #endif