38 std::map<int,LMapRow> &
get_map(
void ){
return _lmap; };
41 std::vector<LMapRow> _table;
73 std::cout <<
"Unable to open file with the logical map: " << map_file << std::endl;
77 std::cout <<
"File with the logical map opened successfully: " << map_file << std::endl;
78 std::cout <<
"Type: " << type << std::endl;
80 while ( getline( inFile, _row ) > 0 )
91 const char * let_code =
"Z";
96 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";
97 _read = sscanf( _row . c_str(), _format,
107 slbin, slbin2, slnam,
112 else if ( type ==
"HO" )
114 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";
115 _read = sscanf( _row . c_str(), _format,
136 if ( _det.find(
"HB") != std::string::npos ) aRow . det =
HcalBarrel;
137 else if ( _det.find(
"HE") != std::string::npos ) aRow . det =
HcalEndcap;
138 else if ( _det.find(
"HF") != std::string::npos ) aRow . det =
HcalForward;
139 else if ( _det.find(
"HO") != std::string::npos ) aRow . det =
HcalOuter;
142 aRow . rbx .append( rbx );
143 aRow . fpga .append( fpga );
144 aRow . slbin .append( slbin );
145 aRow . slbin2 .append( slbin2 );
146 aRow . slnam .append( slnam );
147 aRow . rctnam .append( rctnam );
148 aRow . let_code .append( let_code );
150 _table . push_back( aRow );
159 std::cout <<
"LMap: " << lines . getCount() <<
" lines read" << std::endl;
177 for (std::vector <HcalElectronicsId>::const_iterator eId=v_eId.begin();
182 row.
crate = eId->readoutVMECrateId();
183 row.
slot = eId->htrSlot();
184 row.
dcc = eId->dccid();
185 row.
spigot = eId->spigot();
186 row.
fiber = eId->fiberIndex();
188 if (eId->htrTopBottom()==1) row.
topbottom =
"t";
192 if ( !(_gid.null()) &&
200 row.
rawId = _id.rawId();
201 row.
ieta = _id.ieta();
202 row.
iphi = _id.iphi();
209 else if ( !(_gid.null()) &&
225 for (std::vector <HcalElectronicsId>::const_iterator eId=v_eId.begin();
230 row.
crate = eId->readoutVMECrateId();
231 row.
slot = eId->htrSlot();
232 row.
dcc = eId->dccid();
233 row.
spigot = eId->spigot();
234 row.
fiber = eId->slbSiteNumber();
236 if (eId->htrTopBottom()==1) row.
topbottom =
"t";
240 if ( !(_id.null()) ){
241 row.
rawId = _id.rawId();
242 row.
ieta = _id.ieta();
243 row.
iphi = _id.iphi();
252 std::cerr <<
"Pointer to HcalElectronicsMap is 0!!!" << std::endl;
264 std::cout <<
"Unable to open file with the electronic map: " << filename << std::endl;
267 std::cout <<
"File with the electronic map opened successfully: " << filename << std::endl;
269 while ( getline( inFile, _row ) > 0 ){
275 const char * _format =
"%d %d %d %s %d %d %d %d %s %d %d %d";
276 _read = sscanf( _row . c_str(), _format,
287 aRow . subdet .append( subdet );
288 aRow . topbottom .append( fpga );
290 map . push_back( aRow );
296 std::cout <<
"EMap: " << lines . getCount() <<
" lines read" << std::endl;
310 return rawId < other.
rawId;
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
std::vector< LMapRow > _table