File: timepagecontroller.h

package info (click to toggle)
aoflagger 3.4.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,688 kB
  • sloc: cpp: 83,116; python: 10,187; sh: 260; makefile: 178
file content (29 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ifndef TIME_PAGE_CONTROLLER_H
#define TIME_PAGE_CONTROLLER_H

#include <map>
#include <string>

#include "aoqplotpagecontroller.h"

#include "../../quality/statisticscollection.h"

class TimePageController final : public AOQPlotPageController {
 protected:
  const std::map<double, DefaultStatistics>& getStatistics() const override {
    if (getStatCollection()->AllTimeStatistics().empty()) {
      static std::map<double, DefaultStatistics> empty_set;
      return empty_set;
    } else {
      return getStatCollection()->TimeStatistics();
    }
  }

  void startLine(XYPlot& plot, const std::string& name, int lineIndex,
                 const std::string& yAxisDesc, bool second_axis) override {
    XYPointSet& points = plot.StartLine(name, "Time", yAxisDesc);
    points.SetUseSecondYAxis(second_axis);
  }
};

#endif