ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/GPetrucc/interface/fwlite/Scanner.h
(Generate patch)

Comparing UserCode/GPetrucc/interface/fwlite/Scanner.h (file contents):
Revision 1.10 by gpetrucc, Wed Feb 24 11:50:12 2010 UTC vs.
Revision 1.12 by gpetrucc, Thu Apr 8 21:57:04 2010 UTC

# Line 120 | Line 120 | namespace fwlite {
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);
# Line 138 | Line 137 | namespace fwlite {
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",
# Line 159 | Line 160 | namespace fwlite {
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines