CMS 3D CMS Logo

LMap.h
Go to the documentation of this file.
1 #ifndef HCALConfigDBTools_XMLTools_LMap_h
2 #define HCALConfigDBTools_XMLTools_LMap_h
3 // -*- C++ -*-
4 //
5 // Package: XMLTools
6 // Class : LMap
7 //
17 //
18 // Original Author: Gena Kukartsev, kukarzev@fnal.gov
19 // Created: Tue Nov 06 14:30:33 CDT 2007
20 //
21 
22 // system include files
23 #include <vector>
24 #include <cstring>
25 #include <fstream>
26 #include <memory>
27 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabase.hh"
30 
31 class LMapRow {
32 public:
33  LMapRow(){};
34  ~LMapRow(){};
35 
36  int side;
37  int eta, phi, dphi, depth;
38  //string det;
42  int crate, htr; // crate-slot
43  std::string fpga; // top-bottom
44  int htr_fi; // fiber
45  int dcc_sl, spigo, dcc, slb;
49  int fedid;
50 
51  std::string let_code; // specific to HO
52 
53 private:
54 };
55 
56 class LMapDetId {
57 public:
58  LMapDetId(){};
60 
61  int side;
62  int eta, phi, depth;
64 };
65 
66 class LMap {
67 public:
68  LMap();
69  ~LMap();
70 
71  // type = "HNEF" or "HO", matters for
72  int read(std::string accessor, std::string type = "HBEF");
73  std::map<int, LMapRow>& get_map(void);
74 
75 private:
76  class impl;
77  std::shared_ptr<impl> p_impl;
78 };
79 
80 class EMap {
81 public:
82  EMap() {}
84  EMap(const HcalElectronicsMap* map);
85  ~EMap() {}
86 
87  class EMapRow {
88  public:
91  // ZDC channels:
92  // section: ZDC EM, ZDC HAD, ZDC LUM(?)
95 
96  EMapRow() {
97  rawId = 0;
98  crate = 0;
99  slot = 0;
100  dcc = 0;
101  spigot = 0;
102  fiber = 0;
103  fiberchan = 0;
104  ieta = 0;
105  iphi = 0;
106  idepth = 0;
107  topbottom = "";
108  subdet = "";
109  zdc_zside = 0;
110  zdc_channel = 0;
111  zdc_section = "UNKNOWN";
112  }
113  ~EMapRow(){};
114 
115  bool operator<(const EMapRow& other) const;
116 
117  }; // end of class EMapRow
118 
120 
121  std::vector<EMap::EMapRow>& get_map(void);
122 
123 protected:
124  std::vector<EMapRow> map;
125 }; // end of class EMap
126 
127 class LMap_test {
128 public:
129  LMap_test();
131 
132  int test_read(std::string accessor, std::string type = "HBEF");
133 
134 private:
135  std::shared_ptr<LMap> _lmap;
136 };
137 
138 class EMap_test {
139 public:
142 
144 }; // end of class EMap_test
145 
146 #endif
EMap::EMapRow::topbottom
std::string topbottom
Definition: LMap.h:90
LMapRow::rctcra
int rctcra
Definition: LMap.h:47
EMap::EMapRow::subdet
std::string subdet
Definition: LMap.h:90
HcalElectronicsMap.h
LMap
Definition: LMap.h:66
EMap::EMapRow::slot
int slot
Definition: LMap.h:89
LMapRow::let_code
std::string let_code
Definition: LMap.h:51
LMapDetId::phi
int phi
Definition: LMap.h:62
EMap::EMapRow::crate
int crate
Definition: LMap.h:89
EMap::~EMap
~EMap()
Definition: LMap.h:85
LMap::~LMap
~LMap()
Definition: LMap.cc:45
LMap_test::_lmap
std::shared_ptr< LMap > _lmap
Definition: LMap.h:135
LMap_test::LMap_test
LMap_test()
Definition: LMap.cc:327
EMap::EMapRow::zdc_channel
int zdc_channel
Definition: LMap.h:93
LMapRow::rctnam
std::string rctnam
Definition: LMap.h:48
LMapRow::eta
int eta
Definition: LMap.h:37
LMapRow::phi
int phi
Definition: LMap.h:37
LMapRow::fedid
int fedid
Definition: LMap.h:49
EMap::EMap
EMap(std::string filename)
Definition: LMap.h:83
EMap::EMapRow::spigot
int spigot
Definition: LMap.h:89
LMapRow::dphi
int dphi
Definition: LMap.h:37
LMapDetId::~LMapDetId
~LMapDetId()
Definition: LMap.h:59
EMap::EMapRow
Definition: LMap.h:87
EMap::EMapRow::~EMapRow
~EMapRow()
Definition: LMap.h:113
LMapRow::crate
int crate
Definition: LMap.h:42
EMap::EMapRow::operator<
bool operator<(const EMapRow &other) const
Definition: LMap.cc:318
EMap::EMapRow::zdc_zside
int zdc_zside
Definition: LMap.h:93
EMap::EMapRow::iphi
int iphi
Definition: LMap.h:89
LMapRow::LMapRow
LMapRow()
Definition: LMap.h:33
LMapRow::rm
int rm
Definition: LMap.h:41
EMap::map
std::vector< EMapRow > map
Definition: LMap.h:124
LMapRow::qie
int qie
Definition: LMap.h:41
LMapRow::rm_fi
int rm_fi
Definition: LMap.h:41
LMapRow::depth
int depth
Definition: LMap.h:37
LMapRow::rbx
std::string rbx
Definition: LMap.h:40
LMapRow::dcc_sl
int dcc_sl
Definition: LMap.h:45
EMap_test::test_read_map
int test_read_map(std::string filename)
Definition: LMap.cc:321
EMap::EMapRow::fiber
int fiber
Definition: LMap.h:89
LMapRow::adc
int adc
Definition: LMap.h:41
LMapDetId::subdetector
std::string subdetector
Definition: LMap.h:63
LMapRow::slb
int slb
Definition: LMap.h:45
LMapRow::rctcon
int rctcon
Definition: LMap.h:47
LMap_test::~LMap_test
~LMap_test()
Definition: LMap.h:130
LMapDetId::side
int side
Definition: LMap.h:59
LMapRow::rctcar
int rctcar
Definition: LMap.h:47
LMapRow::side
int side
Definition: LMap.h:34
corrVsCorr.filename
filename
Definition: corrVsCorr.py:123
trackingPlots.other
other
Definition: trackingPlots.py:1460
EMap_test
Definition: LMap.h:138
EMap::EMapRow::idepth
int idepth
Definition: LMap.h:89
LMap::p_impl
std::shared_ptr< impl > p_impl
Definition: LMap.h:76
EMap::EMapRow::EMapRow
EMapRow()
Definition: LMap.h:96
LMapRow::htr_fi
int htr_fi
Definition: LMap.h:44
LMap::read
int read(std::string accessor, std::string type="HBEF")
Definition: LMap.cc:47
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LMap_test
Definition: LMap.h:127
EMap::EMapRow::fiberchan
int fiberchan
Definition: LMap.h:89
LMapRow::fi_ch
int fi_ch
Definition: LMap.h:41
LMapRow::slbin2
std::string slbin2
Definition: LMap.h:46
EMap::EMapRow::dcc
int dcc
Definition: LMap.h:89
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
EMap::EMapRow::zdc_section
std::string zdc_section
Definition: LMap.h:94
EMap
Definition: LMap.h:80
LMapRow::spigo
int spigo
Definition: LMap.h:45
LMap::get_map
std::map< int, LMapRow > & get_map(void)
Definition: LMap.cc:49
LMapDetId
Definition: LMap.h:56
LMapDetId::depth
int depth
Definition: LMap.h:62
HcalSubdetector.h
EMap_test::~EMap_test
~EMap_test()
Definition: LMap.h:141
HcalElectronicsMap
Definition: HcalElectronicsMap.h:31
LMapDetId::LMapDetId
LMapDetId()
Definition: LMap.h:58
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
EMap::read_map
int read_map(std::string filename)
Definition: LMap.cc:268
LMapRow::det
HcalSubdetector det
Definition: LMap.h:39
LMapRow::~LMapRow
~LMapRow()
Definition: LMap.h:34
LMapRow::fpga
std::string fpga
Definition: LMap.h:43
LMapRow::htr
int htr
Definition: LMap.h:42
impl
Definition: trackAlgoPriorityOrder.h:18
LMapDetId::eta
int eta
Definition: LMap.h:62
LMap::LMap
LMap()
Definition: LMap.cc:43
LMapRow::pixel
int pixel
Definition: LMap.h:41
LMapRow::slbin
std::string slbin
Definition: LMap.h:46
EMap_test::EMap_test
EMap_test()
Definition: LMap.h:140
EMap::get_map
std::vector< EMap::EMapRow > & get_map(void)
Definition: LMap.cc:316
EMap::EMapRow::ieta
int ieta
Definition: LMap.h:89
LMapRow::dcc
int dcc
Definition: LMap.h:45
LMap_test::test_read
int test_read(std::string accessor, std::string type="HBEF")
Definition: LMap.cc:329
EMap::EMapRow::rawId
int rawId
Definition: LMap.h:89
LMapRow::slnam
std::string slnam
Definition: LMap.h:46
LMapRow
Definition: LMap.h:31
EMap::EMap
EMap()
Definition: LMap.h:82
LMapRow::wedge
int wedge
Definition: LMap.h:41