File indexing completed on 2025-08-05 08:20:30
0001 #ifndef SPIN_SPINMONDRAW_H
0002 #define SPIN_SPINMONDRAW_H
0003
0004 #include <onlmon/OnlMonDraw.h>
0005
0006 #include <map>
0007 #include <string> // for allocator, string
0008
0009 class TCanvas;
0010 class TH1;
0011 class TPad;
0012
0013 class SpinMonDraw : public OnlMonDraw
0014 {
0015 public:
0016 SpinMonDraw(const std::string &name);
0017
0018 ~SpinMonDraw() override {}
0019
0020 int Init() override;
0021 int Draw(const std::string &what = "ALL") override;
0022 int MakeHtml(const std::string &what = "ALL") override;
0023 int SavePlot(const std::string &what = "ALL", const std::string &type = "png") override;
0024
0025 static const int NTRIG = 16;
0026
0027 protected:
0028 int MakeCanvas(const std::string &name);
0029 int DrawFirst(const std::string &what = "ALL");
0030 int DrawSecond(const std::string &what = "ALL");
0031 int DrawThird(const std::string &what = "ALL");
0032 TCanvas *TC[3] = {nullptr};
0033 TPad *transparent[3] = {nullptr};
0034 TPad *Pad[30] = {nullptr};
0035
0036 std::map<std::string, std::string> preset_pattern_blue;
0037 std::map<std::string, std::string> preset_pattern_yellow;
0038
0039 std::string TH1_to_string(TH1 *histo);
0040
0041 int DrawGL1pRatio(const std::string &t1, const std::string &t2);
0042
0043
0044
0045 std::map<std::string, TH1 *> gl1ptriggers;
0046
0047 TH1 *gl1_counter[NTRIG] = {nullptr};
0048 };
0049
0050 #endif