test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 <string.h>
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:
107  // ZDC channels:
108  // section: ZDC EM, ZDC HAD, ZDC LUM(?)
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 
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 
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 slot
Definition: LMap.h:105
int rctcra
Definition: LMap.h:51
int read_map(std::string filename)
Definition: LMap.cc:258
int dphi
Definition: LMap.h:41
int zdc_channel
Definition: LMap.h:109
int phi
Definition: LMap.h:41
int pixel
Definition: LMap.h:45
~LMap()
Definition: LMap.cc:51
int eta
Definition: LMap.h:70
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
int iphi
Definition: LMap.h:105
LMapDetId()
Definition: LMap.h:66
int fedid
Definition: LMap.h:53
int ieta
Definition: LMap.h:105
int rawId
Definition: LMap.h:105
int fiber
Definition: LMap.h:105
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
std::string subdet
Definition: LMap.h:106
std::map< int, LMapRow > & get_map(void)
Definition: LMap.cc:60
int depth
Definition: LMap.h:41
int spigo
Definition: LMap.h:49
int side
Definition: LMap.h:67
int test_read(std::string accessor, std::string type="HBEF")
Definition: LMap.cc:327
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
int read(std::string accessor, std::string type="HBEF")
Definition: LMap.cc:55
EMap(std::string filename)
Definition: LMap.h:98
bool operator<(const EMapRow &other) const
Definition: LMap.cc:310
~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 fiberchan
Definition: LMap.h:105
int dcc
Definition: LMap.h:105
int side
Definition: LMap.h:38
int depth
Definition: LMap.h:70
int phi
Definition: LMap.h:70
int crate
Definition: LMap.h:105
std::string fpga
Definition: LMap.h:47
int rm_fi
Definition: LMap.h:45
LMap_test()
Definition: LMap.cc:325
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
LMap()
Definition: LMap.cc:49
tuple filename
Definition: lut2db_cfg.py:20
int rctcar
Definition: LMap.h:51
int test_read_map(std::string filename)
Definition: LMap.cc:318
std::vector< EMap::EMapRow > & get_map(void)
Definition: LMap.cc:304
Definition: LMap.h:94
int idepth
Definition: LMap.h:105
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