File indexing completed on 2025-08-03 08:21:02
0001 #ifndef INTT_MON_DRAW_H
0002 #define INTT_MON_DRAW_H
0003
0004 #include <onlmon/OnlMonClient.h>
0005 #include <onlmon/OnlMonDB.h>
0006 #include <onlmon/OnlMonDraw.h>
0007
0008 #include <TCanvas.h>
0009 #include <TPad.h>
0010 #include <TROOT.h>
0011 #include <TStyle.h>
0012 #include <TSystem.h>
0013
0014 #include <TLine.h>
0015 #include <TPolyLine.h>
0016 #include <TText.h>
0017
0018 #include <TH1D.h>
0019 #include <TH2D.h>
0020
0021 #include <cctype>
0022 #include <cmath>
0023 #include <ctime>
0024 #include <fstream>
0025 #include <iostream>
0026 #include <limits>
0027 #include <sstream>
0028 #include <string>
0029 #include <vector>
0030
0031 class InttMonDraw : public OnlMonDraw
0032 {
0033 public:
0034
0035 InttMonDraw(std::string const&);
0036 ~InttMonDraw() override;
0037
0038 int Init() override;
0039 int Draw(std::string const& = "ALL") override;
0040 int MakeHtml(std::string const& = "ALL") override;
0041 int SavePlot(std::string const& = "ALL", std::string const& = "png") override;
0042
0043 private:
0044 static constexpr int NCHIPS = 26;
0045 static constexpr int NFEES = 14;
0046 static constexpr int NBCOS = 128;
0047
0048 int MakeCanvas(const std::string& name);
0049 int DrawServerStats();
0050
0051 int MakeDispPad(int icnvs, double lgnd_frac = std::numeric_limits<double>::quiet_NaN());
0052 int DrawDispPad_Generic(int icnvs, const std::string& title);
0053
0054 int Draw_FelixBcoFphxBco();
0055 int DrawHistPad_FelixBcoFphxBco(int i, int icnvs);
0056
0057 int Draw_JustFphxBco();
0058 int DrawHistPad_JustFphxBco(int i, int icnvs);
0059
0060 int Draw_ZoomedFphxBco();
0061 int DrawHistPad_ZoomedFphxBco(int i, int icnvs);
0062
0063 Color_t static GetFeeColor(int const&);
0064
0065 int Draw_HitMap();
0066 int DrawLgndPad_HitMap();
0067 int DrawHistPad_HitMap(int i, int icnvs);
0068
0069 int Draw_HitRates();
0070 int DrawHistPad_HitRates(int i, int icnvs);
0071
0072
0073
0074
0075
0076
0077
0078 int Draw_History();
0079
0080 enum
0081 {
0082 k_server_stats = 0,
0083
0084
0085 k_felixbcofphxbco,
0086 k_justfphxbco,
0087 k_zoomedfphxbco,
0088 k_hitmap,
0089 k_hitrates,
0090 k_peaks,
0091 k_history,
0092 k_end
0093 };
0094
0095
0096 TStyle* m_style{nullptr};
0097
0098 TCanvas* TC[k_end]{nullptr};
0099 TPad* transparent[k_end]{nullptr};
0100
0101 TPad* m_disp_pad[k_end]{nullptr};
0102 TPad* m_lgnd_pad[k_end]{nullptr};
0103 TPad* m_hist_pad[k_end][8]{{nullptr}};
0104 TPad* m_left_hist_pad[k_end][8]{{nullptr}};
0105 TPad* m_right_hist_pad[k_end][8]{{nullptr}};
0106 TPad* m_transparent_pad[k_end][8]{{nullptr}};
0107 TPad* m_single_hist_pad[k_end]{nullptr};
0108 TPad* m_single_transparent_pad[k_end]{nullptr};
0109
0110 TH1* m_hist_felixbcofphxbco[8][14]{{nullptr}};
0111 TH1* m_hist_justfphxbco[8][14]{{nullptr}};
0112 TH1* m_left_hist_zoomedfphxbco[8][14]{{nullptr}};
0113 TH1* m_right_hist_zoomedfphxbco[8][14]{{nullptr}};
0114 TH1* m_hist_hitrates[8]{nullptr};
0115 TH2* m_hist_hitmap[8]{nullptr};
0116 TH1* m_hist_history[8]{nullptr};
0117
0118
0119 int m_cnvs_width = 1280;
0120 int m_cnvs_height = 720;
0121
0122 double constexpr static m_disp_frac = 0.15;
0123 double constexpr static m_disp_text_size = 0.2;
0124 double constexpr static m_warn_text_size = 0.15;
0125 double constexpr static m_min_events = 50000;
0126
0127
0128
0129
0130
0131
0132 double constexpr static m_lower = 0.400;
0133 double constexpr static m_upper = 2.500;
0134 };
0135
0136 #endif