Jpp
Classes | Functions
JRunHistograms.hh File Reference
#include "JSupport/JSupport.hh"
#include "JSupport/JSupportToolkit.hh"
#include "JTrigger/JTriggerInterface.hh"
#include "JTrigger/JTriggerBits.hh"
#include "JDetector/JModuleRouter.hh"
#include "JDetector/JDetectorToolkit.hh"
#include "km3net-dataformat/online/JDAQClock.hh"
#include "km3net-dataformat/online/JDAQ.hh"
#include "km3net-dataformat/online/JDAQTimeslice.hh"
#include "JGizmo/JManager.hh"
#include "TH1D.h"
#include "TH2D.h"
#include "TProfile2D.h"
#include "TAxis.h"
#include "TCanvas.h"
#include "TPaveText.h"
#include "TStyle.h"
#include "TString.h"
#include "TMath.h"
#include "TColor.h"
#include "TDirectory.h"
#include "TPRegexp.h"
#include "TObjArray.h"
#include "TObjString.h"

Go to the source code of this file.

Classes

struct  SummaryHistograms
 
struct  TimesliceHistograms
 
struct  TriggerHistograms
 
class  JRA_Histograms
 

Functions

template<class T >
void BinLogX (T *h)
 
template<class T >
void BinLogY (T *h)
 
template<class T >
void normalize (T *h, double n=1.0)
 

Function Documentation

◆ BinLogX()

template<class T >
void BinLogX ( T *  h)

Definition at line 48 of file JRunHistograms.hh.

48  {
49 
50  TAxis *axis = h->GetXaxis();
51  int bins = axis->GetNbins();
52  Axis_t from = axis->GetXmin();
53  Axis_t to = axis->GetXmax();
54  Axis_t width = (to - from) / bins;
55  Axis_t *new_bins = new Axis_t[bins + 1];
56 
57  for (int i = 0; i <= bins; i++) {
58  new_bins[i] = TMath::Power(10, from + i * width);
59  }
60 
61  axis->Set(bins, new_bins);
62 
63  delete new_bins;
64 }

◆ BinLogY()

template<class T >
void BinLogY ( T *  h)

Definition at line 73 of file JRunHistograms.hh.

73  {
74 
75  TAxis *axis = h->GetYaxis();
76  int bins = axis->GetNbins();
77  Axis_t from = axis->GetXmin();
78  Axis_t to = axis->GetXmax();
79  Axis_t width = (to - from) / bins;
80  Axis_t *new_bins = new Axis_t[bins + 1];
81 
82  for (int i = 0; i <= bins; i++) {
83  new_bins[i] = TMath::Power(10, from + i * width);
84  }
85 
86  axis->Set(bins, new_bins);
87 
88  delete new_bins;
89 }

◆ normalize()

template<class T >
void normalize ( T *  h,
double  n = 1.0 
)

Definition at line 99 of file JRunHistograms.hh.

99  {
100 
101  h -> Scale(n / h -> Integral());
102 }
JTOOLS::n
const int n
Definition: JPolint.hh:628