Skip to content
Snippets Groups Projects
Select Git revision
  • 7775ed1aa75e9d0176f08c7d9b40e7dea45706b2
  • master default protected
  • nightly_master
  • jul25_patches
  • cleanup_rich_v25a
  • jul24_patches
  • nov23_patches
  • DC_2404
  • nighly_master
  • DC_Jan24
  • DC_Nov23
  • DC_Oct23
  • feb23_patches
  • L1Algo-dev9
  • dec21_patches protected
  • apr21_patches protected
  • dev_2025_30
  • RC_jul25
  • dev_2025_29
  • dev_2025_28
  • dev_2025_27
  • dev_2025_26
  • dev_2025_25
  • dev_2025_24
  • dev_2025_23
  • dev_2025_22
  • dev_2025_21
  • dev_2025_20
  • dev_2025_19
  • dev_2025_18
  • dev_2025_17
  • dev_2025_16
  • JUL24p1
  • dev_2025_15
  • dev_2025_14
  • dev_2025_13
36 results

L1AlgoPulls.cxx

Blame
  • CbmQaHist.h 3.97 KiB
    /* Copyright (C) 2020 GSI Helmholtzzentrum fuer Schwerionenforschung, Darmstadt
       SPDX-License-Identifier: GPL-3.0-only
       Authors: Sergey Gorbunov [committer] */
    
    /// \file   CbmQaHist.h
    /// \brief  Definition of the CbmQaHist class
    /// \author Sergey Gorbunov <se.gorbunov@gsi.de>
    /// \date   22.11.2020
    
    #ifndef CbmQaHist_H
    #define CbmQaHist_H
    
    #include "CbmQaCanvas.h"
    
    #include <Logger.h>
    
    #include <TFitResultPtr.h>
    #include <TPaveStats.h>
    #include <TStyle.h>
    #include <TVirtualPad.h>
    
    // The TH* headers are needed here for the ROOT linker
    
    #include <TF1.h>
    #include <TH1D.h>
    #include <TH1F.h>
    #include <TH1I.h>
    #include <TProfile.h>
    #include <TProfile2D.h>
    
    /// A modification of TH* and TProfile* classes that keeps statistics & fit drawing options
    /// and resizes the stat window accordingly without the actual drawing.
    /// In the original classes, hist->Draw() & canv->Update() must be called
    /// for resetting Stat/Fit window.
    ///
    template<class HistTypeT>
    class CbmQaHist : public HistTypeT {
    public:
      /// Default constructor only for the streamer
      CbmQaHist() : HistTypeT()
      {
        // we don't call SetOptStatFit() here since it will call Clone()
        // which calls this default constructor in an endless recursion
        if (gStyle) {
          fOptStat = gStyle->GetOptStat();
          fOptFit  = gStyle->GetOptFit();
        }
        this->SetLineWidth(2);
      }
    
      /// Copy constructor
      CbmQaHist(const CbmQaHist& h) : HistTypeT(h) { SetOptStatFit(h.fOptStat, h.fOptFit); }
    
      /// Reimplementation of all other HistTypeT constructors
      /// that creates a stat window with current gStyle options.
      template<typename... Types>
      CbmQaHist(Types... args) : HistTypeT(args...)
      {
        if (gStyle) { SetOptStatFit(gStyle->GetOptStat(), gStyle->GetOptFit()); }
        this->SetLineWidth(2);
      }
    
      /// Destructor
      ~CbmQaHist() {}
    
      /// Reimplementation of Fit()
      /// that suppresses an immediate drawing in the active window
      ///
      template<typename... Types>
      TFitResultPtr Fit(Types... args)