MIDAS
Loading...
Searching...
No Matches
rmidas.h File Reference
#include <TObjArray.h>
#include <TFolder.h>
#include <TCutG.h>
Include dependency graph for rmidas.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define H1_BOOK(n, t, b, min, max)   (h1_book<TH1F>(n,t,b,min,max))
 
#define H2_BOOK(n, t, xb, xmin, xmax, yb, ymin, ymax)   (h2_book<TH2F>(n,t,xb,xmin,xmax,yb,ymin,ymax))
 

Functions

template<typename TH2X >
TH2X EXPRTh2_book (const char *name, const char *title, int xbins, double xmin, double xmax, int ybins, double ymin, double ymax)
 
template<typename TH2X >
TH2X EXPRTh2_book (const char *name, const char *title, int xbins, double xmin, double xmax, int ybins, double yedges[])
 
template<typename TH2X >
TH2X EXPRTh2_book (const char *name, const char *title, int xbins, double xedges[], int ybins, double ymin, double ymax)
 
template<typename TH2X >
TH2X EXPRTh2_book (const char *name, const char *title, int xbins, double xedges[], int ybins, double yedges[])
 
TCutG * cut_book (const char *name)
 

Variables

TFolder * gManaHistosFolder
 
TObjArray * gHistoFolderStack
 

Macro Definition Documentation

◆ H1_BOOK

#define H1_BOOK (   n,
  t,
  b,
  min,
  max 
)    (h1_book<TH1F>(n,t,b,min,max))

Definition at line 165 of file rmidas.h.

◆ H2_BOOK

#define H2_BOOK (   n,
  t,
  xb,
  xmin,
  xmax,
  yb,
  ymin,
  ymax 
)    (h2_book<TH2F>(n,t,xb,xmin,xmax,yb,ymin,ymax))

Definition at line 166 of file rmidas.h.

Function Documentation

◆ cut_book()

TCutG * cut_book ( const char *  name)

◆ h2_book() [1/4]

template<typename TH2X >
TH2X EXPRT * h2_book ( const char *  name,
const char *  title,
int  xbins,
double  xedges[],
int  ybins,
double  yedges[] 
)

Definition at line 139 of file rmidas.h.

141{
142 TH2X *hist;
143
144 /* check if histo already exists */
145 if (!gHistoFolderStack->Last())
146 hist = (TH2X *) gManaHistosFolder->FindObjectAny(name);
147 else
148 hist = (TH2X *) ((TFolder *) gHistoFolderStack->Last())->FindObjectAny(name);
149
150 if (hist == NULL) {
151 hist = new TH2X(name, title, xbins, xedges, ybins, yedges);
152 if (!gHistoFolderStack->Last())
153 gManaHistosFolder->Add(hist);
154 else
155 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
156 }
157
158 return hist;
159}
#define name(x)
Definition midas_macro.h:24
TObjArray * gHistoFolderStack
TFolder * gManaHistosFolder

◆ h2_book() [2/4]

template<typename TH2X >
TH2X EXPRT * h2_book ( const char *  name,
const char *  title,
int  xbins,
double  xedges[],
int  ybins,
double  ymin,
double  ymax 
)

Definition at line 116 of file rmidas.h.

118{
119 TH2X *hist;
120
121 /* check if histo already exists */
122 if (!gHistoFolderStack->Last())
123 hist = (TH2X *) gManaHistosFolder->FindObjectAny(name);
124 else
125 hist = (TH2X *) ((TFolder *) gHistoFolderStack->Last())->FindObjectAny(name);
126
127 if (hist == NULL) {
128 hist = new TH2X(name, title, xbins, xedges, ybins, ymin, ymax);
129 if (!gHistoFolderStack->Last())
130 gManaHistosFolder->Add(hist);
131 else
132 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
133 }
134
135 return hist;
136}

◆ h2_book() [3/4]

template<typename TH2X >
TH2X EXPRT * h2_book ( const char *  name,
const char *  title,
int  xbins,
double  xmin,
double  xmax,
int  ybins,
double  yedges[] 
)

Definition at line 93 of file rmidas.h.

95{
96 TH2X *hist;
97
98 /* check if histo already exists */
99 if (!gHistoFolderStack->Last())
100 hist = (TH2X *) gManaHistosFolder->FindObjectAny(name);
101 else
102 hist = (TH2X *) ((TFolder *) gHistoFolderStack->Last())->FindObjectAny(name);
103
104 if (hist == NULL) {
105 hist = new TH2X(name, title, xbins, xmin, xmax, ybins, yedges);
106 if (!gHistoFolderStack->Last())
107 gManaHistosFolder->Add(hist);
108 else
109 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
110 }
111
112 return hist;
113}

◆ h2_book() [4/4]

template<typename TH2X >
TH2X EXPRT * h2_book ( const char *  name,
const char *  title,
int  xbins,
double  xmin,
double  xmax,
int  ybins,
double  ymin,
double  ymax 
)

Definition at line 69 of file rmidas.h.

72{
73 TH2X *hist;
74
75 /* check if histo already exists */
76 if (!gHistoFolderStack->Last())
77 hist = (TH2X *) gManaHistosFolder->FindObjectAny(name);
78 else
79 hist = (TH2X *) ((TFolder *) gHistoFolderStack->Last())->FindObjectAny(name);
80
81 if (hist == NULL) {
82 hist = new TH2X(name, title, xbins, xmin, xmax, ybins, ymin, ymax);
83 if (!gHistoFolderStack->Last())
84 gManaHistosFolder->Add(hist);
85 else
86 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
87 }
88
89 return hist;
90}

Variable Documentation

◆ gHistoFolderStack

TObjArray* gHistoFolderStack
extern

◆ gManaHistosFolder

TFolder* gManaHistosFolder
extern