43 int _current_size =
size();
45 std::ifstream inFile( filename . c_str(),
std::ios::in );
47 std::cout <<
"Unable to open file with the logical map: " << filename << std::endl;
50 std::cout <<
"File with the logical map opened successfully: " << filename << std::endl;
52 while ( getline( inFile, _row ) > 0 ){
54 int _num, _side, _eta, _phi, _dphi,
_depth;
58 const char * _format =
"%d %d %d %d %d %d %s";
59 _read = sscanf( _row . c_str(), _format,
60 &_num, &_side, &_eta, &_phi, &_dphi, &_depth,
65 std::string subdet(subdetbuf);
68 if ( subdet.find(
"HB")!=std::string::npos ) _det =
HcalBarrel;
69 else if ( subdet.find(
"HE")!=std::string::npos ) _det =
HcalEndcap;
70 else if ( subdet.find(
"HO")!=std::string::npos ) _det =
HcalOuter;
71 else if ( subdet.find(
"HF")!=std::string::npos ) _det =
HcalForward;
74 HcalDetId _detid(_det, _side*_eta, _phi, _depth);
82 std::cout <<
"Logical map file: " << lines . getCount() <<
" lines read" << std::endl;
83 std::cout <<
"Logical map file: " <<
size() - _current_size <<
" lines added to the list" << std::endl;
int initHBEFListFromLmapAscii(void)
HcalSubdetector subdet() const
get the subdetector
std::vector< HcalGenericDetId > channel_list
int depth() const
get the tower depth
int addListFromLmapAscii(std::string filename)
int ieta() const
get the cell ieta
int iphi() const
get the cell iphi
int init(std::vector< HcalGenericDetId > map)
HcalGenericDetId getHcalGenericDetId(void)
virtual ~HcalChannelIterator()
std::vector< HcalGenericDetId >::const_iterator const_iterator
int clearChannelList(void)
HcalSubdetector getHcalSubdetector(void)