1 #ifndef GUARD_surveypxbimagereader_h 2 #define GUARD_surveypxbimagereader_h 25 read(infile, measurements, reserve);
31 std::ifstream infile(filename.c_str());
34 std::cerr <<
"Cannot open file " << filename
35 <<
" - operation aborted." << std::endl;
37 read(infile, measurements, reserve);
51 measurements.reserve(reserve);
57 while (std::getline(infile,aLine))
61 std::string::iterator iter =
std::find(aLine.begin(), aLine.end(),
'#');
62 std::copy(aLine.begin(), iter, std::back_inserter(stripped));
66 if (curMeas.isValid())
68 measurements.push_back(curMeas);
72 return measurements.size();
SurveyPxbImageReader(std::ifstream &infile, measurements_t &measurements, SurveyPxbImage::count_t reserve=800)
Constructor with ifstream and destination vector.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
SurveyPxbImageReader(std::string filename, measurements_t &measurements, SurveyPxbImage::count_t reserve=800)
Constructor with filename and destination vector.
Class to hold one picture of the BPix survey.
SurveyPxbImageReader()
Empty default constructor.
SurveyPxbImage::count_t read(std::ifstream &infile, measurements_t &measurements, SurveyPxbImage::count_t reserve=830)
std::vector< T > measurements_t