Jpp  15.0.1-rc.1-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Functions | Variables
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 "JROOT/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)
 
void normalizeBW1D (TH1D *h)
 

Variables

double binsToT []
 
int nbinsToT = sizeof(binsToT)/sizeof(*binsToT) - 1
 

Function Documentation

template<class T >
void BinLogX ( T h)

Definition at line 50 of file JRunHistograms.hh.

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

Definition at line 75 of file JRunHistograms.hh.

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

Definition at line 107 of file JRunHistograms.hh.

107  {
108 
109  for(int i=0 ; i < h->GetNbinsX() ; i++){
110 
111  double width = h -> GetXaxis() -> GetBinWidth(i);
112 
113  h -> SetBinContent(i , h -> GetBinContent(i) / width);
114  h -> SetBinError (i , h -> GetBinError(i) / width);
115  }
116 }

Variable Documentation

double binsToT[]
Initial value:
= {-0.5 , 0.5 , 1.5 , 2.5 , 3.5 , 4.5 , 5.5 , 6.5 , 7.5 , 8.5 , 9.5 , 10.5 , 11.5 , 12.5 , 13.5 , 14.5 , 15.5 ,
16.5 , 17.5 , 18.5 , 19.5 , 20.5 , 21.5 , 22.5 , 23.5 , 24.5 , 25.5 , 26.5 , 27.5 , 28.5 , 30.5 , 32.5 , 34.5 ,
36.5 , 38.5 , 40.5 , 45.5 , 50.5 , 55.5 , 60.5 , 65.5 , 70.5 , 75.5 , 80.5 , 85.5 , 90.5 , 95.5 , 100.5 , 120.5 , 140.5 ,
160.5 , 180.5 , 200.5 , 254.5 , 255.5 , 256.5}

Definition at line 93 of file JRunHistograms.hh.

int nbinsToT = sizeof(binsToT)/sizeof(*binsToT) - 1

Definition at line 98 of file JRunHistograms.hh.