120 |
|
if (scanner.test(&vals[j])) npass++; |
121 |
|
} |
122 |
|
} |
123 |
– |
|
123 |
|
return npass; |
124 |
|
} |
125 |
< |
|
125 |
> |
|
126 |
|
TH1 * draw(const char *expr, const char *cut = "", TString drawopt = "", TH1 *hist = 0) { |
127 |
|
// prep the machinery |
128 |
|
helper::ScannerBase scanner(objType); |
137 |
|
gDirectory->Get("htemp")->IsA()->InheritsFrom(TH1::Class())) { |
138 |
|
hist = (TH1*) gDirectory->Get("htemp")->Clone(); |
139 |
|
hist->Reset(); |
140 |
+ |
hist->SetLineColor(kBlack); |
141 |
+ |
hist->SetMarkerColor(kBlack); |
142 |
|
} else { |
143 |
|
htempDelete(); |
144 |
|
hist = new TH1F("htemp", |
160 |
|
} |
161 |
|
} |
162 |
|
|
163 |
+ |
if (TString(drawopt).Contains("NORM",TString::kIgnoreCase) && (hist->Integral() != 0)) hist->Scale(1.0/hist->Integral()); |
164 |
+ |
|
165 |
|
if (!TString(drawopt).Contains("goff",TString::kIgnoreCase)) hist->Draw(drawopt); |
166 |
|
return hist; |
167 |
|
} |
168 |
|
TH1 * draw(const char *expr, int bins, double xlow, double xhigh, const char *cut = "", const char *drawopt = "") { |
169 |
+ |
if (TString(drawopt).Contains("same",TString::kIgnoreCase)) return draw(expr,cut,drawopt); |
170 |
|
htempDelete(); |
171 |
|
TH1 * htemp = new TH1F("htemp", (strlen(cut) ? TString(expr)+"{"+cut+"}" : TString(expr)), bins, xlow, xhigh); |
172 |
|
return draw(expr,cut,drawopt,htemp); |