diff --git a/Specter/src/Specter/Core/SpectrumSerializer.cpp b/Specter/src/Specter/Core/SpectrumSerializer.cpp index e7a2682..6f7949c 100644 --- a/Specter/src/Specter/Core/SpectrumSerializer.cpp +++ b/Specter/src/Specter/Core/SpectrumSerializer.cpp @@ -37,8 +37,8 @@ namespace Specter { { std::vector xpoints = manager.GetCutXPoints(args.name); std::vector ypoints = manager.GetCutYPoints(args.name); - output << YAML::Key << "XPoints" << YAML::Value << YAML::BeginSeq << xpoints << YAML::EndSeq; - output << YAML::Key << "YPoints" << YAML::Value << YAML::BeginSeq << ypoints << YAML::EndSeq; + output << YAML::Key << "XPoints" << YAML::Value << xpoints; + output << YAML::Key << "YPoints" << YAML::Value << ypoints; } else if (args.type == CutType::CutSummaryAll || args.type == CutType::CutSummaryAny) { @@ -46,7 +46,7 @@ namespace Specter { std::vector xpoints = manager.GetCutXPoints(args.name); output << YAML::Key << "XMin" << YAML::Value << xpoints[0]; output << YAML::Key << "XMax" << YAML::Value << xpoints[1]; - output << YAML::Key << "SubHistos" << YAML::Value << YAML::BeginSeq << subhistos << YAML::EndSeq; + output << YAML::Key << "SubHistos" << YAML::Value << subhistos; } output << YAML::EndMap; } @@ -67,10 +67,10 @@ namespace Specter { if (args.type == SpectrumType::Summary) { std::vector subhistos = SpectrumManager::GetInstance().GetSubHistograms(args.name); - output << YAML::Key << "SubHistos" << YAML::Value << YAML::BeginSeq << subhistos << YAML::EndSeq; + output << YAML::Key << "SubHistos" << YAML::Value << subhistos; } - output << YAML::Key << "CutsDrawn" << YAML::Value << YAML::BeginSeq << args.cutsDrawnUpon << YAML::EndSeq; - output << YAML::Key << "CutsApplied" << YAML::Value << YAML::BeginSeq << args.cutsAppliedTo << YAML::EndSeq; + output << YAML::Key << "CutsDrawn" << YAML::Value << args.cutsDrawnUpon; + output << YAML::Key << "CutsApplied" << YAML::Value << args.cutsAppliedTo; output << YAML::EndMap; } @@ -143,11 +143,11 @@ namespace Specter { } else if (tempArgs.type == CutType::Cut2D) { - manager.AddCut(tempArgs, cut["XPoints"][0].as>(), cut["YPoints"][0].as>()); + manager.AddCut(tempArgs, cut["XPoints"].as>(), cut["YPoints"].as>()); } else if (tempArgs.type == CutType::CutSummaryAll || tempArgs.type == CutType::CutSummaryAny) { - manager.AddCut(tempArgs, cut["SubHistos"][0].as>(), cut["XMin"].as(), cut["XMax"].as()); + manager.AddCut(tempArgs, cut["SubHistos"].as>(), cut["XMin"].as(), cut["XMax"].as()); } } } @@ -168,11 +168,11 @@ namespace Specter { tempArgs.min_y = histo["YMin"].as(); tempArgs.max_y = histo["YMax"].as(); tempArgs.nbins_y = histo["YBins"].as(); - tempArgs.cutsDrawnUpon = histo["CutsDrawn"][0].as>(); - tempArgs.cutsAppliedTo = histo["CutsApplied"][0].as>(); + tempArgs.cutsDrawnUpon = histo["CutsDrawn"].as>(); + tempArgs.cutsAppliedTo = histo["CutsApplied"].as>(); if (tempArgs.type == SpectrumType::Summary) { - manager.AddHistogramSummary(tempArgs, histo["SubHistos"][0].as>()); + manager.AddHistogramSummary(tempArgs, histo["SubHistos"].as>()); } else {