39 std::map<int,LMapRow> &
get_map(
void ){
return _lmap; };
42 std::vector<LMapRow> _table;
74 edm::LogError(
"LMap") <<
"Unable to open file with the logical map: " << map_file;
78 edm::LogInfo(
"LMap") <<
"File with the logical map opened successfully: " << map_file << std::endl
81 while (getline( inFile, _row ))
92 const char * let_code =
"Z";
97 const char * _format =
" %d %d %d %d %d %s %s %d %d %d %d %d %d %d %d %d %s %d %d %d %d %d %s %s %s %d %d %d %s %d";
98 _read = sscanf( _row . c_str(), _format,
108 slbin, slbin2, slnam,
113 else if ( type ==
"HO" )
115 const char * _format =
" %d %d %d %d %d %s %s %d %d %d %d %d %d %d %s %d %d %s %d %d %d %d %d";
116 _read = sscanf( _row . c_str(), _format,
137 if ( _det.find(
"HB") != std::string::npos ) aRow . det =
HcalBarrel;
138 else if ( _det.find(
"HE") != std::string::npos ) aRow . det =
HcalEndcap;
139 else if ( _det.find(
"HF") != std::string::npos ) aRow . det =
HcalForward;
140 else if ( _det.find(
"HO") != std::string::npos ) aRow . det =
HcalOuter;
143 aRow . rbx .append( rbx );
144 aRow . fpga .append( fpga );
145 aRow . slbin .append( slbin );
146 aRow . slbin2 .append( slbin2 );
147 aRow . slnam .append( slnam );
148 aRow . rctnam .append( rctnam );
149 aRow . let_code .append( let_code );
151 _table . push_back( aRow );
155 _lmap[_hdid.
rawId()] = aRow;
160 edm::LogInfo(
"LMap") << lines . getCount() <<
" lines read";
178 for (std::vector <HcalElectronicsId>::const_iterator eId=v_eId.begin();
183 row.
crate = eId->readoutVMECrateId();
184 row.
slot = eId->htrSlot();
185 row.
dcc = eId->dccid();
186 row.
spigot = eId->spigot();
187 row.
fiber = eId->fiberIndex();
189 if (eId->htrTopBottom()==1) row.
topbottom =
"t";
193 if ( !(_gid.null()) &&
201 row.
rawId = _id.rawId();
202 row.
ieta = _id.ieta();
203 row.
iphi = _id.iphi();
210 else if ( !(_gid.null()) &&
226 for (std::vector <HcalElectronicsId>::const_iterator eId=v_eId.begin();
231 row.
crate = eId->readoutVMECrateId();
232 row.
slot = eId->htrSlot();
233 row.
dcc = eId->dccid();
234 row.
spigot = eId->spigot();
235 row.
fiber = eId->isVMEid() ? eId->slbSiteNumber() : eId->fiberIndex();
236 row.
fiberchan = eId->isVMEid() ? eId->slbChannelIndex() : eId->fiberChanId();
237 if (eId->htrTopBottom()==1) row.
topbottom =
"t";
241 if ( !(_id.null()) ){
242 row.
rawId = _id.rawId();
243 row.
ieta = _id.ieta();
244 row.
iphi = _id.iphi();
253 edm::LogError(
"EMap") <<
"Pointer to HcalElectronicsMap is 0!!!";
270 while (getline( inFile, _row )) {
276 const char * _format =
"%d %d %d %s %d %d %d %d %s %d %d %d";
277 _read = sscanf( _row . c_str(), _format,
288 aRow . subdet .append( subdet );
289 aRow . topbottom .append( fpga );
291 map . push_back( aRow );
297 edm::LogInfo(
"EMap") << lines . getCount() <<
" lines read";
311 return rawId < other.
rawId;
329 _lmap -> read(accessor,type);
std::string getSubdetectorString(HcalSubdetector _det)
int read_map(std::string filename)
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
std::string getZDCSectionString(HcalZDCDetId::Section _section)
std::map< int, LMapRow > & get_map(void)
boost::shared_ptr< LMap > _lmap
std::map< int, LMapRow > & get_map(void)
uint32_t rawId() const
get the raw id
std::vector< HcalElectronicsId > allElectronicsIdTrigger() const
int test_read(std::string accessor, std::string type="HBEF")
std::map< int, LMapRow > _lmap
int read(std::string accessor, std::string type="HBEF")
bool operator<(const EMapRow &other) const
int read(std::string accessor, std::string type)
boost::shared_ptr< impl > p_impl
int test_read_map(std::string filename)
std::vector< EMap::EMapRow > & get_map(void)
const DetId lookupTrigger(HcalElectronicsId fId) const
brief lookup the trigger logical detid associated with the given electronics id
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id