Jpp
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 "JDAQ/JDAQClock.hh"
#include "JDAQ/JDAQ.hh"
#include "JDAQ/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 normalize (T *h, double n=1.0)
 

Function Documentation

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

Definition at line 48 of file JRunHistograms.hh.

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

Definition at line 81 of file JRunHistograms.hh.

81  {
82 
83  h -> Scale(n / h -> Integral()) ;
84 
85 }