22 std::ifstream asciimapfile (asciimapfilename.c_str());
28 while (asciimapfile >> type >> key >> lowin >> highin) {
30 this->fMap[key].SetPeak(lowin,highin);
31 }
else if (type==
"[back]") {
32 this->fMap[key].AddBackground(lowin,highin);
38 std::ofstream asciimapfile(asciimapfilename.c_str());
40 for (
auto i = fMap.begin(); i != fMap.end(); ++i) {
41 asciimapfile <<
"[peak]" <<
" " << i->first <<
" "
42 << (i->second).GetGate()->GetLow() <<
" " << (i->second).GetGate()->GetHigh() << std::endl;
43 for (
int ibackgate = 0; ibackgate<(i->second.GetGateBGs())->size(); ++ibackgate ) {
44 asciimapfile <<
"[back]" <<
" " << i->first <<
" "
45 << (*(i->second).GetGateBGs())[ibackgate].GetLow() <<
" " << (*(i->second).GetGateBGs())[ibackgate].GetHigh() << std::endl;