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 //
19 //
20 // Original Author: Gena Kukartsev, kukarzev@fnal.gov
21 // Created: Tue Nov 06 14:30:33 CDT 2007
22 //
23 
24 // system include files
25 #include<vector>
26 #include <cstring>
27 #include <fstream>
28 #include <boost/shared_ptr.hpp>
29 
30 #include "CaloOnlineTools/HcalOnlineDb/interface/ConfigurationDatabase.hh"
33 
34 class LMapRow
35 {
36  public:
37  LMapRow(){};
38  ~LMapRow(){};
39 
40  int side;
41  int eta, phi, dphi, depth;
42  //string det;
46  int crate, htr; // crate-slot
47  std::string fpga; // top-bottom
48  int htr_fi; // fiber
49  int dcc_sl, spigo, dcc, slb;
53  int fedid;
54 
55  std::string let_code; // specific to HO
56 
57  private:
58 
59 };
60 
61 
62 
63 class LMapDetId
64 {
65  public:
66  LMapDetId(){};
68 
69  int side;
70  int eta, phi, depth;
72 
73 };
74 
75 class LMap
76 {
77 
78  public:
79 
80  LMap();
81  ~LMap();
82 
83  // type = "HNEF" or "HO", matters for
84  int read( std::string accessor, std::string type = "HBEF" );
85  std::map<int,LMapRow> & get_map( void );
86 
87  private:
88  class impl;
89  boost::shared_ptr<impl> p_impl;
90 };
91 
92 
93 
94 class EMap
95 {
96  public:
97  EMap(){}
98  EMap( std::string filename ){ read_map(filename); }
99  EMap( const HcalElectronicsMap * map );
100  ~EMap(){}
101 
102  class EMapRow
103  {
104  public:
105  int rawId,crate,slot,dcc,spigot,fiber,fiberchan,ieta,iphi,idepth;
107  // ZDC channels:
108  // section: ZDC EM, ZDC HAD, ZDC LUM(?)
109  int zdc_zside,zdc_channel;
111 
113  rawId=0;
114  crate=0;
115  slot=0;
116  dcc=0;
117  spigot=0;
118  fiber=0;
119  fiberchan=0;
120  ieta=0;
121  iphi=0;
122  idepth=0;
123  topbottom="";
124  subdet="";
125  zdc_zside=0;
126  zdc_channel = 0;
127  zdc_section = "UNKNOWN";
128  }
129  ~EMapRow(){};
130 
131  bool operator<( const EMapRow & other) const;
132 
133  }; // end of class EMapRow
134 
135  int read_map( std::string filename );
136 
137  std::vector<EMap::EMapRow> & get_map( void );
138 
139  protected:
140  std::vector<EMapRow> map;
141 }; // end of class EMap
142 
143 
144 class LMap_test {
145 public:
146  LMap_test();
148 
149  int test_read( std::string accessor, std::string type="HBEF" );
150 
151 private:
152  boost::shared_ptr<LMap> _lmap;
153 };
154 
155 
156 class EMap_test {
157 public:
160 
161  int test_read_map( std::string filename );
162 }; // end of class EMap_test
163 
164 #endif
std::vector< EMapRow > map
Definition: LMap.h:140
type
Definition: HCALResponse.h:21
~EMapRow()
Definition: LMap.h:129
int rctcra
Definition: LMap.h:51
int dphi
Definition: LMap.h:41
int phi
Definition: LMap.h:41
int pixel
Definition: LMap.h:45
std::string zdc_section
Definition: LMap.h:110
int qie
Definition: LMap.h:45
int zdc_zside
Definition: LMap.h:109
~EMap_test()
Definition: LMap.h:159
LMapDetId()
Definition: LMap.h:66
int fedid
Definition: LMap.h:53
int spigot
Definition: LMap.h:105
boost::shared_ptr< LMap > _lmap
Definition: LMap.h:152
EMap_test()
Definition: LMap.h:158
int slb
Definition: LMap.h:49
int htr
Definition: LMap.h:46
int depth
Definition: LMap.h:41
int spigo
Definition: LMap.h:49
bool operator<(const FedChannelConnection &, const FedChannelConnection &)
std::string slbin
Definition: LMap.h:50
std::string subdetector
Definition: LMap.h:71
int dcc_sl
Definition: LMap.h:49
int fi_ch
Definition: LMap.h:45
int adc
Definition: LMap.h:45
EMap(std::string filename)
Definition: LMap.h:98
~LMapDetId()
Definition: LMap.h:67
~LMapRow()
Definition: LMap.h:38
~EMap()
Definition: LMap.h:100
HcalSubdetector
Definition: HcalAssistant.h:31
std::string slnam
Definition: LMap.h:50
int crate
Definition: LMap.h:46
LMapRow()
Definition: LMap.h:37
boost::shared_ptr< impl > p_impl
Definition: LMap.h:88
std::string rbx
Definition: LMap.h:44
std::string rctnam
Definition: LMap.h:52
int side
Definition: LMap.h:38
int phi
Definition: LMap.h:70
std::string fpga
Definition: LMap.h:47
int rm_fi
Definition: LMap.h:45
int dcc
Definition: LMap.h:49
std::string slbin2
Definition: LMap.h:50
std::string topbottom
Definition: LMap.h:106
int wedge
Definition: LMap.h:45
int rctcon
Definition: LMap.h:51
int rctcar
Definition: LMap.h:51
Definition: LMap.h:94
int htr_fi
Definition: LMap.h:48
std::string let_code
Definition: LMap.h:55
Definition: LMap.h:63
HcalSubdetector det
Definition: LMap.h:43
Definition: LMap.h:34
Definition: LMap.h:75
EMap()
Definition: LMap.h:97
int eta
Definition: LMap.h:41
int rm
Definition: LMap.h:45
~LMap_test()
Definition: LMap.h:147