ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FGolf/Tools/eff.C
(Generate patch)

Comparing UserCode/FGolf/Tools/eff.C (file contents):
Revision 1.1 by fgolf, Fri Mar 18 20:52:57 2011 UTC vs.
Revision 1.2 by fgolf, Fri Jul 8 09:16:47 2011 UTC

# Line 29 | Line 29 | TH1F* eff(TH1F* h1, TH1F* h2, const char
29    TH1F* temp = (TH1F*) h1->Clone(name);
30    temp->SetTitle(name);
31    temp->Reset();
32 <  temp->Sumw2();
32 >  if (!temp->GetSumw2N())
33 >      temp->Sumw2();
34  
35    // Do the calculation
36    temp->Divide(h2, h1, 1., 1., "B");
# Line 52 | Line 53 | TH1F* eff(const char* name1, const char*
53    TH1F* h2 = 0;
54    TString str1 = Form("%s", name1);
55    TString str2 = Form("%s", name2);
56 <  while (obj = iter->Next()) {
56 >  while ((obj = iter->Next())) {
57      TString objName = obj->GetName();
58      if (objName == str1) h1 = (TH1F*) obj;
59      if (objName == str2) h2 = (TH1F*) obj;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines