ATLAS Offline Software
Classes | Macros
SimTestHisto.h File Reference
#include "AthenaKernel/errorcheck.h"
#include "GaudiKernel/ITHistSvc.h"
#include "GaudiKernel/ServiceHandle.h"
#include "TH1.h"
#include "TH2.h"
Include dependency graph for SimTestHisto.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  SimTestHisto
 Utility helper class for dealing with histograms in the sim tests. More...
 

Macros

#define _TPROFILE(var, name, nbin, xmin, xmax)
 
#define _TH1D(var, name, nbin, xmin, xmax)
 
#define _TH1D_NOCHECK(var, name, nbin, xmin, xmax)
 
#define _TH1D_WEIGHTED(var, name, nbin, xmin, xmax)
 
#define _TH2D_NOCHECK(var, name, nbinx, xmin, xmax, nbiny, ymin, ymax)
 
#define _TH2D(var, name, nbinx, xmin, xmax, nbiny, ymin, ymax)
 
#define _TH2D_WEIGHTED(var, name, nbinx, xmin, xmax, nbiny, ymin, ymax)
 
#define _SET_TITLE(var, title, xaxis, yaxis)
 

Detailed Description

Author
John Chapman - ATLAS Collaboration

Definition in file SimTestHisto.h.

Macro Definition Documentation

◆ _SET_TITLE

#define _SET_TITLE (   var,
  title,
  xaxis,
  yaxis 
)
Value:
var->SetXTitle(xaxis); \
var->SetYTitle(yaxis); \
var->SetTitle((std::string(var->GetName())+" : "+title).c_str());

Definition at line 94 of file SimTestHisto.h.

◆ _TH1D

#define _TH1D (   var,
  name,
  nbin,
  xmin,
  xmax 
)
Value:
if (!m_histSvc->exists(m_path+name)) { \
var = new TH1D(name,name,nbin,xmin,xmax); \
var->StatOverflows(); \
CHECK(m_histSvc->regHist(m_path+name,var)); \
} else { \
CHECK(m_histSvc->getHist(m_path+name,var)); \
}

Definition at line 48 of file SimTestHisto.h.

◆ _TH1D_NOCHECK

#define _TH1D_NOCHECK (   var,
  name,
  nbin,
  xmin,
  xmax 
)
Value:
if (!m_histSvc->exists(m_path+name)) { \
var = new TH1D(name,name,nbin,xmin,xmax); \
var->StatOverflows(); \
if(m_histSvc->regHist(m_path+name,var).isFailure()) \
std::cout<<"Cannot register histogram "<<name<<std::endl; \
} else { \
if(m_histSvc->getHist(m_path+name,var).isFailure()) \
std::cout<<"Cannot get histogram "<<name<<std::endl; \
}

Definition at line 57 of file SimTestHisto.h.

◆ _TH1D_WEIGHTED

#define _TH1D_WEIGHTED (   var,
  name,
  nbin,
  xmin,
  xmax 
)
Value:
_TH1D(var,name,nbin,xmin,xmax); \
var->Sumw2();

Definition at line 68 of file SimTestHisto.h.

◆ _TH2D

#define _TH2D (   var,
  name,
  nbinx,
  xmin,
  xmax,
  nbiny,
  ymin,
  ymax 
)
Value:
if (!m_histSvc->exists(m_path+name)) { \
var = new TH2D(name,name,nbinx,xmin,xmax,nbiny,ymin,ymax); \
CHECK(m_histSvc->regHist(m_path+name,var)); \
} else { \
CHECK(m_histSvc->getHist(m_path+name,var)); \
}

Definition at line 82 of file SimTestHisto.h.

◆ _TH2D_NOCHECK

#define _TH2D_NOCHECK (   var,
  name,
  nbinx,
  xmin,
  xmax,
  nbiny,
  ymin,
  ymax 
)
Value:
if (!m_histSvc->exists(m_path+name)) { \
var = new TH2D(name,name,nbinx,xmin,xmax,nbiny,ymin,ymax); \
if(m_histSvc->regHist(m_path+name,var).isFailure()) \
std::cout<<"Cannot register histogram "<<name<<std::endl;\
} else { \
if(m_histSvc->getHist(m_path+name,var).isFailure()) \
std::cout<<"Cannot get histogram "<<name<<std::endl; \
}

Definition at line 72 of file SimTestHisto.h.

◆ _TH2D_WEIGHTED

#define _TH2D_WEIGHTED (   var,
  name,
  nbinx,
  xmin,
  xmax,
  nbiny,
  ymin,
  ymax 
)
Value:
_TH2D(var,name,nbinx,xmin,xmax,nbiny,ymin,ymax); \
var->Sumw2();

Definition at line 90 of file SimTestHisto.h.

◆ _TPROFILE

#define _TPROFILE (   var,
  name,
  nbin,
  xmin,
  xmax 
)
Value:
if (!m_histSvc->exists(m_path+name)) { \
var = new TProfile(name,name,nbin,xmin,xmax); \
CHECK(m_histSvc->regHist(m_path+name,var)); \
} else { \
CHECK(m_histSvc->getHist(m_path+name, var)); \
}

Definition at line 40 of file SimTestHisto.h.

beamspotnt.var
var
Definition: bin/beamspotnt.py:1394
ymin
double ymin
Definition: listroot.cxx:63
_TH1D
#define _TH1D(var, name, nbin, xmin, xmax)
Definition: SimTestHisto.h:47
xmin
double xmin
Definition: listroot.cxx:60
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
covarianceTool.title
title
Definition: covarianceTool.py:542
m_path
std::string m_path
the path being used
Definition: OutputStreamData.cxx:88
_TH2D
#define _TH2D(var, name, nbinx, xmin, xmax, nbiny, ymin, ymax)
Definition: SimTestHisto.h:81
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
xmax
double xmax
Definition: listroot.cxx:61
ymax
double ymax
Definition: listroot.cxx:64