1 #ifndef GUARD_surveypxbimagereader_h 2 #define GUARD_surveypxbimagereader_h 24 read(infile, measurements, reserve);
29 std::ifstream infile(filename.c_str());
31 std::cerr <<
"Cannot open file " << filename <<
" - operation aborted." << std::endl;
33 read(infile, measurements, reserve);
43 measurements_t &measurements,
47 measurements.reserve(reserve);
53 while (std::getline(infile, aLine)) {
56 std::string::iterator iter =
std::find(aLine.begin(), aLine.end(),
'#');
57 std::copy(aLine.begin(), iter, std::back_inserter(stripped));
61 if (curMeas.isValid()) {
62 measurements.push_back(curMeas);
66 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