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";
190 else if (eId->htrTopBottom()==0) row.
topbottom =
"b";
194 if ( !(_gid.null()) &&
211 else if ( !(_gid.null()) &&
227 for (std::vector <HcalElectronicsId>::const_iterator eId=v_eId.begin();
232 row.
crate = eId->readoutVMECrateId();
233 row.
slot = eId->htrSlot();
234 row.
dcc = eId->dccid();
235 row.
spigot = eId->spigot();
236 row.
fiber = eId->isVMEid() ? eId->slbSiteNumber() : eId->fiberIndex();
237 row.
fiberchan = eId->isVMEid() ? eId->slbChannelIndex() : eId->fiberChanId();
238 if (eId->htrTopBottom()==1) row.
topbottom =
"t";
239 else if (eId->htrTopBottom()==0) row.
topbottom =
"b";
243 if ( !(
_id.null()) ){
255 edm::LogError(
"EMap") <<
"Pointer to HcalElectronicsMap is 0!!!";
272 while (getline( inFile, _row )) {
278 const char * _format =
"%d %d %d %s %d %d %d %d %s %d %d %d";
279 _read = sscanf( _row . c_str(), _format,
290 aRow . subdet .append( subdet );
291 aRow . topbottom .append( fpga );
293 map . push_back( aRow );
299 edm::LogInfo(
"EMap") << lines . getCount() <<
" lines read";
313 return rawId < other.
rawId;
331 _lmap -> read(accessor,type);
std::string getSubdetectorString(HcalSubdetector _det)
int read_map(std::string filename)
std::vector< HcalElectronicsId > allElectronicsIdPrecision() const
constexpr uint32_t rawId() const
get the raw id
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)
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