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