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 TH1X >
TH1X EXPRTh1_book (const char *name, const char *title, int bins, double min, double max)
 
template<typename TH1X >
TH1X EXPRTh1_book (const char *name, const char *title, int bins, double edges[])
 
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[])
 
TCutGcut_book (const char *name)
 

Variables

TFoldergManaHistosFolder
 
TObjArraygHistoFolderStack
 

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)

◆ h1_book() [1/2]

template<typename TH1X >
TH1X EXPRT * h1_book ( const char *  name,
const char *  title,
int  bins,
double  edges[] 
)

Definition at line 47 of file rmidas.h.

48{
49 TH1X *hist;
50
51 /* check if histo already exists */
52 if (!gHistoFolderStack->Last())
53 hist = (TH1X *) gManaHistosFolder->FindObjectAny(name);
54 else
56
57 if (hist == NULL) {
58 hist = new TH1X(name, title, bins, edges);
59 if (!gHistoFolderStack->Last())
61 else
62 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
63 }
64
65 return hist;
66}
#define name(x)
Definition midas_macro.h:24
TObjArray * gHistoFolderStack
TFolder * gManaHistosFolder
TH1X EXPRT * h1_book(const char *name, const char *title, int bins, double min, double max)
Definition rmidas.h:24
Here is the call graph for this function:

◆ h1_book() [2/2]

template<typename TH1X >
TH1X EXPRT * h1_book ( const char *  name,
const char *  title,
int  bins,
double  min,
double  max 
)

Definition at line 24 of file rmidas.h.

26{
27 TH1X *hist;
28
29 /* check if histo already exists */
30 if (!gHistoFolderStack->Last())
31 hist = (TH1X *) gManaHistosFolder->FindObjectAny(name);
32 else
34
35 if (hist == NULL) {
36 hist = new TH1X(name, title, bins, min, max);
37 if (!gHistoFolderStack->Last())
39 else
40 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
41 }
42
43 return hist;
44}
Here is the call graph for this function:

◆ 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())
154 else
155 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
156 }
157
158 return hist;
159}
Here is the call graph for this function:

◆ 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())
131 else
132 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
133 }
134
135 return hist;
136}
Here is the call graph for this function:

◆ 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())
108 else
109 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
110 }
111
112 return hist;
113}
Here is the call graph for this function:

◆ 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
80
81 if (hist == NULL) {
82 hist = new TH2X(name, title, xbins, xmin, xmax, ybins, ymin, ymax);
83 if (!gHistoFolderStack->Last())
85 else
86 ((TFolder *) gHistoFolderStack->Last())->Add(hist);
87 }
88
89 return hist;
90}
Here is the call graph for this function:

Variable Documentation

◆ gHistoFolderStack

TObjArray* gHistoFolderStack
extern

◆ gManaHistosFolder

TFolder* gManaHistosFolder
extern